Go to the documentation of this file.
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
Lexical analyzer for CIntSwissKnife.
@ PureNumber
Decimal number in an edit control.
Definition of polymorphical smart pointer.
void Values2String(const T &Values, GENICAM_NAMESPACE::gcstring &ValueStr)
Dump a value container into a string.
A string class which is a clone of std::string.
void Value2String(T Value, GENICAM_NAMESPACE::gcstring &ValueStr)
Converts an T property to a string.
enum GENAPI_NAMESPACE::_ERepresentation ERepresentation
recommended representation of a node value
virtual size_t length(void) const
char Hex2Byte(uint8_t Hex)
Converts an ASCII hex digit to a char value.
Common GenICam base include file.
bool String2Value(const GENICAM_NAMESPACE::gcstring &ValueStr, T *Value)
Converts a string to an T property.
std::pair< bool, int64_t > String2Value_ReturnType
Converts a string to a byte array.
virtual const char * c_str(void) const
rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Dec 4 2024 03:10:12