31 #ifndef GENAPI_VALUE2STRING_H 32 #define GENAPI_VALUE2STRING_H 39 #include "../GenApiDll.h" 41 #include "Internal_Compatibility.h" 47 template<
typename T >
51 typename T::const_iterator it(Values.begin());
52 if (it != Values.end())
54 while (it != Values.end())
57 ValueStr = s.
str().c_str();
61 template<
typename T >
64 static const int precision(36);
66 s << std::setprecision( precision ) << Value;
67 ValueStr = s.
str().c_str();
71 template<
typename T >
74 std::istringstream s(ValueStr.
c_str());
76 && (ValueStr[0] ==
'0' && (ValueStr[1] ==
'x' || ValueStr[1] ==
'X') ))
79 s >> std::hex >> *Value;
136 #pragma BullseyeCoverage off 139 if( 0x30 <= Hex && Hex <= 0x39 )
141 else if( 0x41 <= Hex && Hex <= 0x46 )
142 return Hex - 0x41 + 0x0a;
143 else if( 0x61 <= Hex && Hex <= 0x66 )
144 return Hex - 0x61 + 0x0a;
147 assert(
false &&
"if you are here its not an ASCII digit");
151 #pragma BullseyeCoverage on 156 #endif // ifndef GENAPI_VALUE2STRING_H virtual const char * c_str(void) const
A reference to a bool which can bei either an bool variable, or a pointer to an IInteger, an IEnumeration, or an IBoolean.
Decimal number in an edit control.
std::pair< bool, int64_t > String2Value_ReturnType
Converts a string to a byte array.
Common GenICam base include file.
virtual size_t length(void) const
enum GENAPI_NAMESPACE::_ERepresentation ERepresentation
recommended representation of a node value
Definition of polymorphical smart pointer.
char Hex2Byte(uint8_t Hex)
Converts an ASCII hex digit to a char value.
void Values2String(const T &Values, GENICAM_NAMESPACE::gcstring &ValueStr)
Dump a value container into a string.
A reference to a float which can be either a double variable, or a pointer to an IFloat, IInteger, or an IEnumeration interface.
A string class which is a clone of std::string.
A reference to an int64 which can bei either an int64 variable, or a pointer to an IInteger...
void Value2String(T Value, GENICAM_NAMESPACE::gcstring &ValueStr)
Converts an T property to a string.
Lexical analyzer for CIntSwissKnife.
A reference to a gcstring which can be either a gcstring variable, or a pointer to an IString...
bool String2Value(const GENICAM_NAMESPACE::gcstring &ValueStr, T *Value)
Converts a string to an T property.