CFx SDK Documentation  2023 SP0
Classes | Macros | Typedefs | Functions
FdField.h File Reference
#include "RxObject.h"
#include "RxDictionary.h"
#include "DbField.h"
#include "StringArray.h"
#include "TD_PackPush.h"
#include "TD_PackPop.h"

Go to the source code of this file.

Classes

class  OdFdFieldEvaluator
 
class  OdFdFieldEvaluatorLoader
 
class  OdFdFieldReactor
 
class  OdFdFieldEngine
 
class  OdFdFieldResult
 
class  OdFdFieldEnginePE
 

Macros

#define ODFD_FIELD_ENGINE   OD_T("FieldEngine")
 

Typedefs

typedef OdSmartPtr< OdFdFieldEvaluatorOdFdFieldEvaluatorPtr
 
typedef OdArray< OdFdFieldReactor * > FieldReactors
 
typedef OdSmartPtr< OdFdFieldEngineOdFdFieldEnginePtr
 
typedef OdSmartPtr< OdFdFieldEnginePEOdFdFieldEnginePEPtr
 

Functions

TOOLKIT_EXPORT OdFdFieldEnginePtr oddbGetFieldEngine ()
 
TOOLKIT_EXPORT OdString oddbGetFieldEngineValueByError (const OdString &sPrevValue)
 
TOOLKIT_EXPORT OdString oddbSetFieldEngineValueFormatByError (const OdString &sValue=L"%ls")
 
TOOLKIT_EXPORT OdResult oddbEvaluateFields (OdDbDatabase *pDb, int nContext, const OdDbObjectIdArray *objIds=0, const OdDbObjectIdArray *pFieldsToEvaluate=0, const OdString &pszEvaluatorId=OdString(), OdFd::EvalFields nEvalFlag=OdFd::kEvalRecursive, int *pNumFound=0, int *pNumEvaluated=0)
 
TOOLKIT_EXPORT void odfdGetSubStrings (const OdString &sString, OdStringArray &aSubStrings)
 
TOOLKIT_EXPORT bool odfdGetAcVarData (const OdString &sString, OdString &sName, OdString &sFormat)
 

Macro Definition Documentation

◆ ODFD_FIELD_ENGINE

#define ODFD_FIELD_ENGINE   OD_T("FieldEngine")

Definition at line 312 of file FdField.h.

Typedef Documentation

◆ FieldReactors

Definition at line 225 of file FdField.h.

◆ OdFdFieldEnginePEPtr

Definition at line 433 of file FdField.h.

◆ OdFdFieldEnginePtr

Definition at line 311 of file FdField.h.

◆ OdFdFieldEvaluatorPtr

Definition at line 160 of file FdField.h.

Function Documentation

◆ oddbEvaluateFields()

TOOLKIT_EXPORT OdResult oddbEvaluateFields ( OdDbDatabase pDb,
int  nContext,
const OdDbObjectIdArray objIds = 0,
const OdDbObjectIdArray pFieldsToEvaluate = 0,
const OdString pszEvaluatorId = OdString(),
OdFd::EvalFields  nEvalFlag = OdFd::kEvalRecursive,
int *  pNumFound = 0,
int *  pNumEvaluated = 0 
)

Evaluates fields in database.

Parameters
pDb[in] Pointer to the database for which fields are to be evaluated
nContext[in] Input context in which the field is evaluated, which can be a predefined OdDbField::EvalContext enum flag or a user-defined context flag; this context flag is passed to the evaluator
objIds[in] Input array of object IDs of objects, whose fields are to be evaluated. If this is not null only, fields will be evaluated only for these objects.
pFieldsToEvaluate[in] Input array of object IDs of fields to be evaluated. If this is not null only these fields in the specified objects will be evaluated. If this is null all the fields in the specified objects will be evaluated.
pszEvaluatorId[in] Input evaluator ID. If this is not null only the fields matching this evaluator ID will be evaluated. If this is null all the fields in the specified objects will be evaluated.
nEvalFlag[in] Input one or more OdFd::EvalFields option flags
pNumFound[out] Output pointer to store the number of fields found; can be null if this information is not required
pNumEvaluated[out] Output pointer to store the number of fields evaluated; can be null if this information is not required

◆ oddbGetFieldEngine()

TOOLKIT_EXPORT OdFdFieldEnginePtr oddbGetFieldEngine ( )

Returns the pointer to the field engine. There is only one field engine object per session.

◆ oddbGetFieldEngineValueByError()

TOOLKIT_EXPORT OdString oddbGetFieldEngineValueByError ( const OdString sPrevValue)

◆ oddbSetFieldEngineValueFormatByError()

TOOLKIT_EXPORT OdString oddbSetFieldEngineValueFormatByError ( const OdString sValue = L"%ls")

◆ odfdGetAcVarData()

TOOLKIT_EXPORT bool odfdGetAcVarData ( const OdString sString,
OdString sName,
OdString sFormat 
)

Parses a string containing a field with AcVar, separating variable name and formatting.

Parameters
sString[in] The string to parse.
sName[out] The name of the AcVar.
sFormat[out] The format of the AcVar.
Returns
true - if specified string contains AcVar, false - otherwise.

◆ odfdGetSubStrings()

TOOLKIT_EXPORT void odfdGetSubStrings ( const OdString sString,
OdStringArray aSubStrings 
)

Splits a string into substrings: fields and the text separating them. The order remains the same.

Parameters
sString[in] The string to split.
aSubStrings[out] An array of strings, consisting of individual fields and portions of plain text.