Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
JPSreport
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
JuPedSim
JPSreport
Commits
a8ff6b2b
Commit
a8ff6b2b
authored
10 years ago
by
Ulrich Kemloh
Browse files
Options
Downloads
Patches
Plain Diff
Fixed issue #22. checking if the file name match the extension.
parent
a79ddc00
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
LICENSE
+0
-0
0 additions, 0 deletions
LICENSE
general/ArgumentParser.cpp
+14
-4
14 additions, 4 deletions
general/ArgumentParser.cpp
with
14 additions
and
4 deletions
LICEN
C
E
→
LICEN
S
E
+
0
−
0
View file @
a8ff6b2b
File moved
This diff is collapsed.
Click to expand it.
general/ArgumentParser.cpp
+
14
−
4
View file @
a8ff6b2b
...
@@ -219,7 +219,7 @@ bool ArgumentParser::ParseIniFile(string inifile)
...
@@ -219,7 +219,7 @@ bool ArgumentParser::ParseIniFile(string inifile)
if
(
xMainNode
->
FirstChild
(
"geometry"
))
if
(
xMainNode
->
FirstChild
(
"geometry"
))
{
{
_geometryFileName
=
_projectRootDir
+
xMainNode
->
FirstChildElement
(
"geometry"
)
->
Attribute
(
"file"
);
_geometryFileName
=
_projectRootDir
+
xMainNode
->
FirstChildElement
(
"geometry"
)
->
Attribute
(
"file"
);
Log
->
Write
(
"INFO:
\t
Geometry File is:
\t
<"
+
_geometryFileName
+
">"
);
Log
->
Write
(
"INFO:
\t
Geometry File is: <"
+
_geometryFileName
+
">"
);
}
}
//trajectories
//trajectories
...
@@ -228,7 +228,7 @@ bool ArgumentParser::ParseIniFile(string inifile)
...
@@ -228,7 +228,7 @@ bool ArgumentParser::ParseIniFile(string inifile)
{
{
//add the extension point
//add the extension point
string
fmt
=
"."
+
string
(
xmltoa
(
xMainNode
->
FirstChildElement
(
"trajectories"
)
->
Attribute
(
"format"
)));
string
fmt
=
"."
+
string
(
xmltoa
(
xMainNode
->
FirstChildElement
(
"trajectories"
)
->
Attribute
(
"format"
)));
Log
->
Write
(
"INFO:
\t
Format of the trajectory file is:
\t
<%s>"
,
fmt
.
c_str
());
Log
->
Write
(
"INFO:
\t
Format of the trajectory file is:
<%s>"
,
fmt
.
c_str
());
if
(
fmt
==
".xml"
)
if
(
fmt
==
".xml"
)
{
{
_fileFormat
=
FORMAT_XML_PLAIN
;
_fileFormat
=
FORMAT_XML_PLAIN
;
...
@@ -257,8 +257,18 @@ bool ArgumentParser::ParseIniFile(string inifile)
...
@@ -257,8 +257,18 @@ bool ArgumentParser::ParseIniFile(string inifile)
_trajectoriesFilename
=
_trajectoriesFilename
=
+
xFile
->
Attribute
(
"name"
);
+
xFile
->
Attribute
(
"name"
);
_trajectoriesFiles
.
push_back
(
_trajectoriesFilename
);
_trajectoriesFiles
.
push_back
(
_trajectoriesFilename
);
//check if the given file match the format
if
(
boost
::
algorithm
::
ends_with
(
_trajectoriesFilename
,
fmt
))
{
Log
->
Write
(
"INFO:
\t
Input trajectory file is
\t
<"
+
(
_trajectoriesFilename
)
+
">"
);
Log
->
Write
(
"INFO:
\t
Input trajectory file is
\t
<"
+
(
_trajectoriesFilename
)
+
">"
);
}
}
else
{
Log
->
Write
(
"ERROR:
\t
Wrong file extension
\t
<%s> for file <%s>"
,
fmt
.
c_str
(),
_trajectoriesFilename
.
c_str
());
return
false
;
}
}
if
(
xTrajectories
->
FirstChildElement
(
"path"
))
if
(
xTrajectories
->
FirstChildElement
(
"path"
))
{
{
...
...
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