|
| static bool | has_attribute (const XMLCoreNode &node, const std::string &name) |
| static int | get_int (const XMLCoreNode &node, const std::string &name) |
| static double | get_double (const XMLCoreNode &node, const std::string &name) |
| static bool | get_boolean (const XMLCoreNode &node, const std::string &name) |
| static std::string | get_ID (const XMLCoreNode &node, const std::string &name) |
| static std::string | get_value (const XMLCoreNode &node, const std::string &name) |
| static std::string | get_token (const XMLCoreNode &node, const std::string &name) |
| static bool | check_int (const int n, const XMLCoreNode &node, const std::string &name) |
| static bool | check_double (const int n, const XMLCoreNode &node, const std::string &name) |
Definition at line 74 of file IdDictParser.cxx.
◆ check_double()
Definition at line 184 of file XMLCoreParser.cxx.
184 {
185 std::string checkstring =
get_value (node, name);
187
188
189
190
191
192 std::string
t = checkstring +
" " + checkstring;
193 std::istringstream tmpstr (
t.c_str());
194 while (tmpstr.good ()) {
195 double ii{};
197 tmpstr >> ii;
198 }
199 if (counter/2 != n) {
200 std::cerr <<
"XMLCoreFactory::check_double error: (" <<
counter <<
") no " <<
n
201 << " doubles in \"" << checkstring << "\" for attribute " <<
202 name <<
". exit." << std::endl;
204 std::string volume =
get_value (node,
"volume");
205 if (name1 !=
"" ) std::cerr <<
"for name=" <<
name << std::endl;
206 if (volume != "" ) std::cerr << "for volume=" << volume << std::endl;
207 std::abort();
208 }
209 return true;
210}
static std::string get_value(const XMLCoreNode &node, const std::string &name)
◆ check_int()
Definition at line 152 of file XMLCoreParser.cxx.
152 {
153 std::string checkstring =
get_value (node, name);
155
156
157
158
159
160 std::string
t = checkstring +
" " + checkstring;
161 std::istringstream tmpstr (
t.c_str());
162 while (tmpstr.good ()) {
163 int ii;
165 tmpstr >> ii;
166 }
167 if (counter/2 != n) {
168 std::cerr <<
"XMLCoreFactory::check_int error: no " <<
n
169 << " ints in \"" << checkstring << "\" for attribute " <<
170 name <<
". exit." << std::endl;
171
172 std::string nodename =
get_value (node,
"name");
173 std::string volume =
get_value (node,
"volume");
174
175 if (nodename != "" ) std::cerr << "for name=" << nodename << std::endl;
176 if (volume != "" ) std::cerr << "for volume=" << volume << std::endl;
177
178 std::abort();
179 }
180 return true;
181}
◆ comment()
Definition at line 58 of file XMLCoreParser.cxx.
58 {
59 if (XMLCoreParserDebugger::debug ()){
60 std::cout << "XMLCoreFactory::comment>" << std::endl;
61 }
63}
virtual void do_comment(XMLCoreParser &parser, const std::string &comment)
void comment(XMLCoreParser &parser, const std::string &comment)
◆ do_comment()
Definition at line 80 of file XMLCoreParser.cxx.
80 {
81 if (XMLCoreParserDebugger::debug ()){
82 std::cout << "XMLCoreFactory::do_comment>" << std::endl;
83 }
84}
◆ do_end()
Reimplemented from XMLCoreFactory.
Definition at line 157 of file IdDictParser.cxx.
157 {
158 idd_end (
static_cast<IdDictParser&
>(parser), node);
160}
virtual void idd_end(IdDictParser &parser, const XMLCoreNode &node)
◆ do_start()
Reimplemented from XMLCoreFactory.
Definition at line 150 of file IdDictParser.cxx.
151 {
153 idd_start (
static_cast<IdDictParser&
>(parser), node);
154}
virtual void idd_start(IdDictParser &parser, const XMLCoreNode &node)
◆ end()
Definition at line 50 of file XMLCoreParser.cxx.
50 {
51 if (XMLCoreParserDebugger::debug ()){
52 std::cout << "XMLCoreFactory::end>" << std::endl;
53 }
55}
virtual void do_end(XMLCoreParser &parser, const XMLCoreNode &node)
◆ get_boolean()
Definition at line 108 of file XMLCoreParser.cxx.
108 {
111 if (s ==
"TRUE")
result =
true;
112 return (result);
113}
static std::string get_token(const XMLCoreNode &node, const std::string &name)
◆ get_double()
Definition at line 100 of file XMLCoreParser.cxx.
100 {
103 sscanf (
s.c_str (),
"%80lg", &result);
104 return (result);
105}
◆ get_ID()
◆ get_int()
Definition at line 92 of file XMLCoreParser.cxx.
92 {
95 sscanf (
s.c_str (),
"%80d", &result);
96 return (result);
97}
◆ get_token()
Definition at line 135 of file XMLCoreParser.cxx.
135 {
137
138 while ((
result.length () > 0) &&
140
141 while ((
result.length () > 0) &&
143
144 for (std::string::size_type i = 0;
i <
result.length (); ++
i){
145 result[
i] = std::toupper (result[i]);
146 }
147 return (result);
148}
◆ get_value()
Definition at line 121 of file XMLCoreParser.cxx.
121 {
122 if (XMLCoreParserDebugger::debug ()){
123 std::cout <<
"XMLCoreFactory::get_value> name=" <<
name << std::endl;
124 }
128 if (XMLCoreParserDebugger::debug ()) {
129 std::cout <<
"XMLCoreFactory::get_value>2 value=" <<
result << std::endl;
130 }
131 return (result);
132}
const std::string & get_attrib(const std::string &name) const
Retrieve the value of an attribute.
bool has_attrib(const std::string &name) const
Test for presence of an attribute with a given name.
◆ has_attribute()
◆ idd_end()
◆ idd_start()
Reimplemented from IdDictParserNS::IdDictBaseFactory.
Definition at line 263 of file IdDictParser.cxx.
263 {
266 std::cout << "AltRegionsFactory::idd_start>" << std::endl;
267 }
268 auto altregions = std::make_unique<IdDictAltRegions>();
271 std::cout <<
"AltRegionsFactory::idd_start> previous=" <<
parser.m_altregions.get()
272 << " new=" << altregions.get()
273 << std::endl;
274 }
275 parser.m_altregions = std::move(altregions);
276}
◆ start()
Definition at line 42 of file XMLCoreParser.cxx.
42 {
43 if (XMLCoreParserDebugger::debug ()){
44 std::cout << "XMLCoreFactory::start> factory=" << this << std::endl;
45 }
47}
virtual void do_start(XMLCoreParser &parser, const XMLCoreNode &node)
◆ m_xmlelementname
| std::string XMLCoreFactory::m_xmlelementname |
|
protectedinherited |
The documentation for this class was generated from the following file: