CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
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

DBENT_EXPORT OdFdFieldEnginePtr oddbGetFieldEngine ()
 
DBENT_EXPORT OdString oddbGetFieldEngineValueByError (const OdString &sPrevValue)
 
DBENT_EXPORT OdString oddbSetFieldEngineValueFormatByError (const OdString &sValue=L"%ls")
 
DBENT_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)
 
DBENT_EXPORT void odfdGetSubStrings (const OdString &sString, OdStringArray &aSubStrings)
 
DBENT_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 350 of file FdField.h.

Typedef Documentation

◆ FieldReactors

This template class is a specialization of the OdArray class for OdFdFieldReactor object pointers.

Definition at line 250 of file FdField.h.

◆ OdFdFieldEnginePEPtr

This template class is a specialization of the OdSmartPtr class for OdFdFieldEnginePE object pointers.

Definition at line 506 of file FdField.h.

◆ OdFdFieldEnginePtr

This template class is a specialization of the OdSmartPtr class for OdFdFieldEngine object pointers.

Definition at line 349 of file FdField.h.

◆ OdFdFieldEvaluatorPtr

This template class is a specialization of the OdSmartPtr class for OdFdFieldEvaluator object pointers.

Definition at line 172 of file FdField.h.

Function Documentation

◆ oddbEvaluateFields()

DBENT_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 flag, predefined by the OdDbField::EvalContext enumeration, 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 parameter is not NULL, only these fields in the specified objects will be evaluated. If this parameter is NULL, all the fields in the specified objects will be evaluated.
pszEvaluatorId[in] Input evaluator ID. If this parameter is not NULL, only the fields matching this evaluator ID will be evaluated. If this parameter is NULL, all the fields in the specified objects will be evaluated.
nEvalFlag[in] 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.
Returns
eOk if the operation is successful or an appropriate error code otherwise.

◆ oddbGetFieldEngine()

DBENT_EXPORT OdFdFieldEnginePtr oddbGetFieldEngine ( )

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

Returns
Pointer to the field engine.

◆ oddbGetFieldEngineValueByError()

DBENT_EXPORT OdString oddbGetFieldEngineValueByError ( const OdString sPrevValue)

Gets the value format by error of the field engine and applies it to the value of the previous evaluation.

Parameters
sPrevValue[in] Value of the previous evaluation.
Returns
Formatted value of the previous evaluation.

◆ oddbSetFieldEngineValueFormatByError()

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

Sets the new value format by error for the field engine.

Parameters
sValue[in] New value format. Leave the default value to keep the result of the previous evaluation as is.
Returns
Previous value format by error of the field engine.

◆ odfdGetAcVarData()

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

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

Parameters
sString[in] String to parse.
sName[out] Name of the AcVar.
sFormat[out] Format of the AcVar.
Returns
True if the specified string contains AcVar, false otherwise.

◆ odfdGetSubStrings()

DBENT_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] String to split.
aSubStrings[out] Array of strings, consisting of individual fields and portions of plain text.