51 {
Std_TraceMsg(0,
"Caught Error in desctructor of CStdVariant\r\n",
"", -1,
false,
true);}
131 THROW_PARAM_ERROR(Std_Err_lVariantParamUndefined, Std_Err_strVariantParamUndefined,
"Param",
"Short");
136 THROW_ERROR(Std_Err_lVariantNotSet, Std_Err_strVariantNotSet);
165 THROW_PARAM_ERROR(Std_Err_lInvalidVariantType, Std_Err_strInvalidVariantType,
"VariantType",
m_iVariantType);
183 THROW_PARAM_ERROR(Std_Err_lVariantParamUndefined, Std_Err_strVariantParamUndefined,
"Param",
"Short");
233 THROW_PARAM_ERROR(Std_Err_lVariantParamUndefined, Std_Err_strVariantParamUndefined,
"Param",
"Long");
238 THROW_ERROR(Std_Err_lVariantNotSet, Std_Err_strVariantNotSet);
267 THROW_PARAM_ERROR(Std_Err_lInvalidVariantType, Std_Err_strInvalidVariantType,
"VariantType",
m_iVariantType);
285 THROW_PARAM_ERROR(Std_Err_lVariantParamUndefined, Std_Err_strVariantParamUndefined,
"Param",
"Long");
335 THROW_PARAM_ERROR(Std_Err_lVariantParamUndefined, Std_Err_strVariantParamUndefined,
"Param",
"Float");
340 THROW_ERROR(Std_Err_lVariantNotSet, Std_Err_strVariantNotSet);
369 THROW_PARAM_ERROR(Std_Err_lInvalidVariantType, Std_Err_strInvalidVariantType,
"VariantType",
m_iVariantType);
388 THROW_PARAM_ERROR(Std_Err_lVariantParamUndefined, Std_Err_strVariantParamUndefined,
"Param",
"Float");
438 THROW_PARAM_ERROR(Std_Err_lVariantParamUndefined, Std_Err_strVariantParamUndefined,
"Param",
"Double");
443 THROW_ERROR(Std_Err_lVariantNotSet, Std_Err_strVariantNotSet);
472 THROW_PARAM_ERROR(Std_Err_lInvalidVariantType, Std_Err_strInvalidVariantType,
"VariantType",
m_iVariantType);
491 THROW_PARAM_ERROR(Std_Err_lVariantParamUndefined, Std_Err_strVariantParamUndefined,
"Param",
"Double");
541 THROW_PARAM_ERROR(Std_Err_lVariantParamUndefined, Std_Err_strVariantParamUndefined,
"Param",
"Bool");
546 THROW_ERROR(Std_Err_lVariantNotSet, Std_Err_strVariantNotSet);
550 if(*
m_lpShort == 0)
return false;
else return true;
552 if(*
m_lpLong == 0)
return false;
else return true;
554 if(*
m_lpFloat == 0)
return false;
else return true;
556 if(*
m_lpDouble == 0)
return false;
else return true;
560 if(*
m_lpChar == 0)
return false;
else return true;
562 if(*
m_lpUChar == 0)
return false;
else return true;
564 if(*
m_lpUShort == 0)
return false;
else return true;
566 if(*
m_lpULong == 0)
return false;
else return true;
568 if(*
m_lpInt == 0)
return false;
else return true;
570 if(*
m_lpUInt == 0)
return false;
else return true;
575 THROW_PARAM_ERROR(Std_Err_lInvalidVariantType, Std_Err_strInvalidVariantType,
"VariantType",
m_iVariantType);
594 THROW_PARAM_ERROR(Std_Err_lVariantParamUndefined, Std_Err_strVariantParamUndefined,
"Param",
"Bool");
644 THROW_PARAM_ERROR(Std_Err_lVariantParamUndefined, Std_Err_strVariantParamUndefined,
"Param",
"Double");
649 THROW_ERROR(Std_Err_lVariantNotSet, Std_Err_strVariantNotSet);
676 return (
char) (*m_lpString)[0];
681 THROW_PARAM_ERROR(Std_Err_lInvalidVariantType, Std_Err_strInvalidVariantType,
"VariantType",
m_iVariantType);
700 THROW_PARAM_ERROR(Std_Err_lVariantParamUndefined, Std_Err_strVariantParamUndefined,
"Param",
"Char");
750 THROW_PARAM_ERROR(Std_Err_lVariantParamUndefined, Std_Err_strVariantParamUndefined,
"Param",
"UChar");
755 THROW_ERROR(Std_Err_lVariantNotSet, Std_Err_strVariantNotSet);
777 return (
unsigned char) *
m_lpInt;
781 return (
unsigned char) atol(
m_lpString->c_str());
784 THROW_PARAM_ERROR(Std_Err_lInvalidVariantType, Std_Err_strInvalidVariantType,
"VariantType",
m_iVariantType);
803 THROW_PARAM_ERROR(Std_Err_lVariantParamUndefined, Std_Err_strVariantParamUndefined,
"Param",
"UChar");
853 THROW_PARAM_ERROR(Std_Err_lVariantParamUndefined, Std_Err_strVariantParamUndefined,
"Param",
"UShort");
858 THROW_ERROR(Std_Err_lVariantNotSet, Std_Err_strVariantNotSet);
880 return (
unsigned short) *
m_lpInt;
884 return (
unsigned short) atol(
m_lpString->c_str());
887 THROW_PARAM_ERROR(Std_Err_lInvalidVariantType, Std_Err_strInvalidVariantType,
"VariantType",
m_iVariantType);
906 THROW_PARAM_ERROR(Std_Err_lVariantParamUndefined, Std_Err_strVariantParamUndefined,
"Param",
"UShort");
956 THROW_PARAM_ERROR(Std_Err_lVariantParamUndefined, Std_Err_strVariantParamUndefined,
"Param",
"ULong");
961 THROW_ERROR(Std_Err_lVariantNotSet, Std_Err_strVariantNotSet);
983 return (
unsigned long) *
m_lpInt;
987 return (
unsigned long) atol(
m_lpString->c_str());
990 THROW_PARAM_ERROR(Std_Err_lInvalidVariantType, Std_Err_strInvalidVariantType,
"VariantType",
m_iVariantType);
1008 THROW_PARAM_ERROR(Std_Err_lVariantParamUndefined, Std_Err_strVariantParamUndefined,
"Param",
"ULong");
1058 THROW_PARAM_ERROR(Std_Err_lVariantParamUndefined, Std_Err_strVariantParamUndefined,
"Param",
"Int");
1063 THROW_ERROR(Std_Err_lVariantNotSet, Std_Err_strVariantNotSet);
1092 THROW_PARAM_ERROR(Std_Err_lInvalidVariantType, Std_Err_strInvalidVariantType,
"VariantType",
m_iVariantType);
1110 THROW_PARAM_ERROR(Std_Err_lVariantParamUndefined, Std_Err_strVariantParamUndefined,
"Param",
"Int");
1160 THROW_PARAM_ERROR(Std_Err_lVariantParamUndefined, Std_Err_strVariantParamUndefined,
"Param",
"UInt");
1165 THROW_ERROR(Std_Err_lVariantNotSet, Std_Err_strVariantNotSet);
1187 return (
unsigned int) *
m_lpInt;
1191 return (
unsigned int) atol(
m_lpString->c_str());
1194 THROW_PARAM_ERROR(Std_Err_lInvalidVariantType, Std_Err_strInvalidVariantType,
"VariantType",
m_iVariantType);
1212 THROW_PARAM_ERROR(Std_Err_lVariantParamUndefined, Std_Err_strVariantParamUndefined,
"Param",
"UInt");
1262 THROW_ERROR(Std_Err_lVariantNotSet, Std_Err_strVariantNotSet);
1289 THROW_PARAM_ERROR(Std_Err_lInvalidVariantType, Std_Err_strInvalidVariantType,
"VariantType",
m_iVariantType);
1309 THROW_PARAM_ERROR(Std_Err_lVariantParamUndefined, Std_Err_strVariantParamUndefined,
"Param",
"String");
1314 THROW_ERROR(Std_Err_lVariantNotSet, Std_Err_strVariantNotSet);
1343 THROW_PARAM_ERROR(Std_Err_lInvalidVariantType, Std_Err_strInvalidVariantType,
"VariantType",
m_iVariantType);
1361 THROW_PARAM_ERROR(Std_Err_lVariantParamUndefined, Std_Err_strVariantParamUndefined,
"Param",
"String");
1450 THROW_PARAM_ERROR(Std_Err_lInvalidVariantType, Std_Err_strInvalidVariantType,
"VariantType",
m_iVariantType);
1509 THROW_PARAM_ERROR(Std_Err_lInvalidVariantType, Std_Err_strInvalidVariantType,
"VariantType",
m_iVariantType);
1548 lpVar->operator=(*this);
1553 if(lpVar)
delete lpVar;
1554 RELAY_ERROR(oError);
1559 if(lpVar)
delete lpVar;
1560 THROW_ERROR(Std_Err_lUnspecifiedError, Std_Err_strUnspecifiedError);
1619 THROW_PARAM_ERROR(Std_Err_lInvalidVariantType, Std_Err_strInvalidVariantType,
"VariantType",
m_iVariantType);
1644 unsigned char ucVal;
1645 unsigned short usVal;
1646 unsigned long ulVal;
1692 ucVal = (
unsigned char) oXml.
GetChildInt(
"Value");
1722 THROW_PARAM_ERROR(Std_Err_lInvalidVariantType, Std_Err_strInvalidVariantType,
"VariantType",
m_iVariantType);
1739 std::string strEmpty;
1802 THROW_PARAM_ERROR(Std_Err_lInvalidVariantType, Std_Err_strInvalidVariantType,
"VariantType",
m_iVariantType);
int Std_VariantTypeToConst(std::string strType)
Standard variant type to constant.
virtual ~CStdVariant()
Destructor.
unsigned int GetUInt(bool bConvert=true)
Gets an unsigned int.
unsigned char * GetUCharPtr()
Gets the unsigned character pointer.
std::string GetNumericString()
Gets a string version of the value.
CStdVariant()
Default constructor.
std::string GetString(bool bConvert=true)
Gets a string version of the value.
bool * GetBoolPtr()
Gets the bool pointer.
unsigned char GetUChar(bool bConvert=true)
Gets an unsigned character.
unsigned short GetUShort(bool bConvert=true)
Gets an unsigned short.
unsigned short * GetUShortPtr()
Gets the unsigned short pointer.
virtual void AddChildElement(std::string strElementName)
Adds a child element to current element.
Information about the standard error.
virtual bool IntoElem()
Goes into the next element where the cursor is located.
unsigned long * GetULongPtr()
Gets the unsigned long pointer.
void Reset()
Resets the variant data.
long * m_lpLong
StdVtLong 4-byte signed int.
double * GetDoublePtr()
Gets the double pointer.
unsigned long GetULong(bool bConvert=true)
Gets an unsigned long.
virtual double GetChildDouble(std::string strElementName)
Gets a double value from the element with the specified name.
unsigned short * m_lpUShort
StdVtUShort 2 byte unsigned int.
std::string Std_ConstToVariantType(int iType)
Standard constant to variant type.
double GetDouble(bool bConvert=true)
Gets a double.
bool GetBool(bool bConvert=true)
Gets a bool.
char * GetCharPtr()
Gets the character pointer.
std::string VariantTypeName()
Gets the variant type name.
long * GetLongPtr()
Gets the long pointer.
virtual int GetChildInt(std::string strElementName)
Gets an integer value from the element with the specified name.
void SetPtr(short *lpVal)
Sets a value pointer.
char * m_lpChar
StdVtChar Char.
void SetValue(short Val)
Sets the value.
virtual void Trace(std::ostream &oOs)
Traces this object to an output stream.
virtual void Load(CStdXml &oXml)
Loads the variant.
short GetShort(bool bConvert=true)
Gets a short value.
A standard xml manipulation class.
void operator=(CStdVariant &oVar)
= casting operator.
long GetLong(bool bConvert=true)
Gets a long value.
virtual CStdSerialize * Clone()
Makes a deep copy of this object.
std::string * m_lpString
StdVtString string.
virtual std::string GetChildString(std::string strElementName)
Gets a string value from the element with the specified name.
int VariantType()
Gets the variant type.
Namespace for the standard utility objects.
unsigned int * m_lpUInt
StdVtUInt 2 byte unsigned int.
void Std_TraceMsg(const int iLevel, std::string strMessage, std::string strSourceFile, int iSourceLine, bool bLogToFile, bool bPrintHeader)
Traces a message to the debugger window.
virtual bool GetChildBool(std::string strElementName)
Gets a bool value from the element with the specified name.
void Copy(CStdVariant &oVar)
Copies the given variant.
float GetFloat(bool bConvert=true)
Gets a float.
int * m_lpInt
StdVtInt 2 byte signed int.
char GetChar(bool bConvert=true)
Gets a character.
float * m_lpFloat
StdVtFloat 4-byte real.
bool * m_lpBool
StdVtBool Boolean.
double * m_lpDouble
StdVtDouble 8-byte real.
virtual bool OutOfElem()
Goes out of the element where the cursor is located.
short * GetShortPtr()
Gets the short pointer.
virtual void Save(CStdXml &oXml)
Saves the variant.
std::string Std_CheckString(std::string strVal)
Converts a string to upper case and trims it.
Standard serialize class.
bool m_bCreatedVar
true if created variable
int * GetIntPtr()
Gets the int pointer.
unsigned int * GetUIntPtr()
Gets the unsigned int pointer.
unsigned char * m_lpUChar
StdVtUChar Unsigned char.
int GetInt(bool bConvert=true)
Gets an int.
short * m_lpShort
StdVtShort 2-byte signed int.
unsigned long * m_lpULong
StdVtULong 4 byte unsigned int.
virtual long GetChildLong(std::string strElementName)
Gets a long value from the element with the specified name.
int m_iVariantType
Variant type.
virtual float GetChildFloat(std::string strElementName)
Gets a float value from the element with the specified name.
std::string * GetStringPtr()
Gets the string pointer.
float * GetFloatPtr()
Gets the float pointer.