#include <cvariant.h>


Definition at line 33 of file cvariant.h.
| TypeNone | |
| TypeBit8 | |
| TypeUBit8 | |
| TypeBit16 | |
| TypeUBit16 | |
| TypeBit32 | |
| TypeUBit32 | |
| TypeBit64 | |
| TypeUBit64 | |
| TypeReal | |
| TypeString |
Definition at line 37 of file cvariant.h.
00038 { 00039 TypeNone = 0, 00040 TypeBit8, 00041 TypeUBit8, 00042 TypeBit16, 00043 TypeUBit16, 00044 TypeBit32, 00045 TypeUBit32, 00046 TypeBit64, 00047 TypeUBit64, 00048 TypeReal, 00049 TypeString, 00050 } tDataType;
| PikeAero::CVariant::CVariant | ( | CMachine::bit8 | v | ) | [inline] |
Definition at line 52 of file cvariant.h.
References fromBit8(), and initialize().
00052 { initialize(); fromBit8( v ); }

| PikeAero::CVariant::CVariant | ( | CMachine::ubit8 | v | ) | [inline] |
Definition at line 53 of file cvariant.h.
References fromUBit8(), and initialize().
00053 { initialize(); fromUBit8( v ); }

| PikeAero::CVariant::CVariant | ( | CMachine::bit16 | v | ) | [inline] |
Definition at line 54 of file cvariant.h.
References fromBit16(), and initialize().
00054 { initialize(); fromBit16( v ); }

| PikeAero::CVariant::CVariant | ( | CMachine::ubit16 | v | ) | [inline] |
Definition at line 55 of file cvariant.h.
References fromUBit16(), and initialize().
00055 { initialize(); fromUBit16( v ); }

| PikeAero::CVariant::CVariant | ( | CMachine::bit32 | v | ) | [inline] |
Definition at line 56 of file cvariant.h.
References fromBit32(), and initialize().
00056 { initialize(); fromBit32( v ); }

| PikeAero::CVariant::CVariant | ( | CMachine::ubit32 | v | ) | [inline] |
Definition at line 57 of file cvariant.h.
References fromUBit32(), and initialize().
00057 { initialize(); fromUBit32( v ); }

| PikeAero::CVariant::CVariant | ( | CMachine::bit64 | v | ) | [inline] |
Definition at line 58 of file cvariant.h.
References fromBit64(), and initialize().
00058 { initialize(); fromBit64( v ); }

| PikeAero::CVariant::CVariant | ( | CMachine::ubit64 | v | ) | [inline] |
Definition at line 59 of file cvariant.h.
References fromUBit64(), and initialize().
00059 { initialize(); fromUBit64( v ); }

| PikeAero::CVariant::CVariant | ( | CMachine::real | v | ) | [inline] |
Definition at line 60 of file cvariant.h.
References fromReal(), and initialize().
00060 { initialize(); fromReal( v ); }

| PikeAero::CVariant::CVariant | ( | CString & | v | ) | [inline] |
Definition at line 61 of file cvariant.h.
References fromString(), and initialize().
00061 { initialize(); fromString( v ); }

| PikeAero::CVariant::~CVariant | ( | ) | [virtual] |
| CMachine::bit32 PikeAero::CVariant::compare | ( | CVariant & | other | ) | [private] |
Definition at line 82 of file cvariant.cpp.
References mDataType, toBit64(), toReal(), TypeReal, and TypeString.
Referenced by operator!=(), operator<(), operator<=(), operator==(), operator>(), and operator>=().
00083 { 00084 if ( mDataType == TypeString || mDataType == TypeReal ) 00085 { 00086 CMachine::real v = toReal() - other.toReal(); 00087 if ( v == 0.0 ) return 0; 00088 if ( v > 0 ) return 1; 00089 if ( v < 0 ) return -1; 00090 } 00091 return static_cast<CMachine::bit32>( toBit64() - other.toBit64() ); 00092 }


Definition at line 45 of file cvariant.cpp.
References mBit16, mBit32, mBit64, mBit8, mReal, mString, mUBit16, mUBit32, mUBit64, mUBit8, toBit16(), toBit32(), toBit64(), toBit8(), toReal(), toString(), toUBit16(), toUBit32(), toUBit64(), toUBit8(), type(), TypeBit16, TypeBit32, TypeBit64, TypeBit8, TypeReal, TypeString, TypeUBit16, TypeUBit32, TypeUBit64, and TypeUBit8.
Referenced by operator=().
00046 { 00047 switch( other.type() ) 00048 { 00049 TypeBit8: 00050 mBit8 = other.toBit8(); 00051 break; 00052 TypeUBit8: 00053 mUBit8 = other.toUBit8(); 00054 break; 00055 TypeBit16: 00056 mBit16 = other.toBit16(); 00057 break; 00058 TypeUBit16: 00059 mUBit16 = other.toUBit16(); 00060 break; 00061 TypeBit32: 00062 mBit32 = other.toBit32(); 00063 break; 00064 TypeUBit32: 00065 mUBit32 = other.toUBit32(); 00066 break; 00067 TypeBit64: 00068 mBit64 = other.toBit64(); 00069 break; 00070 TypeUBit64: 00071 mUBit64 = other.toUBit64(); 00072 break; 00073 TypeReal: 00074 mReal = other.toReal(); 00075 break; 00076 TypeString: 00077 mString = other.toString(); 00078 break; 00079 } 00080 }


| CVariant& PikeAero::CVariant::fromBit16 | ( | CMachine::bit16 | v | ) | [inline] |
| CVariant& PikeAero::CVariant::fromBit32 | ( | CMachine::bit32 | v | ) | [inline] |
| CVariant& PikeAero::CVariant::fromBit64 | ( | CMachine::bit64 | v | ) | [inline] |
| CVariant& PikeAero::CVariant::fromBit8 | ( | CMachine::bit8 | v | ) | [inline] |
| CVariant& PikeAero::CVariant::fromReal | ( | CMachine::real | v | ) | [inline] |
Definition at line 88 of file cvariant.h.
References mDataType, mString, TypeString, and update().
Referenced by CVariant().
00088 {mString=v; mDataType=TypeString; update(); return *this;}


| CVariant& PikeAero::CVariant::fromUBit16 | ( | CMachine::ubit16 | v | ) | [inline] |
Definition at line 82 of file cvariant.h.
References mDataType, mUBit16, TypeUBit16, and update().
Referenced by CVariant().
00082 {mUBit16=v; mDataType=TypeUBit16; update(); return *this;}


| CVariant& PikeAero::CVariant::fromUBit32 | ( | CMachine::ubit32 | v | ) | [inline] |
Definition at line 84 of file cvariant.h.
References mDataType, mUBit32, TypeUBit32, and update().
Referenced by CVariant().
00084 {mUBit32=v; mDataType=TypeUBit32; update(); return *this;}


| CVariant& PikeAero::CVariant::fromUBit64 | ( | CMachine::bit64 | v | ) | [inline] |
| CVariant& PikeAero::CVariant::fromUBit8 | ( | CMachine::ubit8 | v | ) | [inline] |
| void PikeAero::CVariant::initialize | ( | void | ) | [private] |
Definition at line 30 of file cvariant.cpp.
References mBit16, mBit32, mBit64, mBit8, mDataType, mReal, mString, mUBit16, mUBit32, mUBit64, mUBit8, and TypeNone.
Referenced by CVariant(), and update().
00031 { 00032 mDataType = TypeNone; 00033 mBit8 = 0; 00034 mUBit8 = 0; 00035 mBit16 = 0; 00036 mUBit16 = 0; 00037 mBit32 = 0; 00038 mUBit32 = 0; 00039 mBit64 = 0; 00040 mUBit64 = 0; 00041 mReal = 0.0; 00042 mString = (CMachine::ubit8*)""; 00043 }

| bool PikeAero::CVariant::operator!= | ( | CVariant & | other | ) | [inline] |
Definition at line 73 of file cvariant.h.
References compare().
00073 {return compare(other)!=0;}

| bool PikeAero::CVariant::operator< | ( | CVariant & | other | ) | [inline] |
Definition at line 75 of file cvariant.h.
References compare().
00075 {return compare(other)<0;}

| bool PikeAero::CVariant::operator<= | ( | CVariant & | other | ) | [inline] |
Definition at line 77 of file cvariant.h.
References compare().
00077 {return compare(other)<=0;}

Definition at line 68 of file cvariant.h.
References copy().
00068 {return copy(other);}

| bool PikeAero::CVariant::operator== | ( | CVariant & | other | ) | [inline] |
Definition at line 72 of file cvariant.h.
References compare().
00072 {return compare(other)==0;}

| bool PikeAero::CVariant::operator> | ( | CVariant & | other | ) | [inline] |
Definition at line 74 of file cvariant.h.
References compare().
00074 {return compare(other)>0;}

| bool PikeAero::CVariant::operator>= | ( | CVariant & | other | ) | [inline] |
Definition at line 76 of file cvariant.h.
References compare().
00076 {return compare(other)>=0;}

| CMachine::bit16 PikeAero::CVariant::toBit16 | ( | ) | [inline] |
Definition at line 92 of file cvariant.h.
References mBit16.
Referenced by copy().
00092 {return mBit16;}

| CMachine::bit32 PikeAero::CVariant::toBit32 | ( | ) | [inline] |
Definition at line 94 of file cvariant.h.
References mBit32.
Referenced by copy().
00094 {return mBit32;}

| CMachine::bit64 PikeAero::CVariant::toBit64 | ( | ) | [inline] |
| CMachine::bit8 PikeAero::CVariant::toBit8 | ( | ) | [inline] |
Definition at line 90 of file cvariant.h.
References mBit8.
Referenced by copy().
00090 {return mBit8;}

| CMachine::real PikeAero::CVariant::toReal | ( | ) | [inline] |
| CString& PikeAero::CVariant::toString | ( | ) | [inline] |
Definition at line 99 of file cvariant.h.
References mString.
Referenced by copy().
00099 {return mString;}

| CMachine::ubit16 PikeAero::CVariant::toUBit16 | ( | ) | [inline] |
Definition at line 93 of file cvariant.h.
References mUBit16.
Referenced by copy().
00093 {return mUBit16;}

| CMachine::ubit32 PikeAero::CVariant::toUBit32 | ( | ) | [inline] |
Definition at line 95 of file cvariant.h.
References mUBit32.
Referenced by copy().
00095 {return mUBit32;}

| CMachine::ubit64 PikeAero::CVariant::toUBit64 | ( | ) | [inline] |
Definition at line 97 of file cvariant.h.
References mUBit64.
Referenced by copy().
00097 {return mUBit64;}

| CMachine::ubit8 PikeAero::CVariant::toUBit8 | ( | ) | [inline] |
Definition at line 91 of file cvariant.h.
References mUBit8.
Referenced by copy().
00091 {return mUBit8;}

| tDataType PikeAero::CVariant::type | ( | ) | [inline] |
Definition at line 66 of file cvariant.h.
References mDataType.
Referenced by copy().
00066 {return mDataType;}

| void PikeAero::CVariant::update | ( | ) | [private] |
Definition at line 94 of file cvariant.cpp.
References PikeAero::CString::fromBit32(), initialize(), mBit16, mBit32, mBit64, mBit8, mDataType, mReal, mString, mUBit16, mUBit32, mUBit64, mUBit8, PikeAero::CString::toBit32(), TypeBit16, TypeBit32, TypeBit64, TypeBit8, TypeNone, TypeReal, TypeString, TypeUBit16, TypeUBit32, TypeUBit64, and TypeUBit8.
Referenced by fromBit16(), fromBit32(), fromBit64(), fromBit8(), fromReal(), fromString(), fromUBit16(), fromUBit32(), fromUBit64(), and fromUBit8().
00095 { 00096 switch( mDataType ) 00097 { 00098 case TypeNone: 00099 initialize(); 00100 break; 00101 case TypeBit8: 00102 mUBit8 = static_cast<CMachine::ubit8> (mBit8); 00103 mBit16 = static_cast<CMachine::bit16> (mBit8); 00104 mUBit16 = static_cast<CMachine::ubit16> (mBit8); 00105 mBit32 = static_cast<CMachine::bit32> (mBit8); 00106 mUBit32 = static_cast<CMachine::ubit32> (mBit8); 00107 mBit64 = static_cast<CMachine::bit64> (mBit8); 00108 mUBit64 = static_cast<CMachine::ubit64> (mBit8); 00109 mReal = static_cast<CMachine::real> (mBit8); 00110 mString.fromBit32( mBit32 ); 00111 break; 00112 case TypeUBit8: 00113 mBit8 = static_cast<CMachine::bit8> (mUBit8); 00114 mBit16 = static_cast<CMachine::bit16> (mUBit8); 00115 mUBit16 = static_cast<CMachine::ubit16> (mUBit8); 00116 mBit32 = static_cast<CMachine::bit32> (mUBit8); 00117 mUBit32 = static_cast<CMachine::ubit32> (mUBit8); 00118 mBit64 = static_cast<CMachine::bit64> (mUBit8); 00119 mUBit64 = static_cast<CMachine::ubit64> (mUBit8); 00120 mReal = static_cast<CMachine::real> (mUBit8); 00121 mString.fromBit32( mBit32 ); 00122 break; 00123 case TypeBit16: 00124 mBit8 = static_cast<CMachine::bit8> (mBit16); 00125 mUBit8 = static_cast<CMachine::ubit8> (mBit16); 00126 mUBit16 = static_cast<CMachine::ubit16> (mBit16); 00127 mBit32 = static_cast<CMachine::bit32> (mBit16); 00128 mUBit32 = static_cast<CMachine::ubit32> (mBit16); 00129 mBit64 = static_cast<CMachine::bit64> (mBit16); 00130 mUBit64 = static_cast<CMachine::ubit64> (mBit16); 00131 mReal = static_cast<CMachine::real> (mBit16); 00132 mString.fromBit32( mBit32 ); 00133 break; 00134 case TypeUBit16: 00135 mBit8 = static_cast<CMachine::bit8> (mUBit16); 00136 mUBit8 = static_cast<CMachine::ubit8> (mUBit16); 00137 mBit16 = static_cast<CMachine::bit16> (mUBit16); 00138 mBit32 = static_cast<CMachine::bit32> (mUBit16); 00139 mUBit32 = static_cast<CMachine::ubit32> (mUBit16); 00140 mBit64 = static_cast<CMachine::bit64> (mUBit16); 00141 mUBit64 = static_cast<CMachine::ubit64> (mUBit16); 00142 mReal = static_cast<CMachine::real> (mUBit16); 00143 mString.fromBit32( mBit32 ); 00144 break; 00145 case TypeBit32: 00146 mBit8 = static_cast<CMachine::bit8> (mBit32); 00147 mUBit8 = static_cast<CMachine::ubit8> (mBit32); 00148 mBit16 = static_cast<CMachine::bit16> (mBit32); 00149 mUBit16 = static_cast<CMachine::ubit16> (mBit32); 00150 mUBit32 = static_cast<CMachine::ubit32> (mBit32); 00151 mBit64 = static_cast<CMachine::bit64> (mBit32); 00152 mUBit64 = static_cast<CMachine::ubit64> (mBit32); 00153 mReal = static_cast<CMachine::real> (mBit32); 00154 mString.fromBit32( mBit32 ); 00155 break; 00156 case TypeUBit32: 00157 mBit8 = static_cast<CMachine::bit8> (mUBit32); 00158 mUBit8 = static_cast<CMachine::ubit8> (mUBit32); 00159 mBit16 = static_cast<CMachine::bit16> (mUBit32); 00160 mUBit16 = static_cast<CMachine::ubit16> (mUBit32); 00161 mBit32 = static_cast<CMachine::bit32> (mUBit32); 00162 mBit64 = static_cast<CMachine::bit64> (mUBit32); 00163 mUBit64 = static_cast<CMachine::ubit64> (mUBit32); 00164 mReal = static_cast<CMachine::real> (mUBit32); 00165 mString.fromBit32( mBit32 ); 00166 break; 00167 case TypeBit64: 00168 mBit8 = static_cast<CMachine::bit8> (mBit64); 00169 mUBit8 = static_cast<CMachine::ubit8> (mBit64); 00170 mBit16 = static_cast<CMachine::bit16> (mBit64); 00171 mUBit16 = static_cast<CMachine::ubit16> (mBit64); 00172 mBit32 = static_cast<CMachine::bit32> (mBit64); 00173 mUBit32 = static_cast<CMachine::ubit32> (mBit64); 00174 mUBit64 = static_cast<CMachine::ubit64> (mBit64); 00175 mReal = static_cast<CMachine::real> (mBit64); 00176 mString.fromBit32( mBit32 ); 00177 break; 00178 case TypeUBit64: 00179 mBit8 = static_cast<CMachine::bit8> (mUBit64); 00180 mUBit8 = static_cast<CMachine::ubit8> (mUBit64); 00181 mBit16 = static_cast<CMachine::bit16> (mUBit64); 00182 mUBit16 = static_cast<CMachine::ubit16> (mUBit64); 00183 mBit32 = static_cast<CMachine::bit32> (mUBit64); 00184 mUBit32 = static_cast<CMachine::ubit32> (mUBit64); 00185 mBit64 = static_cast<CMachine::bit64> (mUBit64); 00186 mReal = static_cast<CMachine::real> (mUBit64); 00187 mString.fromBit32( mBit32 ); 00188 break; 00189 case TypeReal: 00190 mBit8 = static_cast<CMachine::bit8> (mReal); 00191 mUBit8 = static_cast<CMachine::ubit8> (mReal); 00192 mBit16 = static_cast<CMachine::bit16> (mReal); 00193 mUBit16 = static_cast<CMachine::ubit16> (mReal); 00194 mBit32 = static_cast<CMachine::bit32> (mReal); 00195 mUBit32 = static_cast<CMachine::ubit32> (mReal); 00196 mBit64 = static_cast<CMachine::bit64> (mReal); 00197 mUBit64 = static_cast<CMachine::ubit64> (mReal); 00198 mString.fromBit32( static_cast<CMachine::bit32>( mReal ) ); 00199 break; 00200 case TypeString: 00201 mBit8 = static_cast<CMachine::bit8> (mString.toBit32()); 00202 mUBit8 = static_cast<CMachine::ubit8> (mString.toBit32()); 00203 mBit16 = static_cast<CMachine::bit16> (mString.toBit32()); 00204 mUBit16 = static_cast<CMachine::ubit16> (mString.toBit32()); 00205 mBit32 = static_cast<CMachine::bit32> (mString.toBit32()); 00206 mUBit32 = static_cast<CMachine::ubit32> (mString.toBit32()); 00207 mBit64 = static_cast<CMachine::bit64> (mString.toBit32()); 00208 mUBit64 = static_cast<CMachine::ubit64> (mString.toBit32()); 00209 mReal = static_cast<CMachine::real> (mString.toBit32()); 00210 break; 00211 } 00212 }


CMachine::bit16 PikeAero::CVariant::mBit16 [private] |
Definition at line 110 of file cvariant.h.
Referenced by copy(), fromBit16(), initialize(), toBit16(), and update().
CMachine::bit32 PikeAero::CVariant::mBit32 [private] |
Definition at line 112 of file cvariant.h.
Referenced by copy(), fromBit32(), initialize(), toBit32(), and update().
CMachine::bit64 PikeAero::CVariant::mBit64 [private] |
Definition at line 114 of file cvariant.h.
Referenced by copy(), fromBit64(), initialize(), toBit64(), and update().
CMachine::bit8 PikeAero::CVariant::mBit8 [private] |
Definition at line 108 of file cvariant.h.
Referenced by copy(), fromBit8(), initialize(), toBit8(), and update().
tDataType PikeAero::CVariant::mDataType [private] |
Definition at line 107 of file cvariant.h.
Referenced by compare(), fromBit16(), fromBit32(), fromBit64(), fromBit8(), fromReal(), fromString(), fromUBit16(), fromUBit32(), fromUBit64(), fromUBit8(), initialize(), type(), and update().
CMachine::real PikeAero::CVariant::mReal [private] |
Definition at line 116 of file cvariant.h.
Referenced by copy(), fromReal(), initialize(), toReal(), and update().
CString PikeAero::CVariant::mString [private] |
Definition at line 117 of file cvariant.h.
Referenced by copy(), fromString(), initialize(), toString(), and update().
CMachine::ubit16 PikeAero::CVariant::mUBit16 [private] |
Definition at line 111 of file cvariant.h.
Referenced by copy(), fromUBit16(), initialize(), toUBit16(), and update().
CMachine::ubit32 PikeAero::CVariant::mUBit32 [private] |
Definition at line 113 of file cvariant.h.
Referenced by copy(), fromUBit32(), initialize(), toUBit32(), and update().
CMachine::ubit64 PikeAero::CVariant::mUBit64 [private] |
Definition at line 115 of file cvariant.h.
Referenced by copy(), fromUBit64(), initialize(), toUBit64(), and update().
CMachine::ubit8 PikeAero::CVariant::mUBit8 [private] |
Definition at line 109 of file cvariant.h.
Referenced by copy(), fromUBit8(), initialize(), toUBit8(), and update().
1.5.8