CFx SDK Documentation  2023 SP0
Functions
OdBcf::Utils Namespace Reference

Functions

bool isUnset (const OdBcf::OdBcfFileAttributesGroup &value)
 
template<class TUnsetable >
const TUnsetable & getUnset ()
 
template<>
const double & getUnset< double > ()
 
template<>
const long & getUnset< long > ()
 
template<>
const int & getUnset< int > ()
 
template<>
const OdStringgetUnset< OdString > ()
 
template<>
const OdAnsiString & getUnset< OdAnsiString > ()
 
template<>
const OdGUIDgetUnset< OdGUID > ()
 
bool isUnset (const bool &value)
 
bool isUnset (const float &value)
 
bool isUnset (const double &value)
 
bool isUnset (const long value)
 
bool isUnset (const int value)
 
bool isUnset (const OdString &value)
 
bool isUnset (const OdAnsiString &value)
 
bool isUnset (const char *value)
 
bool isUnset (const OdGUID &value)
 
template<class TInner >
bool isUnset (const OdSmartPtr< TInner > &value)
 
template<class TInner >
bool isUnset (const OdArray< TInner > &value)
 
template<class TKey , class TValue >
bool isUnset (const std::map< TKey, TValue > &value)
 
template<class TUnsetable >
void initUnset (TUnsetable &value)
 
bool parseBool (const OdString &value)
 
const OdStringboolToString (bool value)
 
BCF_EXPORT OdString formatDir (const OdString &dir)
 
BCF_EXPORT int createDir (const OdString &dir)
 
OdBcfTimeStampPtr getCurrentTime ()
 
OdResult createTextChild (TiXmlElement *pParent, const char *name, const char *value)
 
OdResult createConstructedChild (TiXmlElement *pParent, const char *name, const OdBcfElement *pValue)
 

Function Documentation

◆ boolToString()

const OdString& OdBcf::Utils::boolToString ( bool  value)

Converts boolean value to string.

Parameters
value[in] A boolean value.
Returns
Returns string "true" if boolean equals true; otherwise the method returns string "false".

◆ createConstructedChild()

OdResult OdBcf::Utils::createConstructedChild ( TiXmlElement *  pParent,
const char *  name,
const OdBcfElement pValue 
)

Adds constrcuted child to XML structure.

Parameters
pParent[in] A pointer to parent of the new element.
name[in] A string containing name of the new element.
pValue[in] A pointer to object responsible for creating value of the new element.
Returns
Returns eOk if element was successfully created; otherwise, the method returns an appropriate error.

◆ createDir()

BCF_EXPORT int OdBcf::Utils::createDir ( const OdString dir)

Creates empty directory.

Parameters
dir[in] A string containing path to new directory.
Returns
Returns 0 if directory was successfully created; otherwise, the method returns an appropriate error.

◆ createTextChild()

OdResult OdBcf::Utils::createTextChild ( TiXmlElement *  pParent,
const char *  name,
const char *  value 
)

Adds text child to XML structure.

Parameters
pParent[in] A pointer to parent of the new element.
name[in] A string containing name of the new element.
value[in] A string containing value of the new element.
Returns
Returns eOk if element was successfully created; otherwise, the method returns an appropriate error.

◆ formatDir()

BCF_EXPORT OdString OdBcf::Utils::formatDir ( const OdString dir)

Formats path to directory to conform current platform.

Parameters
dir[in] A string containing path to directory.
Returns
Returns string containing formatted path.
Remarks
The function ensures that there is separator on the end of the path.

◆ getCurrentTime()

OdBcfTimeStampPtr OdBcf::Utils::getCurrentTime ( )

Creates a time stamp object containing local time and time zone of system.

Returns
Returns a smart pointer to the created <link OdBcf::OdBcfTimeStamp, OdBcfTimeStamp> object.

◆ getUnset()

template<class TUnsetable >
const TUnsetable& OdBcf::Utils::getUnset ( )

Definition at line 42 of file BcfUnset.h.

◆ getUnset< double >()

template<>
const double& OdBcf::Utils::getUnset< double > ( )
inline

Definition at line 44 of file BcfUnset.h.

◆ getUnset< int >()

template<>
const int& OdBcf::Utils::getUnset< int > ( )
inline

Definition at line 46 of file BcfUnset.h.

◆ getUnset< long >()

template<>
const long& OdBcf::Utils::getUnset< long > ( )
inline

Definition at line 45 of file BcfUnset.h.

◆ getUnset< OdAnsiString >()

template<>
const OdAnsiString& OdBcf::Utils::getUnset< OdAnsiString > ( )
inline

Definition at line 48 of file BcfUnset.h.

◆ getUnset< OdGUID >()

template<>
const OdGUID& OdBcf::Utils::getUnset< OdGUID > ( )
inline

Definition at line 49 of file BcfUnset.h.

◆ getUnset< OdString >()

template<>
const OdString& OdBcf::Utils::getUnset< OdString > ( )
inline

Definition at line 47 of file BcfUnset.h.

◆ initUnset()

template<class TUnsetable >
void OdBcf::Utils::initUnset ( TUnsetable &  value)

Definition at line 68 of file BcfUnset.h.

◆ isUnset() [1/13]

bool OdBcf::Utils::isUnset ( const bool &  value)
inline

Definition at line 51 of file BcfUnset.h.

◆ isUnset() [2/13]

bool OdBcf::Utils::isUnset ( const char *  value)
inline

Definition at line 58 of file BcfUnset.h.

◆ isUnset() [3/13]

bool OdBcf::Utils::isUnset ( const double &  value)
inline

Definition at line 53 of file BcfUnset.h.

◆ isUnset() [4/13]

bool OdBcf::Utils::isUnset ( const float &  value)
inline

Definition at line 52 of file BcfUnset.h.

◆ isUnset() [5/13]

bool OdBcf::Utils::isUnset ( const int  value)
inline

Definition at line 55 of file BcfUnset.h.

◆ isUnset() [6/13]

bool OdBcf::Utils::isUnset ( const long  value)
inline

Definition at line 54 of file BcfUnset.h.

◆ isUnset() [7/13]

bool OdBcf::Utils::isUnset ( const OdAnsiString &  value)
inline

Definition at line 57 of file BcfUnset.h.

◆ isUnset() [8/13]

template<class TInner >
bool OdBcf::Utils::isUnset ( const OdArray< TInner > &  value)
inline

Definition at line 63 of file BcfUnset.h.

◆ isUnset() [9/13]

bool OdBcf::Utils::isUnset ( const OdBcf::OdBcfFileAttributesGroup value)
inline

Definition at line 55 of file BcfFileAttributesGroup.h.

◆ isUnset() [10/13]

bool OdBcf::Utils::isUnset ( const OdGUID value)
inline

Definition at line 59 of file BcfUnset.h.

◆ isUnset() [11/13]

template<class TInner >
bool OdBcf::Utils::isUnset ( const OdSmartPtr< TInner > &  value)
inline

Definition at line 61 of file BcfUnset.h.

◆ isUnset() [12/13]

bool OdBcf::Utils::isUnset ( const OdString value)
inline

Definition at line 56 of file BcfUnset.h.

◆ isUnset() [13/13]

template<class TKey , class TValue >
bool OdBcf::Utils::isUnset ( const std::map< TKey, TValue > &  value)
inline

Definition at line 65 of file BcfUnset.h.

◆ parseBool()

bool OdBcf::Utils::parseBool ( const OdString value)

Checks if string is equal to "true" or "1".

Parameters
value[in] A string containing boolean value.
Returns
Returns true if string is equal to mentioned above values; otherwise the method returns false.