PSCF v1.1
XmlStartTag.h
1#ifndef UTIL_XML_START_TAG_H
2#define UTIL_XML_START_TAG_H
3
4/*
5* Util Package - C++ Utilities for Scientific Computation
6*
7* Copyright 2010 - 2017, The Regents of the University of Minnesota
8* Distributed under the terms of the GNU General Public License.
9*/
10
11#include "XmlBase.h"
12#include "XmlAttribute.h"
13#include <sstream>
14#include <vector>
15
16namespace Util
17{
18
36 class XmlStartTag : public XmlBase
37 {
38
39 public:
40
45
50
58 bool matchLabel(const std::string& string, int begin);
59
69 void matchLabel(const std::string expected,
70 const std::string& string, int begin);
71
78 bool matchAttribute(XmlAttribute& attribute);
79
85 void finish();
86
90 const std::string label()
91 { return label_; }
92
97 { return endBracket_; }
98
99 private:
100
104 std::string label_;
105
109 bool endBracket_;
110
111 };
112
113}
114#endif
Parser for an XML attribute.
Definition: XmlAttribute.h:24
Base class for classes that parse XML markup tags.
Definition: XmlBase.h:23
Parser for an XML start tag.
Definition: XmlStartTag.h:37
bool matchAttribute(XmlAttribute &attribute)
Attempt to match an attribute.
Definition: XmlStartTag.cpp:71
~XmlStartTag()
Destructor.
Definition: XmlStartTag.cpp:18
bool endBracket()
True if a closing bracket was found.
Definition: XmlStartTag.h:96
const std::string label()
Label string.
Definition: XmlStartTag.h:90
XmlStartTag()
Constructor.
Definition: XmlStartTag.cpp:14
bool matchLabel(const std::string &string, int begin)
Match opening bracket and any label.
Definition: XmlStartTag.cpp:21
void finish()
Check if end bracket was found.
Definition: XmlStartTag.cpp:93
Utility classes for scientific computation.
Definition: accumulators.mod:1