LibN2L-4 Library Code ReferenceClassesCompounds Files Members Method Index Full Reference cDynVar.hGo to the documentation of this file.00001 /************************************************************************ 00002 Nova-2 Library (libN2L, or simply n2l) Game development C++ Library 00003 Copyright (C) 2003 Aaron Cameron 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public 00007 License as published by the Free Software Foundation; either 00008 version 2.1 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Lesser General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public 00016 License along with this library; if not, write to the Free Software 00017 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 00019 A copy of the GNU Lesser General Public License has been provided with 00020 this library in the file 'COPYING'. 00021 00022 Contact information for the author of this library has been provided 00023 with this library in the file 'AUTHOR'. 00024 ************************************************************************/ 00025 #ifndef _n2l4_cDynVar_h 00026 #define _n2l4_cDynVar_h 00027 00028 #include "n2l/n2l.h" 00029 00030 #include <map> 00031 00032 namespace n2l 00033 { 00034 00111 class cDynVar 00112 { 00113 public: 00114 typedef tUint32 tSize; 00115 typedef std::map<tString,cDynVar> tDynVarArray; 00116 typedef tDynVarArray::const_iterator tConstIterator; 00117 00119 enum tVarType 00120 { 00121 VarType_String = 1, 00122 VarType_Sint32 = 2, 00123 VarType_Int = 2, 00124 VarType_Float = 3, 00125 VarType_Bool = 4, 00126 VarType_Array = 5, 00127 VarType_Null = 6 00128 }; 00129 00133 static const tDynVarArray Array; 00134 static const cDynVar NoKey; 00135 static const cDynVar Null; 00136 00137 00139 cDynVar(); 00140 00144 cDynVar( const tVarType iType ); 00145 00149 cDynVar( const cDynVar & iDynVar ); 00150 00154 cDynVar( const char * const iValue ); 00155 00159 cDynVar( const tString & iValue ); 00160 00164 cDynVar( const tSint iValue ); 00165 cDynVar( const tUint iValue ); 00166 00170 cDynVar( const tFloat iValue ); 00171 00175 cDynVar( const tBool iValue ); 00176 00180 cDynVar( const tDynVarArray & iValue ); 00181 00183 ~cDynVar(); 00184 00188 void assign( const cDynVar & iDynVar ); 00189 00193 cDynVar & operator =( const cDynVar & iDynVar ); 00194 00241 void eval( const tString & iValStr ); 00242 00243 00245 operator const tString() const; 00246 00248 operator const tSint() const; 00249 inline operator const tUint() const { return tSint(*this); } 00250 00252 operator const tFloat() const; 00253 inline operator const tDouble() const { return tFloat(*this); } 00254 00256 operator const tBool() const; 00257 00261 const tVarType type() const; 00262 00268 const tSize size() const; 00269 00270 00279 static const tString & anyTypeStr( const tVarType iType ); 00280 00288 const tString & typeStr() const; 00289 00296 const cDynVar casted( const tVarType iType ) const; 00297 00306 cDynVar & cast( const tVarType iType ); 00307 00314 const cDynVar asNumeric() const; 00315 00324 void mkNumeric(); 00325 00330 inline void unset() { assign(Null); } 00331 00343 const tBool isNumericValue() const; 00344 00357 const tBool isNumericType() const; 00358 00363 inline const tBool isFloat() const { return mType==VarType_Float; } 00364 00371 inline const tBool isInt() const { return mType==VarType_Sint32; } 00372 00377 inline const tBool isSint32() const { return mType==VarType_Sint32; } 00378 00383 inline const tBool isBool() const { return mType==VarType_Bool; } 00384 00389 inline const tBool isString() const { return mType==VarType_String; } 00390 00395 inline const tBool isArray() const { return mType==VarType_Array; } 00396 00401 inline const tBool isNull() const { return mType==VarType_Null; } 00402 00403 00407 cDynVar &insert( const cDynVar & iValue ); 00408 00412 cDynVar &insert(const cDynVar & iKey, const cDynVar & iValue ); 00413 00414 00418 template <class TKey> 00419 const tBool keyExists( const TKey & iKey ) const { 00420 return keyExists( cDynVar(iKey) ); 00421 } 00422 00423 const tBool keyExists( const cDynVar & iKey ) const; 00424 00427 template <class TKey> 00428 const tBool keyExistsAsArray( const TKey & iKey ) const { 00429 return keyExistsAsArray( cDynVar(iKey) ); 00430 } 00431 00432 const tBool keyExistsAsArray( const cDynVar & iKey ) const; 00433 00434 00437 template <class TKey> 00438 const cDynVar &operator []( const TKey &iKey ) const { 00439 return (*this)[cDynVar(iKey)]; 00440 } 00441 00442 const cDynVar &operator []( const cDynVar &iKey ) const; 00443 00450 template <class TKey> 00451 cDynVar & operator []( const TKey & iKey ) { 00452 return (*this)[cDynVar(iKey)]; 00453 } 00454 00455 cDynVar & operator []( const cDynVar & iKey ); 00456 00463 template <class TKey> 00464 const cDynVar &keyValueOr( const TKey &iKey, 00465 const cDynVar &iDefault ) const { 00466 return keyValueOr(cDynVar(iKey),iDefault); 00467 } 00468 00469 const cDynVar &keyValueOr( const cDynVar &iKey, 00470 const cDynVar &iDefault ) const; 00471 00472 00478 const tConstIterator begin() const; 00479 00480 00486 const tConstIterator end() const; 00487 00488 00494 template <class TKey> 00495 const tConstIterator find( const TKey &iKey ) const { 00496 return find(cDynVar(iKey)); 00497 } 00498 00499 const tConstIterator find( const cDynVar &iKey ) const; 00500 00501 00506 const cDynVar operator -( const cDynVar & iRValue ) const; 00507 00512 const cDynVar operator +( const cDynVar & iRValue ) const; 00513 00518 const cDynVar operator *( const cDynVar & iRValue ) const; 00519 00528 const cDynVar operator /( const cDynVar & iRValue ) const; 00529 00534 const cDynVar operator %( const cDynVar & iRValue ) const; 00535 00543 const cDynVar operator ==( const cDynVar & iRValue ) const; 00544 00553 const cDynVar operator !=( const cDynVar & iRValue ) const; 00554 00562 const cDynVar operator >( const cDynVar & iRValue ) const; 00563 00571 const cDynVar operator <( const cDynVar & iRValue ) const; 00572 00573 00583 const cDynVar operator >=( const cDynVar & iRValue ) const; 00584 00585 00595 const cDynVar operator <=( const cDynVar & iRValue ) const; 00596 00597 00603 const cDynVar operator !() const; 00604 00605 00613 const cDynVar & operator ++(); 00614 00615 00623 const cDynVar & operator --(); 00624 00625 00633 const cDynVar operator ++(int); 00634 00635 00643 const cDynVar operator --(int); 00644 00645 00657 cDynVar & operator +=( const cDynVar & iRValue ); 00658 00659 00671 cDynVar & operator -=( const cDynVar & iRValue ); 00672 00673 00685 cDynVar & operator *=( const cDynVar & iRValue ); 00686 00687 00699 cDynVar & operator /=( const cDynVar & iRValue ); 00700 00701 00710 const tString dump( const tString & iIndent = "" ) const; 00711 00738 const tString serialize() const; 00739 00766 void unserialize( const tString &iVarStr ); 00767 00783 void unserialize( const tString &iVarStr, 00784 const tString::size_type &iSPos ); 00785 00786 void unserialize_raw_100( const tString &iVarStr, 00787 const tString::size_type &iSPos =0 ); 00788 00789 static void unserializeStats( tUint &oDString, tUint &oDInt, 00790 tUint &oDFloat, tUint &oDBool, tUint &oDArray, tUint &oDNull ); 00791 00792 00797 void deepMerge( const cDynVar &iDef, 00798 const tBool iIntegersCollide = false ); 00799 00800 private: 00801 typedef union { 00802 char *mString; 00803 tSint mSint32; 00804 tFloat mFloat; 00805 tBool mBool; 00806 tDynVarArray *mArray; 00807 } tValue; 00808 00809 tVarType mType; 00810 tValue mValue; 00811 00812 // Statics for stats collection 00813 static tUint smCount[6]; 00814 00815 // Internal checking routine. 00816 const tSint nextIntegralKey( const tDynVarArray & iArray ) const; 00817 const tString getKey( const cDynVar & iVar ) const; 00818 00819 void unserializeValue( const tString &iVarStr, 00820 const tString::size_type iSPos, cDynVar &oValue, 00821 tString::size_type &oEPos ) const; 00822 00823 void unserializeValue_raw_100( const tString &iVarStr, 00824 const tString::size_type iSPos, cDynVar &oValue, 00825 tString::size_type &oEPos ) const; 00826 00827 }; 00828 00829 00834 std::ostream & operator <<( std::ostream &ioStream, 00835 const cDynVar &iVar ); 00836 00837 #ifndef DOXYGEN_SKIP 00838 // Everything after this point is ugly 'rules' to show the compiler 00839 // how to override the built-in operations and execute these tests 00840 // with mixed POD variables and cDynVar's. If these aren't defined, 00841 // it won't know if it should cast cDynVar down to the POD, or to 00842 // cast the POD up to cDynVar. And in either case, it normally won't 00843 // be able to decide if a constant POD should become an int, tFloat or 00844 // in the case of (const char*), an integer compare. We on't have to 00845 // worry about tString on the right side because tString provides no 00846 // casts which ambiguate the conversion. We still have to provide a 00847 // reverse for it, however, since cDynVar can cast to string. 00848 // 00849 // Unfortunately, templating doesn't work here (even though this is 00850 // horribly repetitive) because it just moves the abiguity into the 00851 // template instead of the original operation. (that is unless 00852 // someone knows a way to set up the template so that it works, in 00853 // which place PLEASE contact me). 00854 // 00855 // As a note, the precompiler directive DOXYGEN_SKIP is in place to 00856 // tell the automatic documenation processor to exclude these ugly 00857 // things from the documentation. 00858 00859 inline const cDynVar operator -( const cDynVar &iLVal, const tSint iRVal ) { return iLVal-cDynVar(iRVal); } 00860 inline const cDynVar operator -( const cDynVar &iLVal, const tFloat iRVal ) { return iLVal-cDynVar(iRVal); } 00861 inline const cDynVar operator -( const cDynVar &iLVal, const tBool iRVal ) { return iLVal-cDynVar(iRVal); } 00862 inline const cDynVar operator -( const cDynVar &iLVal, const char *const iRVal ) { return iLVal-cDynVar(iRVal); } 00863 00864 inline const cDynVar operator +( const cDynVar &iLVal, const tSint iRVal ) { return iLVal+cDynVar(iRVal); } 00865 inline const cDynVar operator +( const cDynVar &iLVal, const tFloat iRVal ) { return iLVal+cDynVar(iRVal); } 00866 inline const cDynVar operator +( const cDynVar &iLVal, const tBool iRVal ) { return iLVal+cDynVar(iRVal); } 00867 inline const cDynVar operator +( const cDynVar &iLVal, const char *const iRVal ) { return iLVal+cDynVar(iRVal); } 00868 00869 inline const cDynVar operator *( const cDynVar &iLVal, const tSint iRVal ) { return iLVal*cDynVar(iRVal); } 00870 inline const cDynVar operator *( const cDynVar &iLVal, const tFloat iRVal ) { return iLVal*cDynVar(iRVal); } 00871 inline const cDynVar operator *( const cDynVar &iLVal, const tBool iRVal ) { return iLVal*cDynVar(iRVal); } 00872 inline const cDynVar operator *( const cDynVar &iLVal, const char *const iRVal ) { return iLVal*cDynVar(iRVal); } 00873 00874 inline const cDynVar operator /( const cDynVar &iLVal, const tSint iRVal ) { return iLVal/cDynVar(iRVal); } 00875 inline const cDynVar operator /( const cDynVar &iLVal, const tFloat iRVal ) { return iLVal/cDynVar(iRVal); } 00876 inline const cDynVar operator /( const cDynVar &iLVal, const tBool iRVal ) { return iLVal/cDynVar(iRVal); } 00877 inline const cDynVar operator /( const cDynVar &iLVal, const char *const iRVal ) { return iLVal/cDynVar(iRVal); } 00878 00879 inline const cDynVar operator %( const cDynVar &iLVal, const tSint iRVal ) { return iLVal%cDynVar(iRVal); } 00880 inline const cDynVar operator %( const cDynVar &iLVal, const tFloat iRVal ) { return iLVal%cDynVar(iRVal); } 00881 inline const cDynVar operator %( const cDynVar &iLVal, const tBool iRVal ) { return iLVal%cDynVar(iRVal); } 00882 inline const cDynVar operator %( const cDynVar &iLVal, const char *const iRVal ) { return iLVal%cDynVar(iRVal); } 00883 00884 inline const cDynVar operator ==( const cDynVar &iLVal, const tSint iRVal ) { return iLVal==cDynVar(iRVal); } 00885 inline const cDynVar operator ==( const cDynVar &iLVal, const tFloat iRVal ) { return iLVal==cDynVar(iRVal); } 00886 inline const cDynVar operator ==( const cDynVar &iLVal, const tBool iRVal ) { return iLVal==cDynVar(iRVal); } 00887 inline const cDynVar operator ==( const cDynVar &iLVal, const char *const iRVal ) { return iLVal==cDynVar(iRVal); } 00888 00889 inline const cDynVar operator !=( const cDynVar &iLVal, const tSint iRVal ) { return iLVal!=cDynVar(iRVal); } 00890 inline const cDynVar operator !=( const cDynVar &iLVal, const tFloat iRVal ) { return iLVal!=cDynVar(iRVal); } 00891 inline const cDynVar operator !=( const cDynVar &iLVal, const tBool iRVal ) { return iLVal!=cDynVar(iRVal); } 00892 inline const cDynVar operator !=( const cDynVar &iLVal, const char *const iRVal ) { return iLVal!=cDynVar(iRVal); } 00893 00894 inline const cDynVar operator >( const cDynVar &iLVal, const tSint iRVal ) { return iLVal>cDynVar(iRVal); } 00895 inline const cDynVar operator >( const cDynVar &iLVal, const tFloat iRVal ) { return iLVal>cDynVar(iRVal); } 00896 inline const cDynVar operator >( const cDynVar &iLVal, const tBool iRVal ) { return iLVal>cDynVar(iRVal); } 00897 inline const cDynVar operator >( const cDynVar &iLVal, const char *const iRVal ) { return iLVal>cDynVar(iRVal); } 00898 00899 inline const cDynVar operator <( const cDynVar &iLVal, const tSint iRVal ) { return iLVal<cDynVar(iRVal); } 00900 inline const cDynVar operator <( const cDynVar &iLVal, const tFloat iRVal ) { return iLVal<cDynVar(iRVal); } 00901 inline const cDynVar operator <( const cDynVar &iLVal, const tBool iRVal ) { return iLVal<cDynVar(iRVal); } 00902 inline const cDynVar operator <( const cDynVar &iLVal, const char *const iRVal ) { return iLVal<cDynVar(iRVal); } 00903 00904 inline const cDynVar operator >=( const cDynVar &iLVal, const tSint iRVal ) { return iLVal>=cDynVar(iRVal); } 00905 inline const cDynVar operator >=( const cDynVar &iLVal, const tFloat iRVal ) { return iLVal>=cDynVar(iRVal); } 00906 inline const cDynVar operator >=( const cDynVar &iLVal, const tBool iRVal ) { return iLVal>=cDynVar(iRVal); } 00907 inline const cDynVar operator >=( const cDynVar &iLVal, const char *const iRVal ) { return iLVal>=cDynVar(iRVal); } 00908 00909 inline const cDynVar operator <=( const cDynVar &iLVal, const tSint iRVal ) { return iLVal<=cDynVar(iRVal); } 00910 inline const cDynVar operator <=( const cDynVar &iLVal, const tFloat iRVal ) { return iLVal<=cDynVar(iRVal); } 00911 inline const cDynVar operator <=( const cDynVar &iLVal, const tBool iRVal ) { return iLVal<=cDynVar(iRVal); } 00912 inline const cDynVar operator <=( const cDynVar &iLVal, const char *const iRVal ) { return iLVal<=cDynVar(iRVal); } 00913 00914 00915 // *************************************************************************************************** 00916 // All of the following 'rules' show the compiler how to reverse equations so that cDynVar doesn't always have to 00917 // be on the left side of equations 00918 inline const cDynVar operator -( const tSint iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)-iRVal; } 00919 inline const cDynVar operator -( const tFloat iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)-iRVal; } 00920 inline const cDynVar operator -( const tBool iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)-iRVal; } 00921 inline const cDynVar operator -( const char *const iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)-iRVal; } 00922 inline const cDynVar operator -( const tString &iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)-iRVal; } 00923 00924 inline const cDynVar operator +( const tSint iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)+iRVal; } 00925 inline const cDynVar operator +( const tFloat iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)+iRVal; } 00926 inline const cDynVar operator +( const tBool iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)+iRVal; } 00927 inline const cDynVar operator +( const char *const iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)+iRVal; } 00928 inline const cDynVar operator +( const tString &iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)+iRVal; } 00929 00930 inline const cDynVar operator *( const tSint iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)*iRVal; } 00931 inline const cDynVar operator *( const tFloat iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)*iRVal; } 00932 inline const cDynVar operator *( const tBool iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)*iRVal; } 00933 inline const cDynVar operator *( const char *const iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)*iRVal; } 00934 inline const cDynVar operator *( const tString &iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)*iRVal; } 00935 00936 inline const cDynVar operator /( const tSint iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)/iRVal; } 00937 inline const cDynVar operator /( const tFloat iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)/iRVal; } 00938 inline const cDynVar operator /( const tBool iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)/iRVal; } 00939 inline const cDynVar operator /( const char *const iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)/iRVal; } 00940 inline const cDynVar operator /( const tString &iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)/iRVal; } 00941 00942 inline const cDynVar operator %( const tSint iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)%iRVal; } 00943 inline const cDynVar operator %( const tFloat iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)%iRVal; } 00944 inline const cDynVar operator %( const tBool iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)%iRVal; } 00945 inline const cDynVar operator %( const char *const iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)%iRVal; } 00946 inline const cDynVar operator %( const tString &iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)%iRVal; } 00947 00948 00949 inline tSint & operator -=( tSint &iLVal, const cDynVar &iRVal ) { return iLVal -= tSint(iRVal); } 00950 inline tFloat & operator -=( tFloat &iLVal, const cDynVar &iRVal ) { return iLVal -= tFloat(iRVal); } 00951 inline tBool & operator -=( tBool &iLVal, const cDynVar &iRVal ) { return iLVal -= tBool(iRVal); } 00952 00953 inline tSint & operator +=( tSint &iLVal, const cDynVar &iRVal ) { return iLVal += tSint(iRVal); } 00954 inline tFloat & operator +=( tFloat &iLVal, const cDynVar &iRVal ) { return iLVal += tFloat(iRVal); } 00955 inline tBool & operator +=( tBool &iLVal, const cDynVar &iRVal ) { return iLVal += tBool(iRVal); } 00956 00957 inline tSint & operator *=( tSint &iLVal, const cDynVar &iRVal ) { return iLVal *= tSint(iRVal); } 00958 inline tFloat & operator *=( tFloat &iLVal, const cDynVar &iRVal ) { return iLVal *= tFloat(iRVal); } 00959 inline tBool & operator *=( tBool &iLVal, const cDynVar &iRVal ) { return iLVal *= tBool(iRVal); } 00960 00961 inline tSint & operator /=( tSint &iLVal, const cDynVar &iRVal ) { return iLVal /= tSint(iRVal); } 00962 inline tFloat & operator /=( tFloat &iLVal, const cDynVar &iRVal ) { return iLVal /= tFloat(iRVal); } 00963 inline tBool & operator /=( tBool &iLVal, const cDynVar &iRVal ) { return iLVal /= tBool(iRVal); } 00964 00965 inline const cDynVar operator ==( const tSint iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)==iRVal; } 00966 inline const cDynVar operator ==( const tFloat iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)==iRVal; } 00967 inline const cDynVar operator ==( const tBool iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)==iRVal; } 00968 inline const cDynVar operator ==( const char *const iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)==iRVal; } 00969 inline const cDynVar operator ==( const tString &iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)==iRVal; } 00970 00971 inline const cDynVar operator !=( const tSint iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)!=iRVal; } 00972 inline const cDynVar operator !=( const tFloat iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)!=iRVal; } 00973 inline const cDynVar operator !=( const tBool iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)!=iRVal; } 00974 inline const cDynVar operator !=( const char *const iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)!=iRVal; } 00975 inline const cDynVar operator !=( const tString &iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)!=iRVal; } 00976 00977 inline const cDynVar operator >( const tSint iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)>iRVal; } 00978 inline const cDynVar operator >( const tFloat iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)>iRVal; } 00979 inline const cDynVar operator >( const tBool iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)>iRVal; } 00980 inline const cDynVar operator >( const char *const iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)>iRVal; } 00981 inline const cDynVar operator >( const tString &iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)>iRVal; } 00982 00983 inline const cDynVar operator <( const tSint iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)<iRVal; } 00984 inline const cDynVar operator <( const tFloat iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)<iRVal; } 00985 inline const cDynVar operator <( const tBool iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)<iRVal; } 00986 inline const cDynVar operator <( const char *const iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)<iRVal; } 00987 inline const cDynVar operator <( const tString &iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)<iRVal; } 00988 00989 inline const cDynVar operator >=( const tSint iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)>=iRVal; } 00990 inline const cDynVar operator >=( const tFloat iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)>=iRVal; } 00991 inline const cDynVar operator >=( const tBool iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)>=iRVal; } 00992 inline const cDynVar operator >=( const char *const iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)>=iRVal; } 00993 inline const cDynVar operator >=( const tString &iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)>=iRVal; } 00994 00995 inline const cDynVar operator <=( const tSint iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)<=iRVal; } 00996 inline const cDynVar operator <=( const tFloat iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)<=iRVal; } 00997 inline const cDynVar operator <=( const tBool iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)<=iRVal; } 00998 inline const cDynVar operator <=( const char *const iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)<=iRVal; } 00999 inline const cDynVar operator <=( const tString &iLVal, const cDynVar &iRVal ) { return cDynVar(iLVal)<=iRVal; } 01000 #endif 01001 } // namespace 01002 01003 #endif |