OpendTect-6_4  6.4
Namespaces | Macros | Functions
convert.h File Reference
Include dependency graph for convert.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Conv
 Template based type conversion.
 

Macros

#define mConvDeclFromStrToSimpleType(type)
 
#define mConvDefFromStrToSimpleType(type, function)
 macro useful for implementation of string -> your type More...
 

Functions

template<class T , class F >
void Conv::set (T &_to, const F &fr)
 template based type conversion More...
 
template<class T , class F >
Conv::to (const F &fr)
 
template<class T , class F >
void Conv::udfset (T &_to, const F &fr, const T &und=Values::Undef< T >::val())
 template based type converstion, with check for undef More...
 
template<class T , class F >
Conv::udfto (const F &fr, const T &und=Values::Undef< T >::val())
 
template<>
void Conv::set (const char *&_to, const int &i)
 
template<>
void Conv::set (const char *&_to, const unsigned int &i)
 
template<>
void Conv::set (const char *&_to, const int64_t &i)
 
template<>
void Conv::set (const char *&_to, const uint64_t &i)
 
template<>
void Conv::set (const char *&_to, const bool &b)
 
template<>
void Conv::set (const char *&_to, const float &f)
 
template<>
void Conv::set (const char *&_to, const double &d)
 
template<>
void Conv::set (const char *&_to, const short &i)
 
template<>
void Conv::set (const char *&_to, const unsigned short &i)
 
template<>
void Conv::set (int &_to, const float &f)
 
template<>
void Conv::set (int64_t &_to, const float &f)
 
template<>
void Conv::set (short &_to, const float &f)
 
template<>
void Conv::set (unsigned short &_to, const float &f)
 
template<>
void Conv::set (unsigned int &_to, const float &f)
 
template<>
void Conv::set (uint64_t &_to, const float &f)
 
template<>
void Conv::set (int &_to, const double &f)
 
template<>
void Conv::set (int64_t &_to, const double &f)
 
template<>
void Conv::set (short &_to, const double &f)
 
template<>
void Conv::set (unsigned short &_to, const double &f)
 
template<>
void Conv::set (unsigned int &_to, const double &f)
 
template<>
void Conv::set (uint64_t &_to, const double &f)
 
template<>
void Conv::set (bool &_to, const char *const &s)
 
template<>
void Conv::set (bool &_to, const FixedString &s)
 
template<>
void Conv::set (bool &_to, const int &i)
 
template<>
void Conv::set (bool &_to, const float &f)
 
template<>
void Conv::set (bool &_to, const double &d)
 
template<>
void Conv::set (short &, const char *const &)
 
template<>
void Conv::set (short &, const FixedString &)
 
template<>
void Conv::set (unsigned short &, const char *const &)
 
template<>
void Conv::set (unsigned short &, const FixedString &)
 
template<>
void Conv::set (int &, const char *const &)
 
template<>
void Conv::set (int &, const FixedString &)
 
template<>
void Conv::set (unsigned int &, const char *const &)
 
template<>
void Conv::set (unsigned int &, const FixedString &)
 
template<>
void Conv::set (int64_t &, const char *const &)
 
template<>
void Conv::set (int64_t &, const FixedString &)
 
template<>
void Conv::set (uint64_t &, const char *const &)
 
template<>
void Conv::set (uint64_t &, const FixedString &)
 
template<>
void Conv::set (double &, const char *const &)
 
template<>
void Conv::set (double &, const FixedString &)
 
template<>
void Conv::set (float &, const char *const &)
 
template<>
void Conv::set (float &, const FixedString &)
 

Macro Definition Documentation

#define mConvDeclFromStrToSimpleType (   type)
Value:
template <> mGlobal(Basic) void set(type&,const char* const&); \
template <> mGlobal(Basic) void set(type&,const FixedString&)
#define mGlobal(module)
Definition: commondefs.h:163
OD::String that holds an existing text string.
Definition: fixedstring.h:29
void set(float &, const FixedString &)
#define mConvDefFromStrToSimpleType (   type,
  function 
)
Value:
namespace Conv \
{ \
template <> void set( type& _to, const char* const& s ) \
{ \
if ( !s || !*s ) { return; } \
\
char* endptr = 0; \
type tmpval = (type) function; \
if ( s != endptr ) \
_to = (type) tmpval; \
Values::setUdf( _to ); \
} \
template <> void set( type& _to, const FixedString& s ) \
{ \
if ( !s ) { return; } \
\
char* endptr = 0; \
type tmpval = (type) function; \
if ( s.str() != endptr ) \
_to = (type) tmpval; \
else if ( Values::Undef<type>::hasUdf() ) \
Values::setUdf( _to ); \
} \
}
Templatized undefined and initialisation (i.e. null) values.
Definition: color.h:106
FixedString Undef()
Definition: keystrs.h:142
bool hasUdf()
Definition: undefval.h:256
if(!noudf_ &&(mIsUdf(inpval)))
Definition: arrayndalgo.h:1662
OD::String that holds an existing text string.
Definition: fixedstring.h:29
T & setUdf(T &u)
Definition: undefval.h:262
Template based type conversion.
Definition: convert.h:24
Templatized undefined values.
Definition: undefval.h:51

macro useful for implementation of string -> your type


Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019