Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
be36b183
Commit
be36b183
authored
11 years ago
by
Andreas Schenk
Browse files
Options
Downloads
Patches
Plain Diff
fixed string to vec converter for info module
parent
785299a8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/geom/src/vec3.hh
+4
-0
4 additions, 0 deletions
modules/geom/src/vec3.hh
modules/info/src/item_type_cast.hh
+1
-1
1 addition, 1 deletion
modules/info/src/item_type_cast.hh
with
5 additions
and
1 deletion
modules/geom/src/vec3.hh
+
4
−
0
View file @
be36b183
...
...
@@ -195,6 +195,10 @@ inline Vec3 operator/(Real d, const Vec3& v)
return
nrvo
;
}
// The following operator is among other things used to write vector
// data into info files. If its format is changed, the string to
// vector type cast in item_type_cast.hh has to be changed
// accordingly.
inline
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
Vec3
&
v
)
{
os
<<
"["
<<
v
.
x
<<
", "
<<
v
.
y
<<
", "
<<
v
.
z
<<
"]"
;
...
...
This diff is collapsed.
Click to expand it.
modules/info/src/item_type_cast.hh
+
1
−
1
View file @
be36b183
...
...
@@ -99,7 +99,7 @@ template <> void set_new_type<IT_STRING,IT_BOOL>(EleImpl& item)
template
<
>
void
set_new_type
<
IT_STRING
,
IT_VECTOR
>
(
EleImpl
&
item
)
{
static
String
num
(
"[-+]?[0-9]*
\\
.?[0-9]+([eE][-+]?[0-9]+)?"
);
boost
::
regex
expression
(
"
\\
(
("
+
num
+
")
,
("
+
num
+
")
,
("
+
num
+
")
\\
)
"
);
boost
::
regex
expression
(
"
\\
[ *
("
+
num
+
")
*, *
("
+
num
+
")
*, *
("
+
num
+
")
*
\\
]
"
);
boost
::
cmatch
what
;
if
(
boost
::
regex_match
(
item
.
GetStringRepr
().
c_str
(),
what
,
expression
))
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment