libzypp: zypp/parser/xml/ParseDef.cc Source File

libzypp 17.38.8

ParseDef.cc
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12#include <iostream>
13#include <sstream>
14#include <string>
15#include <map>
16
17#include <zypp-core/base/Logger.h>
18#include <zypp-core/base/String.h>
19#include <utility>
20#include <zypp-core/base/DtorReset>
21#include <zypp-core/base/DefaultIntegral>
22
23#include <zypp/parser/xml/ParseDef.h>
24#include <zypp/parser/xml/ParseDefException.h>
25#include <zypp/parser/xml/ParseDefConsume.h>
26#include <zypp/parser/xml/Reader.h>
27
28using std::endl;
29
31namespace zypp
32{
34 namespace xml
35 {
36
38 //
39 // CLASS NAME : ParseDefImplConsume
40 //
42 struct ParseDefImplConsume : public ParseDefConsumeRedirect
43 {
44 void start( const Node & node_r ) override
45 {
46 debuglog( "START ", node_r );
47 ParseDefConsumeRedirect::start( node_r );
48 }
49
50 void text( const Node & node_r ) override
51 {
52 debuglog( "TEXT ", node_r );
53 ParseDefConsumeRedirect::text( node_r );
54 }
55
56 void cdata( const Node & node_r ) override
57 {
58 debuglog( "CDATA ", node_r );
59 ParseDefConsumeRedirect::cdata( node_r );
60 }
61
62 void done( const Node & node_r ) override
63 {
64 debuglog( "DONE ", node_r );
65 ParseDefConsumeRedirect::done( node_r );
66 }
67
68 void startSubnode( const Node & node_r ) override
69 {
70 debuglog( "---> ", node_r );
71 ParseDefConsumeRedirect::startSubnode( node_r );
72 }
73
74 void doneSubnode( const Node & node_r ) override
75 {
76 debuglog( "<--- ", node_r );
77 ParseDefConsumeRedirect::doneSubnode( node_r );
78 }
79
80 void debuglog( const char *const tag_r, const Node & node_r )
81 {
82 if ( ParseDef::_debug )
83 DBG << tag_r << node_r << endl;
84 }
85 };
86
87
89 //
90 // CLASS NAME : ParseDef::Impl
91 //
95 class ParseDef::Impl
96 {
97 friend std::ostream & operator<<( std::ostream & str, const ParseDef::Impl & obj );
98 public:
99 using ImplPtr = shared_ptr<Impl>;
100 using SubNodes = std::map<std::string, ImplPtr>;
101
102 public:
103 Impl(std::string &&name_r, Mode mode_r,
104 shared_ptr<ParseDefConsume> &&target_r =
105 shared_ptr<ParseDefConsume>())
106 : _name(std::move(name_r)), _mode(mode_r), _parent(NULL) {
107 if ( target_r )
108 _callback.setRedirect( std::move(target_r) );
109 }
110
111 Impl(const Impl &) = default;
112 Impl(Impl &&) = delete;
113 Impl &operator=(const Impl &) = delete;
114 Impl &operator=(Impl &&) = delete;
115
116 ~Impl()
117 {
118 for ( SubNodes::iterator it = _subnodes.begin(); it != _subnodes.end(); ++it )
119 {
120 it->second->_parent = NULL;
121 }
122 }
123
124 bool isOptional() const
125 { return Traits::ModeBits(_mode).isEqual<Traits::TypeBits>( Traits::BIT_OPTIONAL ); }
126
127 bool isMandatory() const
128 { return Traits::ModeBits(_mode).isEqual<Traits::TypeBits>( Traits::BIT_MANDTAORY ); }
129
130 bool singleDef() const
131 { return Traits::ModeBits(_mode).isEqual<Traits::VisitBits>( Traits::BIT_ONCE ); }
132
133 bool multiDef() const
134 { return Traits::ModeBits(_mode).isEqual<Traits::VisitBits>( Traits::BIT_MULTIPLE ); }
135
136 public:
137 void addNode( const ImplPtr & subnode_r );
138
139 ImplPtr getNode( const std::string & name_r ) const
140 {
141 SubNodes::const_iterator it = _subnodes.find( name_r );
142 if ( it != _subnodes.end() )
143 return it->second;
144 return ImplPtr();
145 }
146
147 void take( Reader & reader_r );
148
149 private:
158 bool skipNode( Reader & reader_r );
159
160 std::string exstr( const std::string & what_r, const Impl & impl_r ) const
161 {
162 std::ostringstream str;
163 str << impl_r << ": " << what_r;
164 return str.str();
165 }
166 std::string exstr( const std::string & what_r, const Impl & impl_r, const Reader & reader_r ) const
167 {
168 std::ostringstream str;
169 str << impl_r << ": " << what_r << " |reading " << *reader_r;
170 return str.str();
171 }
172
173 public:
174 std::string _name;
175 Mode _mode;
176 DefaultIntegral<unsigned,0> _visited;
177
178 Impl * _parent;
179 SubNodes _subnodes;
180 ParseDefImplConsume _callback;
181
182 DefaultIntegral<int,-1> _parseDepth;
183 };
184
185
187 //
188 // METHOD NAME : ParseDef::Impl::addNode
189 // METHOD TYPE : void
190 //
191 void ParseDef::Impl::addNode( const ImplPtr & subnode_r )
192 {
193 std::pair<SubNodes::iterator, bool> res
194 = _subnodes.insert( std::make_pair( subnode_r->_name, subnode_r ) );
195
196 if ( ! res.second )
197 {
198 ZYPP_THROW( ParseDefBuildException( exstr("Multiple definiton of subnode "+subnode_r->_name, *this) ) );
199 }
200 if ( res.first->second->_parent )
201 {
202 ZYPP_THROW( ParseDefBuildException( exstr("Can not reparent subnode "+subnode_r->_name, *this) ) );
203 }
204 res.first->second->_parent = this;
205 }
206
208 //
209 // METHOD NAME : ParseDef::Impl::take
210 // METHOD TYPE : void
211 //
212 void ParseDef::Impl::take( Reader & reader_r )
213 {
214 if ( reader_r->nodeType() != XML_READER_TYPE_ELEMENT )
215 {
216 if ( reader_r->depth() == 0 )
217 {
218 // on the very first level we skip any initial whitespace and comments...
219 do {
220 // advance to next node
221 if ( ! reader_r.nextNode() )
222 {
223 ZYPP_THROW( ParseDefValidateException( exstr( "Unexpected EOF ", *this ) ) );
224 }
225 } while( reader_r->nodeType() != XML_READER_TYPE_ELEMENT );
226 }
227 else
228 {
229 ZYPP_THROW( ParseDefValidateException( exstr("Expected ELEMENT", *this, reader_r) ) );
230 }
231 }
232 if ( reader_r->name() != _name )
233 {
234 ZYPP_THROW( ParseDefValidateException( exstr("Wrong ELEMENT name", *this, reader_r) ) );
235 }
236 if ( _visited >= 1 && ! multiDef() )
237 {
238 ZYPP_THROW( ParseDefValidateException( exstr("Multiple definitions", *this, reader_r) ) );
239 }
240
241 ++_visited; // Accepted to parse
242 DtorReset x( _parseDepth, -1 );
243 _parseDepth = reader_r->depth();
244
245 // Parse attributes
246 _callback.start( *reader_r );
247
248 // Get content up to end node
249 // Empty element (<node />) has no separate end node, so
250 // there's nothing to parse.
251 if ( ! reader_r->isEmptyElement() )
252 {
253 // For non empty elements (<node></node>) parse known nodes
254 // text and cdata elelments skip unknown nodes.
255 for ( bool done = false; ! done ; /*advance in inside loop*/)
256 {
257 // advance to next node
258 if ( ! reader_r.nextNode() )
259 {
260 ZYPP_THROW( ParseDefValidateException( exstr( "Unexpected EOF ", *this ) ) );
261 }
262
263 switch ( reader_r->nodeType() )
264 {
265 case XML_READER_TYPE_ELEMENT:
266 // Parse or skip unknown. Anyway reader is located at the
267 // corresponding end node, or an exception was thrown.
268 {
269 ImplPtr sub( getNode( reader_r->name().asString() ) );
270 if ( sub )
271 {
272 _callback.startSubnode( *reader_r );
273 sub->take( reader_r );
274 _callback.doneSubnode( *reader_r );
275 }
276 else
277 {
278 if ( ParseDef::_debug )
279 WAR << "Skip unknown node " << *reader_r << " in "<< *this << endl;
280 skipNode( reader_r );
281 }
282 }
283 break;
284
285 case XML_READER_TYPE_END_ELEMENT:
286 // This must be the corresponding end node!
287 if ( reader_r->depth() == _parseDepth
288 && reader_r->name() == _name )
289 {
290 done = true;
291 }
292 else
293 {
294 ZYPP_THROW( ParseDefValidateException( exstr("unexpected END_ELEMENT name", *this, reader_r) ) );
295 }
296 break;
297
298 case XML_READER_TYPE_TEXT:
299 // collect or skip
300 _callback.text( *reader_r );
301 break;
302
303 case XML_READER_TYPE_CDATA:
304 // collect or skip
305 _callback.cdata( *reader_r );
306 break;
307
308 default:
309 //DBG << exstr("SKIP ", *this, reader_r) << endl;
310 break;
311 }
312 }
313 }
314
315 // Parsing complete. Check whether all mandatory nodes were
316 // present. Finally position behind the end node.
317 for ( SubNodes::iterator it = _subnodes.begin(); it != _subnodes.end(); ++it )
318 {
319 if ( ! it->second->_visited && it->second->isMandatory() )
320 {
321 ZYPP_THROW( ParseDefValidateException( exstr("Mandatory ELEMENT missing", *(it->second), reader_r) ) );
322 }
323 it->second->_visited = 0; // reset to be ready for an other visit to this!!
324 }
325
326 _callback.done( *reader_r );
327 }
328
330 //
331 // METHOD NAME : ParseDef::Impl::skipNode
332 // METHOD TYPE : void
333 //
334 bool ParseDef::Impl::skipNode( xml::Reader & reader_r )
335 {
336 if ( ! reader_r.seekToEndNode( reader_r->depth(),
337 reader_r->name().asString() ) )
338 {
339 ZYPP_THROW( ParseDefValidateException
340 ( exstr( str::form( "EOF while looking for [%d] <\\%s>",
341 reader_r->depth(),
342 reader_r->name().c_str() ),
343 *this ) ) );
344 }
345 return true;
346 }
347
348 /******************************************************************
349 **
350 ** FUNCTION NAME : operator<<
351 ** FUNCTION TYPE : std::ostream &
352 */
353 std::ostream & operator<<( std::ostream & str, const ParseDef::Impl & obj )
354 {
355 return str << "ParseDef(" << obj._name
356 << ", " << obj._mode
357 << ", visits " << obj._visited
358 << ")";
359 }
360
362 //
363 // CLASS NAME : ParseDef
364 //
366
367 bool ParseDef::_debug = false;
368
370 //
371 // METHOD NAME : ParseDef::ParseDef
372 // METHOD TYPE : Ctor
373 //
374 ParseDef::ParseDef( std::string name_r, Mode mode_r )
375 : _pimpl( new Impl( std::move(name_r), mode_r ) )
376 {}
377
378 ParseDef::ParseDef( std::string name_r, Mode mode_r, shared_ptr<ParseDefConsume> target_r )
379 : _pimpl( new Impl( std::move(name_r), mode_r, std::move(target_r) ) )
380 {}
381
382 ParseDef::ParseDef( const shared_ptr<Impl> & pimpl_r )
383 : _pimpl( pimpl_r )
384 {}
385
387 //
388 // METHOD NAME : ParseDef::~ParseDef
389 // METHOD TYPE : Dtor
390 //
391 ParseDef::~ParseDef()
392 {}
393
394 const std::string & ParseDef::name() const
395 { return _pimpl->_name; }
396
397 ParseDef::Mode ParseDef::mode() const
398 { return _pimpl->_mode; }
399
400 bool ParseDef::isOptional() const
401 { return _pimpl->isOptional(); }
402
403 bool ParseDef::isMandatory() const
404 { return _pimpl->isMandatory(); }
405
406 bool ParseDef::singleDef() const
407 { return _pimpl->singleDef(); }
408
409 bool ParseDef::multiDef() const
410 { return _pimpl->multiDef(); }
411
412 unsigned ParseDef::visited() const
413 { return _pimpl->_visited; }
414
415 ParseDef & ParseDef::addNode( ParseDef & subnode_r )
416 { _pimpl->addNode( subnode_r._pimpl.getPtr() ); return *this; }
417
418 ParseDef ParseDef::operator[]( const std::string & name_r )
419 {
420 shared_ptr<Impl> retimpl( _pimpl->getNode( name_r ) );
421 if ( ! retimpl )
422 {
423 ZYPP_THROW( ParseDefBuildException( "No subnode "+name_r ) );
424 }
425 return retimpl;
426 }
427
428 void ParseDef::setConsumer( const shared_ptr<ParseDefConsume> & target_r )
429 { _pimpl->_callback.setRedirect( target_r ); }
430
431 void ParseDef::setConsumer( ParseDefConsume * allocatedTarget_r )
432 { _pimpl->_callback.setRedirect( allocatedTarget_r ); }
433
434 void ParseDef::setConsumer( ParseDefConsume & target_r )
435 { _pimpl->_callback.setRedirect( target_r ); }
436
437 void ParseDef::cancelConsumer()
438 { _pimpl->_callback.cancelRedirect(); }
439
440 shared_ptr<ParseDefConsume> ParseDef::getConsumer() const
441 { return _pimpl->_callback.getRedirect(); }
442
443
444 void ParseDef::take( Reader & reader_r )
445 { _pimpl->take( reader_r ); }
446
447 /******************************************************************
448 **
449 ** FUNCTION NAME : operator<<
450 ** FUNCTION TYPE : std::ostream &
451 */
452 std::ostream & operator<<( std::ostream & str, ParseDef::Mode obj )
453 {
454 switch ( obj )
455 {
456#define X(T) case ParseDef::T: return str << #T
457 X(OPTIONAL);
458 X(MANDTAORY);
459 X(MULTIPLE_OPTIONAL);
460 X(MULTIPLE_MANDTAORY);
461#undef X
462 }
463 return str;
464 }
465
466 /******************************************************************
467 **
468 ** FUNCTION NAME : operator<<
469 ** FUNCTION TYPE : std::ostream &
470 */
471 std::ostream & operator<<( std::ostream & str, const ParseDef & obj )
472 {
473 return str << obj._pimpl;
474 }
475
477 } // namespace xml
480} // namespace zypp
ZYPP_THROW
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.
Definition Exception.h:459
Logger.h
DBG
#define DBG
Definition Logger.h:102
WAR
#define WAR
Definition Logger.h:104
ParseDefConsume.h
ParseDefException.h
ParseDef.h
Reader.h
String.h
shared_ptr
zypp::DefaultIntegral
Integral type with defined initial value when default constructed.
Definition defaultintegral.h:42
zypp::DtorReset
Assign a vaiable a certain value when going out of scope.
Definition dtorreset.h:50
zypp::bit::BitField::isEqual
bool isEqual(TInt rhs) const
Test for equal value within a Range.
Definition Bit.h:215
zypp::xml::Node
xmlTextReader based interface to Reader's current node.
Definition Node.h:36
zypp::xml::Node::depth
int depth() const
The depth of the node in the tree.
Definition Node.h:62
zypp::xml::Node::nodeType
NodeType nodeType() const
Get the node type of the current node.
Definition Node.h:126
zypp::xml::Node::isEmptyElement
int isEmptyElement() const
Check if the current node is empty.
Definition Node.h:101
zypp::xml::Node::name
XmlString name() const
The qualified name of the node, equal to Prefix :LocalName.
Definition Node.h:118
zypp::xml::ParseDefConsumeRedirect::text
void text(const Node &_node) override
Definition ParseDefConsume.cc:93
zypp::xml::ParseDefConsumeRedirect::cdata
void cdata(const Node &_node) override
Definition ParseDefConsume.cc:99
zypp::xml::ParseDefConsumeRedirect::startSubnode
void startSubnode(const Node &_node) override
Definition ParseDefConsume.cc:111
zypp::xml::ParseDefConsumeRedirect::ParseDefConsumeRedirect
ParseDefConsumeRedirect()
Definition ParseDefConsume.cc:54
zypp::xml::ParseDefConsumeRedirect::doneSubnode
void doneSubnode(const Node &_node) override
Definition ParseDefConsume.cc:117
zypp::xml::ParseDefConsumeRedirect::done
void done(const Node &_node) override
Definition ParseDefConsume.cc:105
zypp::xml::ParseDefConsumeRedirect::start
void start(const Node &_node) override
Definition ParseDefConsume.cc:87
zypp::xml::ParseDef::Impl
ParseDef implementation.
Definition ParseDef.cc:96
zypp::xml::ParseDef::Impl::isOptional
bool isOptional() const
Definition ParseDef.cc:124
zypp::xml::ParseDef::Impl::skipNode
bool skipNode(Reader &reader_r)
Skip the current node.
Definition ParseDef.cc:334
zypp::xml::ParseDef::Impl::take
void take(Reader &reader_r)
Definition ParseDef.cc:212
zypp::xml::ParseDef::Impl::Impl
Impl(std::string &&name_r, Mode mode_r, shared_ptr< ParseDefConsume > &&target_r=shared_ptr< ParseDefConsume >())
Definition ParseDef.cc:103
zypp::xml::ParseDef::Impl::_mode
Mode _mode
Definition ParseDef.cc:175
zypp::xml::ParseDef::Impl::_parseDepth
DefaultIntegral< int,-1 > _parseDepth
Definition ParseDef.cc:182
zypp::xml::ParseDef::Impl::exstr
std::string exstr(const std::string &what_r, const Impl &impl_r) const
Definition ParseDef.cc:160
zypp::xml::ParseDef::Impl::Impl
Impl(const Impl &)=default
zypp::xml::ParseDef::Impl::SubNodes
std::map< std::string, ImplPtr > SubNodes
Definition ParseDef.cc:100
zypp::xml::ParseDef::Impl::getNode
ImplPtr getNode(const std::string &name_r) const
Definition ParseDef.cc:139
zypp::xml::ParseDef::Impl::multiDef
bool multiDef() const
Definition ParseDef.cc:133
zypp::xml::ParseDef::Impl::_callback
ParseDefImplConsume _callback
Definition ParseDef.cc:180
zypp::xml::ParseDef::Impl::addNode
void addNode(const ImplPtr &subnode_r)
Definition ParseDef.cc:191
zypp::xml::ParseDef::Impl::ImplPtr
shared_ptr< Impl > ImplPtr
Definition ParseDef.cc:99
zypp::xml::ParseDef::Impl::Impl
Impl(Impl &&)=delete
zypp::xml::ParseDef::Impl::_parent
Impl * _parent
Definition ParseDef.cc:178
zypp::xml::ParseDef::Impl::~Impl
~Impl()
Definition ParseDef.cc:116
zypp::xml::ParseDef::Impl::_visited
DefaultIntegral< unsigned, 0 > _visited
Definition ParseDef.cc:176
zypp::xml::ParseDef::Impl::isMandatory
bool isMandatory() const
Definition ParseDef.cc:127
zypp::xml::ParseDef::Impl::operator=
Impl & operator=(const Impl &)=delete
zypp::xml::ParseDef::Impl::operator<<
friend std::ostream & operator<<(std::ostream &str, const ParseDef::Impl &obj)
Definition ParseDef.cc:353
zypp::xml::ParseDef::Impl::operator=
Impl & operator=(Impl &&)=delete
zypp::xml::ParseDef::Impl::singleDef
bool singleDef() const
Definition ParseDef.cc:130
zypp::xml::ParseDef::Impl::_subnodes
SubNodes _subnodes
Definition ParseDef.cc:179
zypp::xml::ParseDef::Impl::_name
std::string _name
Definition ParseDef.cc:174
zypp::xml::ParseDef::Impl::exstr
std::string exstr(const std::string &what_r, const Impl &impl_r, const Reader &reader_r) const
Definition ParseDef.cc:166
zypp::xml::ParseDef::setConsumer
void setConsumer(const shared_ptr< ParseDefConsume > &target_r)
Set data consumer.
Definition ParseDef.cc:428
zypp::xml::ParseDef::name
const std::string & name() const
Definition ParseDef.cc:394
zypp::xml::ParseDef::~ParseDef
virtual ~ParseDef()
Definition ParseDef.cc:391
zypp::xml::ParseDef::ParseDef
ParseDef(std::string name_r, Mode mode_r)
Definition ParseDef.cc:374
zypp::xml::ParseDef::Mode
Mode
Definition ParseDef.h:134
zypp::xml::ParseDef::cancelConsumer
void cancelConsumer()
Unset data consumer.
Definition ParseDef.cc:437
zypp::xml::ParseDef::singleDef
bool singleDef() const
Definition ParseDef.cc:406
zypp::xml::ParseDef::_pimpl
RW_pointer< Impl > _pimpl
Pointer to implementation (shared!).
Definition ParseDef.h:222
zypp::xml::ParseDef::addNode
ParseDef & addNode(ParseDef &subnode_r)
Add subnode definition.
Definition ParseDef.cc:415
zypp::xml::ParseDef::getConsumer
shared_ptr< ParseDefConsume > getConsumer() const
Get data consumer.
Definition ParseDef.cc:440
zypp::xml::ParseDef::operator<<
friend std::ostream & operator<<(std::ostream &str, const ParseDef &obj)
relates: ParseDef Stream output.
Definition ParseDef.cc:471
zypp::xml::ParseDef::isOptional
bool isOptional() const
Definition ParseDef.cc:400
zypp::xml::ParseDef::operator[]
ParseDef operator[](const std::string &name_r)
Get subnode by name.
Definition ParseDef.cc:418
zypp::xml::ParseDef::multiDef
bool multiDef() const
Definition ParseDef.cc:409
zypp::xml::ParseDef::take
void take(Reader &reader_r)
Parse the node.
Definition ParseDef.cc:444
zypp::xml::ParseDef::visited
unsigned visited() const
Definition ParseDef.cc:412
zypp::xml::ParseDef::_debug
static bool _debug
Definition ParseDef.h:229
zypp::xml::ParseDef::isMandatory
bool isMandatory() const
Definition ParseDef.cc:403
zypp::xml::ParseDef::mode
Mode mode() const
Definition ParseDef.cc:397
zypp::xml::Reader
xmlTextReader based interface to iterate xml streams.
Definition Reader.h:96
zypp::xml::Reader::seekToEndNode
bool seekToEndNode(int depth_r, const std::string &name_r)
Definition Reader.cc:214
zypp::xml::Reader::nextNode
bool nextNode()
Definition Reader.cc:142
zypp::xml::XmlString::asString
std::string asString() const
Explicit conversion to std::string.
Definition XmlString.h:77
zypp::xml::XmlString::c_str
const char * c_str() const
Explicit conversion to const char *.
Definition XmlString.h:73
X
#define X(T)
std
Definition ansi.h:855
str
String related utilities and Regular expression matching.
zypp::str::form
std::string form(const char *format,...) __attribute__((format(printf
Printf style construction of std::string.
Definition String.cc:39
zypp::xml
Definition libxmlfwd.cc:22
zypp::xml::operator<<
std::ostream & operator<<(std::ostream &str, const ReadState &obj)
relates: ReadState Stream output.
Definition libxmlfwd.cc:29
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition CodePitfalls.doc:2
zypp::RW_pointer::getPtr
constPtrType getPtr() const
Definition PtrTypes.h:359
zypp::xml::ParseDefBuildException
Exceptions when building a ParseDef tree.
Definition ParseDefException.h:43
zypp::xml::ParseDefConsume
Base class for ParseDef consumer.
Definition ParseDefConsume.h:40
zypp::xml::ParseDefImplConsume
Definition ParseDef.cc:43
zypp::xml::ParseDefImplConsume::done
void done(const Node &node_r) override
Definition ParseDef.cc:62
zypp::xml::ParseDefImplConsume::doneSubnode
void doneSubnode(const Node &node_r) override
Definition ParseDef.cc:74
zypp::xml::ParseDefImplConsume::startSubnode
void startSubnode(const Node &node_r) override
Definition ParseDef.cc:68
zypp::xml::ParseDefImplConsume::debuglog
void debuglog(const char *const tag_r, const Node &node_r)
Definition ParseDef.cc:80
zypp::xml::ParseDefImplConsume::cdata
void cdata(const Node &node_r) override
Definition ParseDef.cc:56
zypp::xml::ParseDefImplConsume::start
void start(const Node &node_r) override
Definition ParseDef.cc:44
zypp::xml::ParseDefImplConsume::text
void text(const Node &node_r) override
Definition ParseDef.cc:50
zypp::xml::ParseDefTraits::TypeBits
bit::Range< ModeBitsType, 0, 1 > TypeBits
Definition ParseDefTraits.h:33
zypp::xml::ParseDefTraits::BIT_MULTIPLE
@ BIT_MULTIPLE
Definition ParseDefTraits.h:45
zypp::xml::ParseDefTraits::BIT_ONCE
@ BIT_ONCE
Definition ParseDefTraits.h:44
zypp::xml::ParseDefTraits::ModeBits
bit::BitField< ModeBitsType > ModeBits
Definition ParseDefTraits.h:32
zypp::xml::ParseDefTraits::VisitBits
bit::Range< ModeBitsType, TypeBits::end, 1 > VisitBits
Definition ParseDefTraits.h:34
zypp::xml::ParseDefTraits::BIT_MANDTAORY
@ BIT_MANDTAORY
Definition ParseDefTraits.h:39
zypp::xml::ParseDefTraits::BIT_OPTIONAL
@ BIT_OPTIONAL
Definition ParseDefTraits.h:38
zypp::xml::ParseDefValidateException
Parse exceptions related to the documents node structure.
Definition ParseDefException.h:54