4 #include <utl/TimeStamp.h>
5 #include <utl/TabulatedFunction.h>
6 #include <utl/AugerException.h>
8 #include <xercesc/dom/DOM.hpp>
9 #include <boost/shared_ptr.hpp>
117 Branch(xercesc::DOMDocument*
const doc, xercesc::DOMNode*
const docBranch)
120 Branch(
const boost::shared_ptr<BranchOwner>& doc, xercesc::DOMNode*
const docBranch)
147 Branch GetChild(
const std::string& childName,
const std::string& attributes)
const;
186 Branch GetSibling(
const std::string& childName,
const std::string& multiID)
const;
202 void GetData(std::vector<bool>& b)
const;
203 void GetData(std::list<bool>& b)
const;
206 void GetData(std::vector<std::string>&
s)
const;
207 void GetData(std::list<std::string>&
s)
const;
212 void GetData(std::vector<utl::TimeStamp>& vt)
const;
244 template<
typename T,
class A,
template<
typename,
typename>
class W>
257 template<
typename T1,
typename T2>
263 if (is >> p.first >> std::ws >> p.second) {
264 p.first *=
static_cast<T1
>(
GetUnit());
265 p.second *=
static_cast<T2
>(
GetUnit());
277 std::string
String()
const;
311 template<
typename T,
class A,
template<
typename,
typename>
class W>
317 std::istringstream
is(dataString);
Branch GetTopBranch() const
void SetWarning(const std::string &wrn)
BranchOwner(xercesc::DOMDocument *const doc)
else throw XMLParseException("Parsing pair failed!")
bool HasTopBranch() const
std::string String() const
Dump the branch into a string.
Class to hold collection (x,y) points and provide interpolation between them.
xercesc::DOMNode * GetDOMNode() const
xercesc::DOMDocument * fDocument
std::map< std::string, std::string > AttributeMap
std::vector< std::string > GetListOfVariables() const
Get the list of variables of a function.
Branch(xercesc::DOMDocument *const doc, xercesc::DOMNode *const docBranch)
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
A TimeStamp holds GPS second and nanosecond for some event.
AttributeMap GetAttributes() const
Get a map<string, string> containing all the attributes of this Branch.
Branch GetNextSibling() const
Get next sibling of this branch.
Branch & operator=(const Branch &b)
Utility for parsing XML files.
Class representing a document branch.
bool operator==(const Branch &b) const
xercesc::DOMNode * fDOMNode
Class to handle memory related to Xerces.
Branch & operator--()
Syntactic sugar for for-loops.
BranchOwner & operator=(const BranchOwner &)
Branch(const boost::shared_ptr< BranchOwner > &doc, xercesc::DOMNode *const docBranch)
std::istringstream is(dataString)
unsigned int GetNChildren() const
void ZeroBranchCheck() const
void GetData(bool &b) const
Overloads of the GetData member template function.
std::string GetName() const
function to get the Branch name
bool operator!=(const Branch &b) const
Evaluate functions given in a string. The real work is done by the ExpressionParser class...
std::string GetDataString() const
function to get the data inside an element as one big string
Branch Clone() const
returns a clone of this branch.
void GetData(T &a) const
Get data in the current branch into an atomic type.
Branch GetFirstChild() const
Get first child of this Branch.
Branch GetPreviousSibling() const
Get previous sibling of this branch.
Branch GetSibling(const std::string &childName) const
Get sibling by name.
boost::shared_ptr< BranchOwner > fOwner
Branch & operator++()
Syntactic sugar for for-loops.
xercesc::DOMDocument * GetDocument() const
double GetUnit() const
Get the unit of the token.