Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
amdis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
iwr
amdis
Commits
cce80ff0
Commit
cce80ff0
authored
13 years ago
by
Praetorius, Simon
Browse files
Options
Downloads
Patches
Plain Diff
Initfile parser - small changes
parent
00561533
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
AMDiS/src/Initfile.cc
+4
-0
4 additions, 0 deletions
AMDiS/src/Initfile.cc
AMDiS/src/Initfile.h
+8
-4
8 additions, 4 deletions
AMDiS/src/Initfile.h
with
12 additions
and
4 deletions
AMDiS/src/Initfile.cc
+
4
−
0
View file @
cce80ff0
...
...
@@ -6,6 +6,8 @@
#include
<sstream>
using
namespace
std
;
namespace
AMDiS
{
/// the small parser for the initfile. see description of read(Initfile&, istream&)
struct
Parser
{
Parser
(
const
string
&
line
)
{
...
...
@@ -140,3 +142,5 @@ void Initfile::write(std::string fn) {
write
(
outFile
);
};
}
This diff is collapsed.
Click to expand it.
AMDiS/src/Initfile.h
+
8
−
4
View file @
cce80ff0
...
...
@@ -16,9 +16,11 @@
#include
<boost/algorithm/string/trim.hpp>
#include
<boost/lexical_cast.hpp>
using
namespace
AMDiS
;
namespace
InitfileInternal
{
namespace
AMDiS
{
namespace
InitfileInternal
{
/// Exceptions
struct
WrongVectorSize
:
std
::
runtime_error
{
WrongVectorSize
(
std
::
string
m
)
:
std
::
runtime_error
(
m
)
{}
...
...
@@ -50,7 +52,7 @@ namespace InitfileInternal {
return
swap
;
}
/// return the delimiter or throw an exception if there is no known delimiter in value
size_t
checkDelim
(
const
std
::
string
&
value
,
const
std
::
string
&
delims
)
{
inline
size_t
checkDelim
(
const
std
::
string
&
value
,
const
std
::
string
&
delims
)
{
size_t
pos
(
std
::
string
::
npos
);
for
(
unsigned
i
=
0
;
i
<
delims
.
length
();
++
i
)
{
pos
=
value
.
find
(
delims
[
i
]);
...
...
@@ -164,7 +166,7 @@ namespace InitfileInternal {
temp_vec
[
i
]
=
c
[
i
];
convert
(
temp_vec
,
valStr
);
}
}
// end namespace InitfileInternal
}
// end namespace InitfileInternal
/** The entry in an initfile. This helper class was constructed to allow calls like
* val = data.get(tag)
...
...
@@ -375,4 +377,6 @@ protected:
int
msgInfo
,
msgWait
,
paramInfo
;
};
}
// end namespace AMDiS
#endif
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