libzypp  10.5.0
ParseDefTraits.h
Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #ifndef ZYPP_PARSER_XML_PARSEDEFTRAITS_H
00013 #define ZYPP_PARSER_XML_PARSEDEFTRAITS_H
00014 
00015 #include "zypp/Bit.h"
00016 
00018 namespace zypp
00019 { 
00020 
00021   namespace xml
00022   { 
00023 
00025     //
00026     //  CLASS NAME : ParseDefTraits
00027     //
00029     struct ParseDefTraits
00030     {
00031       typedef unsigned char                              ModeBitsType;
00032       typedef bit::BitField<ModeBitsType>                ModeBits;
00033       typedef bit::Range<ModeBitsType, 0,             1> TypeBits;
00034       typedef bit::Range<ModeBitsType, TypeBits::end, 1> VisitBits;
00035 
00036       enum TypeValue
00037         {
00038           BIT_OPTIONAL  = bit::RangeValue<TypeBits,0>::value,
00039           BIT_MANDTAORY = bit::RangeValue<TypeBits,1>::value
00040         };
00041 
00042       enum VisitValue
00043         {
00044           BIT_ONCE      = bit::RangeValue<VisitBits,0>::value,
00045           BIT_MULTIPLE  = bit::RangeValue<VisitBits,1>::value
00046         };
00047     };
00049 
00051   } // namespace xml
00054 } // namespace zypp
00056 #endif // ZYPP_PARSER_XML_PARSEDEFTRAITS_H