CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Namespaces | Macros | Functions
BcfUtils.h File Reference
#include "BcfCommon.h"
#include "StringArray.h"
#include <cstdint>
#include "BcfUnset.h"

Go to the source code of this file.

Namespaces

namespace  OdBcf
 
namespace  OdBcf::Utils
 

Macros

#define CREATE_TEXT_CHILD(pParent, Name, Value)
 
#define CREATE_CONSTRUCTED_CHILD(pParent, Name, Value)
 
#define VALIDATE_SIMPLE_FIELD(Field)
 
#define VALIDATE_UNREQUIRED_CONSTRUCTED_FIELD(Field)
 
#define VALIDATE_REQUIRED_CONSTRUCTED_FIELD(Field)
 
#define VALIDATE_UNREQUIRED_CONSTRUCTED_COLLECTION(Collection)
 
#define VALIDATE_REQUIRED_CONSTRUCTED_COLLECTION(Collection)
 

Functions

bool OdBcf::Utils::parseBool (const OdString &value)
 
const OdStringOdBcf::Utils::boolToString (bool value)
 
BCF_EXPORT OdString OdBcf::Utils::formatDir (const OdString &dir)
 
BCF_EXPORT int OdBcf::Utils::createDir (const OdString &dir)
 
OdBcfTimeStampPtr OdBcf::Utils::getCurrentTime ()
 
OdResult OdBcf::Utils::createTextChild (TiXmlElement *pParent, const char *name, const char *value)
 
OdResult OdBcf::Utils::createConstructedChild (TiXmlElement *pParent, const char *name, const OdBcfElement *pValue)
 

Macro Definition Documentation

◆ CREATE_CONSTRUCTED_CHILD

#define CREATE_CONSTRUCTED_CHILD (   pParent,
  Name,
  Value 
)
Value:
\
if(OdResult pParent##Res = OdBcf::Utils::createConstructedChild(pParent, Name, Value)) \
{ \
return pParent##Res; \
}
OdResult
Definition: OdResult.h:29
OdResult createConstructedChild(TiXmlElement *pParent, const char *name, const OdBcfElement *pValue)

Definition at line 113 of file BcfUtils.h.

◆ CREATE_TEXT_CHILD

#define CREATE_TEXT_CHILD (   pParent,
  Name,
  Value 
)
Value:
\
if(OdResult pParent##Res = OdBcf::Utils::createTextChild(pParent, Name, Value)) \
{ \
return pParent##Res; \
}
OdResult createTextChild(TiXmlElement *pParent, const char *name, const char *value)

Definition at line 97 of file BcfUtils.h.

◆ VALIDATE_REQUIRED_CONSTRUCTED_COLLECTION

#define VALIDATE_REQUIRED_CONSTRUCTED_COLLECTION (   Collection)
Value:
\
VALIDATE_UNREQUIRED_CONSTRUCTED_COLLECTION(Collection); \
if(Collection.size() == 0) \
{ \
return false; \
}

Definition at line 158 of file BcfUtils.h.

◆ VALIDATE_REQUIRED_CONSTRUCTED_FIELD

#define VALIDATE_REQUIRED_CONSTRUCTED_FIELD (   Field)
Value:
\
if(!OdBcf::Utils::isUnset(Field)) \
{ \
if(Field->validate() == false) \
{ \
return false; \
} \
} \
else \
{ \
return false; \
}
bool isUnset(const OdBcf::OdBcfFileAttributesGroup &value)

Definition at line 137 of file BcfUtils.h.

◆ VALIDATE_SIMPLE_FIELD

#define VALIDATE_SIMPLE_FIELD (   Field)
Value:
\
{ \
return false; \
}

Definition at line 120 of file BcfUtils.h.

◆ VALIDATE_UNREQUIRED_CONSTRUCTED_COLLECTION

#define VALIDATE_UNREQUIRED_CONSTRUCTED_COLLECTION (   Collection)
Value:
\
for(const auto& element : Collection) \
{ \
VALIDATE_UNREQUIRED_CONSTRUCTED_FIELD(element); \
}

Definition at line 151 of file BcfUtils.h.

◆ VALIDATE_UNREQUIRED_CONSTRUCTED_FIELD

#define VALIDATE_UNREQUIRED_CONSTRUCTED_FIELD (   Field)
Value:
\
if(!OdBcf::Utils::isUnset(Field)) \
{ \
if(Field->validate() == false) \
{ \
return false; \
} \
}

Definition at line 127 of file BcfUtils.h.