libzypp 17.37.10

ParseDefTraits.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12#ifndef ZYPP_PARSER_XML_PARSEDEFTRAITS_H
13#define ZYPP_PARSER_XML_PARSEDEFTRAITS_H
14
15#include <zypp/Bit.h>
16
18 namespace zypp
19{
21 namespace xml
22 {
23
25 //
26 // CLASS NAME : ParseDefTraits
27 //
29 struct ParseDefTraits
30 {
31 using ModeBitsType = unsigned char;
32 using ModeBits = bit::BitField<ModeBitsType>;
33 using TypeBits = bit::Range<ModeBitsType, 0, 1>;
34 using VisitBits = bit::Range<ModeBitsType, TypeBits::end, 1>;
35
36 enum TypeValue
37 {
38 BIT_OPTIONAL = bit::RangeValue<TypeBits,0>::value,
39 BIT_MANDTAORY = bit::RangeValue<TypeBits,1>::value
40 };
41
42 enum VisitValue
43 {
44 BIT_ONCE = bit::RangeValue<VisitBits,0>::value,
45 BIT_MULTIPLE = bit::RangeValue<VisitBits,1>::value
46 };
47 };
48
49
51 } // namespace xml
54} // namespace zypp
56#endif // ZYPP_PARSER_XML_PARSEDEFTRAITS_H
Bit.h
zypp::bit::BitField
An integral type used as BitField.
Definition Bit.h:160
zypp::xml
Definition libxmlfwd.cc:22
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition Application.cc:20
zypp::bit::RangeValue::value
static const IntT value
Definition Bit.h:115
zypp::bit::Range
Range of bits starting at bit _begin with length _size.
Definition Bit.h:82
zypp::xml::ParseDefTraits
Definition ParseDefTraits.h:30
zypp::xml::ParseDefTraits::TypeBits
bit::Range< ModeBitsType, 0, 1 > TypeBits
Definition ParseDefTraits.h:33
zypp::xml::ParseDefTraits::VisitValue
VisitValue
Definition ParseDefTraits.h:43
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::ModeBitsType
unsigned char ModeBitsType
Definition ParseDefTraits.h:31
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::TypeValue
TypeValue
Definition ParseDefTraits.h:37
zypp::xml::ParseDefTraits::BIT_MANDTAORY
@ BIT_MANDTAORY
Definition ParseDefTraits.h:39
zypp::xml::ParseDefTraits::BIT_OPTIONAL
@ BIT_OPTIONAL
Definition ParseDefTraits.h:38