CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
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_REQUIRED_NON_EMPTY_STRING_FIELD(Field)
 
#define VALIDATE_UNREQUIRED_NON_EMPTY_STRING_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 ()
 
bool OdBcf::Utils::validateNonEmptyString (const OdString &str)
 
bool OdBcf::Utils::validateColorString (const OdString &str)
 
OdResult OdBcf::Utils::createTextChild (TiXmlElement *pParent, const char *name, const char *value)
 
OdResult OdBcf::Utils::createConstructedChild (TiXmlElement *pParent, const char *name, const OdBcf::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 OdBcf::OdBcfElement *pValue)

Definition at line 130 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 114 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 192 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 bool &value)
Definition BcfUnset.h:100

Definition at line 171 of file BcfUtils.h.

◆ VALIDATE_REQUIRED_NON_EMPTY_STRING_FIELD

#define VALIDATE_REQUIRED_NON_EMPTY_STRING_FIELD ( Field)
Value:
\
{ \
return false; \
}
bool validateNonEmptyString(const OdString &str)

Definition at line 144 of file BcfUtils.h.

◆ VALIDATE_SIMPLE_FIELD

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

Definition at line 137 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 185 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 161 of file BcfUtils.h.

◆ VALIDATE_UNREQUIRED_NON_EMPTY_STRING_FIELD

#define VALIDATE_UNREQUIRED_NON_EMPTY_STRING_FIELD ( Field)
Value:
\
if(!OdBcf::Utils::isUnset(Field)) \
{ \
{ \
return false; \
} \
}

Definition at line 151 of file BcfUtils.h.