PhoenixFileParser
1.7.3
Set of tools to ease file parsing
Toggle main menu visibility
Loading...
Searching...
No Matches
ConfigNodeIter.h
Go to the documentation of this file.
1
/***************************************
2
Auteur : Pierre Aubert
3
Mail : pierre.aubert@lapp.in2p3.fr
4
Licence : CeCILL-C
5
****************************************/
6
7
#ifndef __CONFIGNODEITER_H__
8
#define __CONFIGNODEITER_H__
9
10
#include "
configCheckValue.h
"
11
#include "
ConfigCheck.h
"
12
13
#include "
ConfigNode.h
"
14
16
class
ConfigNodeIter
{
17
public
:
18
friend
ConfigNode
;
19
ConfigNodeIter
(
const
ConfigNodeIter
& other);
20
virtual
~ConfigNodeIter
();
21
ConfigNodeIter
&
operator =
(
const
ConfigNodeIter
& other);
22
23
ConfigNode
*
operator ->
();
24
25
std::ostream *
getOut
();
26
void
up
();
27
bool
down
(
const
PString & childName);
28
bool
isWriteMode
()
const
;
29
30
template
<
typename
T>
31
bool
getValue
(T & data)
const
;
32
template
<
typename
T>
33
bool
getValue
(T & data,
const
GenericConfigCheck
* checker)
const
;
34
35
template
<
typename
T>
36
bool
getChildValue
(
const
PString & childName, T & data,
const
GenericConfigCheck
* checker = NULL);
37
38
protected
:
39
void
copyConfigNodeIter
(
const
ConfigNodeIter
& other);
40
41
private
:
42
ConfigNodeIter
(
const
ConfigNode
* current, std::ostream * out,
bool
isWriteMode
);
43
void
initialisationConfigNodeIter
();
44
46
ConfigNode
*
p_current
;
48
std::ostream *
p_out
;
50
bool
p_isWriteMode
;
51
};
52
53
#include "
ConfigNodeIter_impl.h
"
54
55
#endif
56
ConfigCheck.h
ConfigNodeIter_impl.h
ConfigNode.h
ConfigNodeIter::getChildValue
bool getChildValue(const PString &childName, T &data, const GenericConfigCheck *checker=NULL)
Get a value from the current ConfigNode and check data.
Definition
ConfigNodeIter_impl.h:66
ConfigNodeIter::p_isWriteMode
bool p_isWriteMode
True if the ConfigNodeIter is in writing mode.
Definition
ConfigNodeIter.h:50
ConfigNodeIter::down
bool down(const PString &childName)
Move to the child of the current node.
Definition
ConfigNodeIter.cpp:67
ConfigNodeIter::up
void up()
Move to the parent of the current node.
Definition
ConfigNodeIter.cpp:56
ConfigNodeIter::getValue
bool getValue(T &data) const
Get a value from the current ConfigNode.
Definition
ConfigNodeIter_impl.h:18
ConfigNodeIter::p_current
ConfigNode * p_current
Current ConfigNode.
Definition
ConfigNodeIter.h:46
ConfigNodeIter::operator=
ConfigNodeIter & operator=(const ConfigNodeIter &other)
Definition of equal operator of ConfigNodeIter.
Definition
ConfigNodeIter.cpp:36
ConfigNodeIter::isWriteMode
bool isWriteMode() const
Say if the iterator is in write mode.
Definition
ConfigNodeIter.cpp:87
ConfigNodeIter::ConfigNodeIter
ConfigNodeIter(const ConfigNodeIter &other)
Copy constructor of ConfigNodeIter.
Definition
ConfigNodeIter.cpp:23
ConfigNodeIter::operator->
ConfigNode * operator->()
Get the current ConfigNode.
Definition
ConfigNodeIter.cpp:44
ConfigNodeIter::~ConfigNodeIter
virtual ~ConfigNodeIter()
Destructor of ConfigNodeIter.
Definition
ConfigNodeIter.cpp:28
ConfigNodeIter::p_out
std::ostream * p_out
std::ostream to be used for the error messages
Definition
ConfigNodeIter.h:48
ConfigNodeIter::ConfigNode
friend ConfigNode
Definition
ConfigNodeIter.h:18
ConfigNodeIter::copyConfigNodeIter
void copyConfigNodeIter(const ConfigNodeIter &other)
Copy function of ConfigNodeIter.
Definition
ConfigNodeIter.cpp:94
ConfigNodeIter::getOut
std::ostream * getOut()
Get the pointer of the output stream.
Definition
ConfigNodeIter.cpp:51
ConfigNodeIter::initialisationConfigNodeIter
void initialisationConfigNodeIter()
Initialisation function of the class ConfigNodeIter.
Definition
ConfigNodeIter.cpp:101
GenericConfigCheck
Generic class for a configuration check.
Definition
GenericConfigCheck.h:13
configCheckValue.h
src
ConfigNodeIter.h
Generated by
1.17.0