// file : cult/cli/options.hxx // author : Boris Kolpackov // copyright : Copyright (c) 2005-2010 Boris Kolpackov // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #ifndef CULT_CLI_OPTIONS_HXX #define CULT_CLI_OPTIONS_HXX #include #include namespace Cult { namespace CLI { namespace Bits { template struct if_; template struct if_ { typedef X Type; }; template struct if_ { typedef Y Type; }; template struct same { static Boolean const r = false; }; template struct same { static Boolean const r = true; }; template struct Tag { }; //@@ should end up in Cult::Meta // struct Null {}; extern Char const null[]; #include } template class Options { typedef Bits::Mapper Mapper; public: Options () : i01_ (), i02_ (), i03_ (), i04_ (), i05_ (), i06_ (), i07_ (), i08_ (), i09_ (), i10_ (), i11_ (), i12_ (), i13_ (), i14_ (), i15_ (), i16_ (), i17_ (), i18_ (), i19_ (), i20_ (), i21_ (), i22_ (), i23_ (), i24_ (), i25_ (), i26_ (), i27_ (), i28_ (), i29_ (), i30_ (), i31_ (), i32_ (), i33_ (), i34_ (), i35_ (), i36_ (), i37_ (), i38_ (), i39_ (), i40_ (), i41_ (), i42_ (), i43_ (), i44_ (), i45_ (), i46_ (), i47_ (), i48_ (), i49_ (), i50_ (), i51_ (), i52_ (), i53_ (), i54_ (), i55_ (), i56_ (), i57_ (), i58_ (), i59_ (), i60_ (), i61_ (), i62_ (), i63_ (), i64_ (), i65_ (), i66_ (), i67_ (), i68_ (), i69_ (), i70_ (), i71_ (), i72_ (), i73_ (), i74_ (), i75_ (), i76_ (), i77_ (), i78_ (), i79_ (), i80_ (), i81_ (), i82_ (), i83_ (), i84_ (), i85_ (), i86_ (), i87_ (), i88_ (), i89_ (), i90_ (), i91_ (), i92_ (), i93_ (), i94_ (), i95_ (), i96_ (), i97_ (), i98_ (), i99_ (), i100_ () { } template typename Mapper::template Selector::Type& value () { typedef typename Mapper::template Selector::Type Type; return *reinterpret_cast (value (k)); } template typename Mapper::template Selector::Type const& value () const { typedef typename Mapper::template Selector::Type Type; return *reinterpret_cast (value (k)); } private: Void* value (Char const*) const; private: T01 i01_; T02 i02_; T03 i03_; T04 i04_; T05 i05_; T06 i06_; T07 i07_; T08 i08_; T09 i09_; T10 i10_; T11 i11_; T12 i12_; T13 i13_; T14 i14_; T15 i15_; T16 i16_; T17 i17_; T18 i18_; T19 i19_; T20 i20_; T21 i21_; T22 i22_; T23 i23_; T24 i24_; T25 i25_; T26 i26_; T27 i27_; T28 i28_; T29 i29_; T30 i30_; T31 i31_; T32 i32_; T33 i33_; T34 i34_; T35 i35_; T36 i36_; T37 i37_; T38 i38_; T39 i39_; T40 i40_; T41 i41_; T42 i42_; T43 i43_; T44 i44_; T45 i45_; T46 i46_; T47 i47_; T48 i48_; T49 i49_; T50 i50_; T51 i51_; T52 i52_; T53 i53_; T54 i54_; T55 i55_; T56 i56_; T57 i57_; T58 i58_; T59 i59_; T60 i60_; T61 i61_; T62 i62_; T63 i63_; T64 i64_; T65 i65_; T66 i66_; T67 i67_; T68 i68_; T69 i69_; T70 i70_; T71 i71_; T72 i72_; T73 i73_; T74 i74_; T75 i75_; T76 i76_; T77 i77_; T78 i78_; T79 i79_; T80 i80_; T81 i81_; T82 i82_; T83 i83_; T84 i84_; T85 i85_; T86 i86_; T87 i87_; T88 i88_; T89 i89_; T90 i90_; T91 i91_; T92 i92_; T93 i93_; T94 i94_; T95 i95_; T96 i96_; T97 i97_; T98 i98_; T99 i99_; T100 i100_; }; } } #include #include #endif // CULT_CLI_OPTIONS_HXX