80 static tResult FromString(
const adtf_util::cString& strValue,
bool& bValue)
82 adtf::util::cStringUtil::ToType(strValue, bValue);
87 static tResult FromString(
const adtf_util::cString& strValue, T& oValue)
89 std::string_view strHelper(strValue.GetPtr());
90 if (strHelper.empty())
100 catch (
const std::overflow_error&)
102 if (strHelper.front() !=
'-')
104 oValue = std::numeric_limits<T>::max();
108 oValue = std::numeric_limits<T>::lowest();
111 catch (
const std::exception&)
113 bool bHelper =
false;
114 adtf::util::cStringUtil::ToType(strValue.GetPtr(), bHelper);
115 oValue =
static_cast<T
>(bHelper);
121 static tResult ToString(
const bool& oValue, adtf_util::cString& strValue)
123 strValue.Set(adtf_util::cString::FromType(oValue));
127 template<
typename TYPE>
128 static tResult ToString(
const TYPE& oValue, adtf_util::cString& strValue)
130 strValue.Set(string_conversion::to_string(oValue).c_str());
134 static tResult FromString(
const adtf_util::cString& strValue, adtf_util::cString& oValue)
136 oValue.Set(strValue);
140 static tResult ToString(
const adtf_util::cString& oValue, adtf_util::cString& strValue)
142 strValue.Set(oValue);
145 static tResult ToRaw(
const void* pData,
const size_t szSizeOfData,
IRawMemory& oToMem);
146 static tResult FromRaw(
const IRawMemory& oFromMem,
void* pData,
const size_t szSizeOfData);
172 return cPropertyConvert::Convert(oProp, oValue);
175 static tResult ToString(
const TYPE& oValue, adtf_util::cString& strValue)
177 return cPropertyConvert::ToString(oValue, strValue);
180 static tResult FromString(
const adtf_util::cString& strValue, TYPE& oValue)
182 return cPropertyConvert::FromString(strValue, oValue);
185 static tResult ToRaw(
const void* pData,
const size_t szSizeOfData,
IRawMemory& oToMem)
187 return cPropertyConvert::ToRaw(pData, szSizeOfData, oToMem);
190 static tResult FromRaw(
const IRawMemory& oFromMem,
void* pData,
const size_t szSizeOfData)
192 return cPropertyConvert::FromRaw(oFromMem, pData, szSizeOfData);
229 static tResult FromString(
const adtf_util::cString& oFromValue, adtf_util::cFilenameList& strToString);
230 static tResult ToString(
const adtf_util::cFilenameList& strFromString, adtf_util::cString& oToValue);
233 static tResult FromString(
const adtf_util::cString& oFromValue, adtf_util::cFilepathList& strToString);
234 static tResult ToString(
const adtf_util::cFilepathList& strFromString, adtf_util::cString& oToValue);
236 static tResult ToRaw(
const void* pData,
const size_t szSizeOfData,
IRawMemory& oToMem);
237 static tResult FromRaw(
const IRawMemory& oFromMem,
void* pData,
const size_t szSizeOfData);
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:775
#define RETURN_NOERROR
Return status ERR_NOERROR, which requires the calling function's return type to be tResult.
Definition result.h:29