Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GeoModel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
GeoModelDev
GeoModel
Merge requests
!295
Minor cleaning of the XMLHandler
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Minor cleaning of the XMLHandler
MinorXMLHandlerClean
into
main
Overview
0
Commits
1
Pipelines
3
Changes
2
Merged
Johannes Junggeburth
requested to merge
MinorXMLHandlerClean
into
main
1 year ago
Overview
0
Commits
1
Pipelines
3
Changes
2
Expand
Fix identation
Parse std::string -> const std::string&
Add variable names to the header declared functions
0
0
Merge request reports
Compare
main
version 1
b20c900d
1 year ago
main (base)
and
latest version
latest version
54f0a246
1 commit,
1 year ago
version 1
b20c900d
1 commit,
1 year ago
2 files
+
140
−
147
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
GeoModelTools/GeoModelXMLParser/GeoModelXMLParser/XMLHandler.h
+
57
−
48
Options
@@ -17,59 +17,68 @@ class XMLHandlerStore;
class
XMLHandler
{
public:
XMLHandler
(
std
::
string
n
);
virtual
~
XMLHandler
()
{}
std
::
string
GetName
()
{
return
m_name
;}
virtual
void
ElementHandle
()
=
0
;
virtual
void
Handle
(
xercesc
::
DOMNode
*
t
)
{
SetCurrentElement
(
t
);
ElementHandle
();
}
void
StopLoop
(
bool
);
bool
IsLoopToBeStopped
();
virtual
void
postLoopHandling
()
{;}
XMLHandler
(
const
std
::
string
&
n
);
virtual
~
XMLHandler
()
{}
const
std
::
string
&
GetName
()
const
{
return
m_name
;}
virtual
void
ElementHandle
()
=
0
;
virtual
void
Handle
(
xercesc
::
DOMNode
*
t
)
{
SetCurrentElement
(
t
);
ElementHandle
();
}
void
StopLoop
(
bool
);
bool
IsLoopToBeStopped
()
const
;
virtual
void
postLoopHandling
()
{;}
protected
:
std
::
string
m_name
;
bool
m_stopLoop
;
std
::
string
m_name
;
bool
m_stopLoop
{
false
}
;
static
xercesc
::
DOMNode
*
s_currentElement
;
static
void
SetCurrentElement
(
xercesc
::
DOMNode
*
t
)
{
s_currentElement
=
t
;}
static
xercesc
::
DOMNode
*
GetCurrentElement
()
{
return
s_currentElement
;}
static
xercesc
::
DOMNode
*
s_currentElement
;
static
void
SetCurrentElement
(
xercesc
::
DOMNode
*
t
)
{
s_currentElement
=
t
;}
static
xercesc
::
DOMNode
*
GetCurrentElement
()
{
return
s_currentElement
;}
bool
isAttribute
(
const
std
::
string
)
const
;
bool
isAttribute
(
const
std
::
string
&
attributeName
)
const
;
std
::
string
getAttribute
(
const
std
::
string
,
bool
&
)
const
;
std
::
string
getAttributeAsString
(
const
std
::
string
)
const
;
double
getAttributeAsDouble
(
const
std
::
string
)
const
;
float
getAttributeAsFloat
(
const
std
::
string
)
const
;
int
getAttributeAsInt
(
const
std
::
string
)
const
;
long
getAttributeAsLong
(
const
std
::
string
)
const
;
std
::
vector
<
double
>
getAttributeAsVector
(
const
std
::
string
)
const
;
std
::
vector
<
int
>
getAttributeAsIntVector
(
const
std
::
string
)
const
;
std
::
string
getAttributeAsString
(
const
std
::
string
,
bool
&
)
const
;
double
getAttributeAsDouble
(
const
std
::
string
,
bool
&
)
const
;
float
getAttributeAsFloat
(
const
std
::
string
,
bool
&
)
const
;
int
getAttributeAsInt
(
const
std
::
string
,
bool
&
)
const
;
long
getAttributeAsLong
(
const
std
::
string
,
bool
&
)
const
;
std
::
vector
<
double
>
getAttributeAsVector
(
const
std
::
string
,
bool
&
)
const
;
std
::
vector
<
int
>
getAttributeAsIntVector
(
const
std
::
string
,
bool
&
)
const
;
std
::
string
getAttributeAsString
(
const
std
::
string
,
const
std
::
string
)
const
;
double
getAttributeAsDouble
(
const
std
::
string
,
const
double
)
const
;
float
getAttributeAsFloat
(
const
std
::
string
,
const
float
)
const
;
int
getAttributeAsInt
(
const
std
::
string
,
const
int
)
const
;
long
getAttributeAsLong
(
const
std
::
string
,
const
long
)
const
;
std
::
vector
<
double
>
getAttributeAsVector
(
const
std
::
string
,
const
std
::
vector
<
double
>
)
const
;
std
::
vector
<
int
>
getAttributeAsIntVector
(
const
std
::
string
,
const
std
::
vector
<
int
>
)
const
;
static
bool
s_printFlag
;
std
::
string
getAttribute
(
const
std
::
string
&
attributeName
,
bool
&
attrIsPresent
)
const
;
std
::
string
getAttributeAsString
(
const
std
::
string
&
attributeName
)
const
;
double
getAttributeAsDouble
(
const
std
::
string
&
attributeName
)
const
;
float
getAttributeAsFloat
(
const
std
::
string
&
attributeName
)
const
;
int
getAttributeAsInt
(
const
std
::
string
&
attributeName
)
const
;
long
getAttributeAsLong
(
const
std
::
string
&
attributeName
)
const
;
std
::
vector
<
double
>
getAttributeAsVector
(
const
std
::
string
&
attributeName
)
const
;
std
::
vector
<
int
>
getAttributeAsIntVector
(
const
std
::
string
&
attributeName
)
const
;
std
::
string
getAttributeAsString
(
const
std
::
string
&
attributeName
,
bool
&
attrIsPresent
)
const
;
double
getAttributeAsDouble
(
const
std
::
string
&
attributeName
,
bool
&
attrIsPresent
)
const
;
float
getAttributeAsFloat
(
const
std
::
string
&
attributeName
,
bool
&
attrIsPresent
)
const
;
int
getAttributeAsInt
(
const
std
::
string
&
attributeName
,
bool
&
attrIsPresent
)
const
;
long
getAttributeAsLong
(
const
std
::
string
&
attributeName
,
bool
&
attrIsPresent
)
const
;
std
::
vector
<
double
>
getAttributeAsVector
(
const
std
::
string
&
attributeName
,
bool
&
attrIsPresent
)
const
;
std
::
vector
<
int
>
getAttributeAsIntVector
(
const
std
::
string
&
attributeName
,
bool
&
attrIsPresent
)
const
;
std
::
string
getAttributeAsString
(
const
std
::
string
&
attributeName
,
const
std
::
string
&
fallBackVal
)
const
;
double
getAttributeAsDouble
(
const
std
::
string
&
attributeName
,
const
double
fallBackVal
)
const
;
float
getAttributeAsFloat
(
const
std
::
string
&
attributeName
,
const
float
fallBackVal
)
const
;
int
getAttributeAsInt
(
const
std
::
string
&
attributeName
,
const
int
fallBackVal
)
const
;
long
getAttributeAsLong
(
const
std
::
string
&
attributeName
,
const
long
fallBackVal
)
const
;
std
::
vector
<
double
>
getAttributeAsVector
(
const
std
::
string
&
attributeName
,
const
std
::
vector
<
double
>&
fallBackVal
)
const
;
std
::
vector
<
int
>
getAttributeAsIntVector
(
const
std
::
string
&
attributeName
,
const
std
::
vector
<
int
>&
fallBackVal
)
const
;
static
bool
s_printFlag
;
ExpressionEvaluator
*
Evaluator
()
const
{
static
ExpressionEvaluator
*
eval
=
ExpressionEvaluator
::
GetEvaluator
();
return
eval
;
}
ExpressionEvaluator
*
Evaluator
()
const
{
static
ExpressionEvaluator
*
eval
=
ExpressionEvaluator
::
GetEvaluator
();
return
eval
;
}
private
:
void
RegisterToStore
();
};
}
// end namespace
Loading