CFx SDK Documentation  2020SP3
Public Types | Public Member Functions | List of all members
OdDbField Class Reference

#include <DbField.h>

Inheritance diagram for OdDbField:
OdDbObject OdGiDrawable OdRxObject

Public Types

enum  State {
  kInitialized = 0x01, kCompiled = 0x02, kModified = 0x04, kEvaluated = 0x08,
  kHasCache = 0x10, kHasFormattedString = 0x20
}
 
enum  EvalOption {
  kDisable = 0, kOnOpen = 0x01, kOnSave = 0x02, kOnPlot = 0x04,
  kOnEtransmit = 0x08, kOnRegen = 0x10, kOnDemand = 0x20, kAutomatic = (kOnOpen | kOnSave | kOnPlot | kOnEtransmit | kOnRegen | kOnDemand)
}
 
enum  EvalContext {
  kOpen = 0x01, kSave = 0x02, kPlot = 0x04, kEtransmit = 0x08,
  kRegen = 0x10, kDemand = 0x20, kPreview = 0x40
}
 
enum  EvalStatus {
  kNotYetEvaluated = 0x01, kSuccess = 0x02, kEvaluatorNotFound = 0x04, kSyntaxError = 0x08,
  kInvalidCode = 0x10, kInvalidContext = 0x20, kOtherError = 0x40
}
 
enum  FieldCodeFlag {
  kRawCode = 0x00, kFieldCode = 0x01, kEvaluatedText = 0x02, kEvaluatedChildren = 0x04,
  kObjectReference = 0x08, kAddMarkers = 0x10, kEscapeBackslash = 0x20, kStripOptions = 0x40,
  kPreserveFields = 0x80, kTextField = 0x100, kPreserveOptions = 0x200, kDetachChildren = 0x400,
  kChildObjectReference = 0x800, kForExpression = 0x1000
}
 
enum  FilingOption { kSkipFilingResult = 0x01 }
 
- Public Types inherited from OdGiDrawable
enum  SetAttributesFlags {
  kDrawableNone = 0, kDrawableIsAnEntity = 1, kDrawableUsesNesting = 2, kDrawableIsCompoundObject = 4,
  kDrawableViewIndependentViewportDraw = 8, kDrawableIsInvisible = 16, kDrawableHasAttributes = 32, kDrawableRegenTypeDependantGeometry = 64,
  kDrawableIsDimension = (kDrawableIsAnEntity + kDrawableIsCompoundObject + 128), kDrawableRegenDraw = 256, kDrawableStandardDisplaySingleLOD = 512, kDrawableShadedDisplaySingleLOD = 1024,
  kDrawableViewDependentViewportDraw = 2048, kDrawableBlockDependentViewportDraw = 4096, kDrawableIsExternalReference = 8192, kDrawableNotPlottable = 16384,
  kLastFlag = kDrawableNotPlottable
}
 
enum  DrawableType {
  kGeometry = 0, kDistantLight = 1, kPointLight = 2, kSpotLight = 3,
  kAmbientLight, kSolidBackground, kGradientBackground, kImageBackground,
  kGroundPlaneBackground, kViewport, kWebLight, kSkyBackground,
  kImageBasedLightingBackground
}
 

Public Member Functions

 ODDB_DECLARE_MEMBERS (OdDbField)
 
 OdDbField ()
 
OdResult setInObject (OdDbObject *pOwner, const OdString &propertyName)
 
OdResult postInDatabase (OdDbDatabase *pDb)
 
OdDbField::State state () const
 
OdDbField::EvalStatus evaluationStatus () const
 
OdDbField::EvalOption evaluationOption () const
 
OdResult setEvaluationOption (OdDbField::EvalOption evaluationOption)
 
OdDbField::FilingOption filingOption () const
 
OdResult setFilingOption (OdDbField::FilingOption filingOption)
 
OdString evaluatorId () const
 
OdResult setEvaluatorId (const OdString &evaluatorId)
 
bool isTextField () const
 
OdString getFieldCode (OdDbField::FieldCodeFlag flags)
 
OdResult setFieldCode (const OdString &fieldCode, OdDbField::FieldCodeFlag flags=(OdDbField::FieldCodeFlag) 0, OdDbFieldArray *pChildFields=0)
 
OdUInt32 childCount () const
 
OdDbFieldPtr getChild (OdUInt32 childIndex, OdDb::OpenMode openMode)
 
OdString getFormat () const
 
OdResult setFormat (const OdString &format)
 
OdResult evaluate (int nContext, OdDbDatabase *pDb=0, int *pNumFound=0, int *pNumEvaluated=0)
 
OdValue::DataType dataType () const
 
OdString getValue () const
 
OdResult getValue (OdFieldValue &pValue) const
 
bool hasHyperlink () const
 
OdResult getHyperlink (OdString &psName, OdString &psDescription, OdString &psSubLocation, OdString &psDisplayString) const
 
OdResult setHyperlink (const OdString &psName, const OdString &psDescription, const OdString &psSubLocation=OdString::kEmpty)
 
OdResult removeHyperlink ()
 
OdFieldValue getData (const OdString &key) const
 
OdResult setData (const OdString &key, const OdFieldValue &pData)
 
virtual OdResult dwgInFields (OdDbDwgFiler *pFiler)
 
virtual void dwgOutFields (OdDbDwgFiler *pFiler) const
 
virtual OdResult dxfInFields (OdDbDxfFiler *pFiler)
 
virtual void dxfOutFields (OdDbDxfFiler *pFiler) const
 
virtual void subClose ()
 
- Public Member Functions inherited from OdDbObject
 ODDB_DECLARE_MEMBERS (OdDbObject)
 
 ~OdDbObject ()
 
void addRef ()
 
void release ()
 
long numRefs () const
 
OdDbObjectId objectId () const
 
OdDbHandle getDbHandle () const
 
OdDbHandle handle () const
 
OdDbObjectId ownerId () const
 
virtual void setOwnerId (OdDbObjectId ownerId)
 
OdDbDatabasedatabase () const
 
void createExtensionDictionary ()
 
OdDbObjectId extensionDictionary () const
 
bool releaseExtensionDictionary ()
 
OdDbXrecordPtr createXrecord (const OdString &xrecordName, OdDb::DuplicateRecordCloning style=OdDb::kDrcIgnore)
 
void upgradeOpen ()
 
void downgradeOpen ()
 
void cancel ()
 
virtual OdResult subOpen (OdDb::OpenMode mode)
 
OdResult erase (bool eraseIt=true)
 
virtual OdResult subErase (bool erasing)
 
void handOverTo (OdDbObject *pNewObject, bool keepXData=true, bool keepExtDict=true)
 
virtual void subHandOverTo (OdDbObject *pNewObject)
 
void swapIdWith (OdDbObjectId otherId, bool swapXdata=false, bool swapExtDict=false)
 
virtual void subSwapIdWith (const OdDbObjectId &otherId, bool swapXdata=false, bool swapExtDict=false)
 
virtual void audit (OdDbAuditInfo *pAuditInfo)
 
void dwgIn (OdDbDwgFiler *pFiler)
 
void dwgOut (OdDbDwgFiler *pFiler) const
 
virtual OdResult dxfIn (OdDbDxfFiler *pFiler)
 
virtual void dxfOut (OdDbDxfFiler *pFiler) const
 
virtual OdResult dxfInFields_R12 (OdDbDxfFiler *pFiler)
 
virtual void dxfOutFields_R12 (OdDbDxfFiler *pFiler) const
 
virtual OdDb::DuplicateRecordCloning mergeStyle () const
 
virtual OdResBufPtr xData (const OdString &regappName=OdString::kEmpty) const
 
virtual void setXData (const OdResBuf *pRb)
 
bool isEraseStatusToggled () const
 
bool isErased () const
 
bool isReadEnabled () const
 
bool isWriteEnabled () const
 
bool isNotifyEnabled () const
 
bool isModified () const
 
bool isModifiedXData () const
 
bool isModifiedGraphics () const
 
bool isNewObject () const
 
bool isNotifying () const
 
bool isUndoing () const
 
bool isReallyClosing () const
 
bool isDBRO () const
 
void assertReadEnabled () const
 
void assertWriteEnabled (bool autoUndo=true, bool recordModified=true)
 
void assertNotifyEnabled () const
 
void disableUndoRecording (bool disable)
 
bool isUndoRecordingDisabled () const
 
OdDbDwgFilerundoFiler ()
 
virtual void applyPartialUndo (OdDbDwgFiler *pUndoFiler, OdRxClass *pClassObj)
 
void addReactor (OdDbObjectReactor *pReactor) const
 
void removeReactor (OdDbObjectReactor *pReactor) const
 
virtual void addPersistentReactor (const OdDbObjectId &objId)
 
virtual void removePersistentReactor (const OdDbObjectId &objId)
 
bool hasPersistentReactor (const OdDbObjectId &objId) const
 
OdDbObjectIdArray getPersistentReactors () const
 
OdDbObjectReactorArray getTransientReactors () const
 
virtual void recvPropagateModify (const OdDbObject *pSubObj)
 
virtual void xmitPropagateModify () const
 
ODRX_SEALED_VIRTUAL OdDbObjectPtr deepClone (OdDbIdMapping &ownerIdMap, OdDbObject *pOwner, bool bPrimary=true) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdDbObjectPtr wblockClone (OdDbIdMapping &ownerIdMap, OdDbObject *pOwner, bool bPrimary=true) const ODRX_SEALED
 
virtual void appendToOwner (OdDbIdPair &idPair, OdDbObject *pOwnerObject, OdDbIdMapping &ownerIdMap)
 
void setOdDbObjectIdsInFlux ()
 
bool isOdDbObjectIdsInFlux () const
 
virtual void copied (const OdDbObject *pObject, const OdDbObject *pNewObject)
 
virtual void erased (const OdDbObject *pObject, bool erasing=true)
 
virtual void goodbye (const OdDbObject *pObject)
 
virtual void openedForModify (const OdDbObject *pObject)
 
virtual void modified (const OdDbObject *pObject)
 
virtual void subObjModified (const OdDbObject *pObject, const OdDbObject *pSubObj)
 
virtual void modifyUndone (const OdDbObject *pObject)
 
virtual void modifiedXData (const OdDbObject *pObject)
 
virtual void unappended (const OdDbObject *pObject)
 
virtual void reappended (const OdDbObject *pObject)
 
bool isAProxy () const
 
virtual void objectClosed (const OdDbObjectId &objectId)
 
virtual void modifiedGraphics (const OdDbObject *pObject)
 
virtual void copyFrom (const OdRxObject *pSource)
 
bool hasSaveVersionOverride () const
 
void setHasSaveVersionOverride (bool hasSaveVersionOverride)
 
virtual OdDb::DwgVersion getObjectSaveVersion (const OdDbFiler *pFiler, OdDb::MaintReleaseVer *pMaintVer=0) const
 
virtual OdDbObjectPtr decomposeForSave (OdDb::DwgVersion ver, OdDbObjectId &replaceId, bool &exchangeXData)
 
virtual OdDbObjectPtr decomposeForSave (OdDb::SaveType format, OdDb::DwgVersion ver, OdDbObjectId &replaceId, bool &exchangeXData)
 
void convertForSave (OdDb::DwgVersion ver)
 
virtual void composeForLoad (OdDb::SaveType format, OdDb::DwgVersion version, OdDbAuditInfo *pAuditInfo)
 
virtual OdGiDrawabledrawable ()
 
virtual OdUInt32 subSetAttributes (OdGiDrawableTraits *pTraits) const
 
virtual bool subWorldDraw (OdGiWorldDraw *pWd) const
 
virtual void subViewportDraw (OdGiViewportDraw *pVd) const
 
virtual bool isPersistent () const
 
virtual OdDbStub * id () const
 
ODRX_SEALED_VIRTUAL OdResult getClassID (void *pClsid) const ODRX_SEALED
 
void setGsNode (OdGsCache *pNode)
 
OdGsCachegsNode () const
 
void xDataTransformBy (const OdGeMatrix3d &xfm)
 
bool hasFields () const
 
OdDbObjectId getField (const OdString &fieldName) const
 
OdDbObjectPtr getField (const OdString &fieldName, OdDb::OpenMode mode) const
 
virtual OdDbObjectId setField (const OdString &fieldName, OdDbField *pField)
 
virtual OdResult removeField (OdDbObjectId fieldId)
 
virtual OdDbObjectId removeField (const OdString &fieldName)
 
OdDbObjectId getFieldDictionary () const
 
OdDbObjectPtr getFieldDictionary (OdDb::OpenMode mode) const
 
virtual OdRxClasssaveAsClass (OdRxClass *pClass) const
 
- Public Member Functions inherited from OdGiDrawable
 ODRX_DECLARE_MEMBERS (OdGiDrawable)
 
virtual DrawableType drawableType () const
 
ODRX_SEALED_VIRTUAL OdUInt32 setAttributes (OdGiDrawableTraits *pTraits) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL bool worldDraw (OdGiWorldDraw *pWd) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL void viewportDraw (OdGiViewportDraw *pVd) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdUInt32 viewportDrawLogicalFlags (OdGiViewportDraw *pVd) const ODRX_SEALED
 
virtual OdResult getGeomExtents (OdGeExtents3d &extents) const
 
ODRX_SEALED_VIRTUAL OdUInt32 regenSupportFlags () const ODRX_SEALED
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Additional Inherited Members

- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 
- Protected Member Functions inherited from OdDbObject
 OdDbObject ()
 
virtual OdResult subGetClassID (void *pClsid) const
 
virtual OdDbObjectPtr subDeepClone (OdDbIdMapping &ownerIdMap, OdDbObject *pOwner, bool bPrimary) const
 
virtual OdDbObjectPtr subWblockClone (OdDbIdMapping &ownerIdMap, OdDbObject *pOwner, bool bPrimary) const
 
- Protected Member Functions inherited from OdGiDrawable
 OdGiDrawable ()
 
virtual OdUInt32 subViewportDrawLogicalFlags (OdGiViewportDraw *vd) const
 
virtual OdUInt32 subRegenSupportFlags () const
 
- Protected Attributes inherited from OdDbObject
OdDbObjectImplm_pImpl
 

Detailed Description

This class represents Field objects in an OdDbDatabase instance.

Remarks
Field objects store both the Field expression and their evaluated values.

Fields can be evaluated by an evaluator to any one of the following data types: Long,
Double, String, Date, Point, 3dPoint, ObjectId, Buffer, and Resbuf.

<group OdDb_Classes>

Definition at line 78 of file DbField.h.

Member Enumeration Documentation

◆ EvalContext

Enumerator
kOpen 
kSave 
kPlot 
kEtransmit 
kRegen 
kDemand 
kPreview 

Definition at line 103 of file DbField.h.

◆ EvalOption

Enumerator
kDisable 
kOnOpen 
kOnSave 
kOnPlot 
kOnEtransmit 
kOnRegen 
kOnDemand 
kAutomatic 

Definition at line 91 of file DbField.h.

◆ EvalStatus

Enumerator
kNotYetEvaluated 
kSuccess 
kEvaluatorNotFound 
kSyntaxError 
kInvalidCode 
kInvalidContext 
kOtherError 

Definition at line 114 of file DbField.h.

◆ FieldCodeFlag

Enumerator
kRawCode 
kFieldCode 
kEvaluatedText 
kEvaluatedChildren 
kObjectReference 
kAddMarkers 
kEscapeBackslash 
kStripOptions 
kPreserveFields 
kTextField 
kPreserveOptions 
kDetachChildren 
kChildObjectReference 
kForExpression 

Definition at line 125 of file DbField.h.

◆ FilingOption

Enumerator
kSkipFilingResult 

Definition at line 143 of file DbField.h.

◆ State

Enumerator
kInitialized 
kCompiled 
kModified 
kEvaluated 
kHasCache 
kHasFormattedString 

Definition at line 81 of file DbField.h.

Constructor & Destructor Documentation

◆ OdDbField()

OdDbField::OdDbField ( )

Member Function Documentation

◆ childCount()

OdUInt32 OdDbField::childCount ( ) const

Returns the number of child fields in this Field object.

◆ dataType()

OdValue::DataType OdDbField::dataType ( ) const

Returns the data type of this Field object in the specified form.

Remarks
Returns kUnknown if the field has yet to be evaluated.
Returns
Returns one of the following:

Value OdFieldValue::kUnknown 0 OdFieldValue::kLong 0x01 OdFieldValue::kDouble 0x02 OdFieldValue::kString 0x04 OdFieldValue::kDate 0x08 OdFieldValue::kPoint 0x10 OdFieldValue::k3dPoint 0x20 OdFieldValue::kObjectId 0x40 OdFieldValue::kBuffer 0x80 OdFieldValue::kResbuf 0x100

◆ dwgInFields()

virtual OdResult OdDbField::dwgInFields ( OdDbDwgFiler pFiler)
virtual

Reads the .dwg file data of this object.

Parameters
pFiler[in] Filer object from which data are read.
Returns
Returns the filer status.

This function is called by dwgIn() to allow the object to read its data.

When overriding this function:

1) Call assertWriteEnabled(). 2) Call the parent class's dwgInFields(pFiler). 3) If it returns eOK, continue; otherwise return whatever the parent's dwgInFields(pFiler) returned. 4) Call the OdDbDwgFiler(pFiler) methods to read each of the object's data items in the order they were written. 5) Return pFiler->filerStatus().

Reimplemented from OdDbObject.

◆ dwgOutFields()

virtual void OdDbField::dwgOutFields ( OdDbDwgFiler pFiler) const
virtual

Writes the .dwg file data of this object.

Parameters
pFiler[in] Pointer to the filer to which data are written.
Remarks

This function is called by dwgIn() to allow the object to write its data.

When overriding this function:

1) Call assertReadEnabled(). 2) Call the parent class's dwgOutFields(pFiler). 3) Call the OdDbDwgFiler(pFiler) methods to write each of the object's data items in the order they were written.

Reimplemented from OdDbObject.

◆ dxfInFields()

virtual OdResult OdDbField::dxfInFields ( OdDbDxfFiler pFiler)
virtual

Reads the DXF data of this object.

Parameters
pFiler[in] Pointer to the filer from which data are read.
Returns
Returns the filer status.

This function is called by dxfIn() to allow the object to read its data.

When overriding this function:

1) Call assertWriteEnabled(). 2) Call the parent class's dwgInFields(pFiler). 3) If it returns eOK, continue; otherwise return whatever the parent's dxfInFields(pFiler) returned. 4) Call the OdDbDxfFiler(pFiler) methods to read each of the object's data items in the order they were written. 5) Return pFiler->filerStatus().

Reimplemented from OdDbObject.

◆ dxfOutFields()

virtual void OdDbField::dxfOutFields ( OdDbDxfFiler pFiler) const
virtual

Writes the DXF data of this object.

Parameters
pFiler[in] Pointer to the filer to which data are to be written.
Remarks

This function is called by dxfOut() to allow the object to write its data.

When overriding this function:

1) Call assertReadEnabled(). 2) Call the parent class's dxfOutFields(pFiler). 4) Use pFiler to call the OdDbDxfFiler methods to write each of the object's data items in the order they were written.

Reimplemented from OdDbObject.

◆ evaluate()

OdResult OdDbField::evaluate ( int  nContext,
OdDbDatabase pDb = 0,
int *  pNumFound = 0,
int *  pNumEvaluated = 0 
)

Returns the evaluated Field object.

Remarks
After creating a field object and setting the field code, call this method to evaluate the field. If pDb is null, the field's database will be used if the field is a database resident. If it is null and the field is not a database resident, evaluation will fail if the field requires a database.
Parameters
nContext[in] Context in which the field is evaluated; the context flag can be one of the
predefinedOdDbField::EvalContext enum flags or a user-defined context flag.
pDb[in] Database to be used for the evaluation; can be null.
pNumFound[out] Pointer to receive the number of fields evaluated; can be null if not required.
pNumEvaluated[out] Pointer to receive the number of fields evaluated; can be null if this information is not required.

◆ evaluationOption()

OdDbField::EvalOption OdDbField::evaluationOption ( ) const

Returns the evaluation option of this Field object.

Remarks
evaluationOption() returns a combination of one or more of the following:

Value Description kDisable 0x00 Do not evaluate field. kOnOpen 0x01 Evaluate field when a drawing is opened. kOnSave 0x02 Evaluate field when a drawing is saveed. kOnPlot 0x04 Evaluate field when a drawing is printed. kOnEtransmit 0x08 Evaluate field when a drawing is etransmitted. kOnRegen 0x10 Evaluate field when a drawing is regenerated. kOnDemand 0x20 Evaluate field when demanded. kAutomatic 0x3F Evaluate field automatically.

◆ evaluationStatus()

OdDbField::EvalStatus OdDbField::evaluationStatus ( ) const

Returns the evaluation status of this Field object.

Remarks
evaluationStatus() returns a combination of one or more of the following:

Value Description kNotYetEvaluated 0x01 Evaluation not complete. kSuccess 0x02 Evaluation complete: Successful. kEvaluatorNotFound 0x04 Evaluator for the field not found. kSyntaxError 0x08 Evaluation complete: Field code syntax error. kInvalidCode 0x10 Evaluation complete: Invalid field code. kInvalidContext 0x20 Evaluation complete: Invalid context to evaluate field. kOtherError 0x40 Evaluation complete: Other evaluation error.

◆ evaluatorId()

OdString OdDbField::evaluatorId ( ) const

Returns the ID of the evaluator for this Field object.

Remarks
Returns an empty string if no evaluator has been set for this Field object, or if the evaluator cannot be found.

◆ filingOption()

OdDbField::FilingOption OdDbField::filingOption ( ) const

Returns the filing option of this Field object.

Remarks
filingOption() returns zero or more of the following:

Value Description kSkipFilingResult 0x01 Do not file field value.

◆ getChild()

OdDbFieldPtr OdDbField::getChild ( OdUInt32  childIndex,
OdDb::OpenMode  openMode 
)

Returns the specified child field in this Field object, and opens it in the specified mode.

Parameters
childIndex[in] Child index.
openMode[in] Mode to apply to the child field.

◆ getData()

OdFieldValue OdDbField::getData ( const OdString key) const

Returns the data for the specified key of this Field object.

Parameters
key[in] Key.

◆ getFieldCode()

OdString OdDbField::getFieldCode ( OdDbField::FieldCodeFlag  flags)

Returns the field code of this Field object in the specified form..

Parameters
flags[in] Field code flags.
Remarks
flags() returns a combination of one or more of the following:

Value Description kFieldCode 0x01 Returns the raw field code. kEvaluatedText 0x02 Returns the evaluated text. kEvaluatedChildren 0x04 Returns the field code with evaluated text for child fields. kObjectReference 0x08 Returns the field code as an object reference. kAddMarkers 0x10 Includes markers around field codes. kEscapeBackslash 0x20 Converts single backslashes to double backslashes. kStripOptions 0x40 Strips the standard options from the field code. kPreserveFields 0x80 Internal use only. Ignored. kTextField 0x100 Treats the field as text with embedded fields. Ignored.

◆ getFormat()

OdString OdDbField::getFormat ( ) const

Returns the output format for this Field object.

◆ getHyperlink()

OdResult OdDbField::getHyperlink ( OdString psName,
OdString psDescription,
OdString psSubLocation,
OdString psDisplayString 
) const

◆ getValue() [1/2]

OdString OdDbField::getValue ( ) const

Returns the field evaluation string using the output format for this Field object.

Remarks
Returns an empty string if not successful.

◆ getValue() [2/2]

OdResult OdDbField::getValue ( OdFieldValue pValue) const

Returns the field evaluation string using the output format for this Field object.

Parameters
pValue[in] Receives a SmartPointer to the evaluation string.
Remarks
Returns eOk if successful, or returns an appropriate error code if unsuccessful.
The string pointed to by pValue must be freed by the caller.

◆ hasHyperlink()

bool OdDbField::hasHyperlink ( ) const

◆ isTextField()

bool OdDbField::isTextField ( ) const

Returns true if and only if this Field object is text with child fields.

◆ ODDB_DECLARE_MEMBERS()

OdDbField::ODDB_DECLARE_MEMBERS ( OdDbField  )

◆ postInDatabase()

OdResult OdDbField::postInDatabase ( OdDbDatabase pDb)

Adds this Field object and its Child objects to the specified database.

Parameters
pDb[in] Pointer to the database in which to post.

◆ removeHyperlink()

OdResult OdDbField::removeHyperlink ( )

◆ setData()

OdResult OdDbField::setData ( const OdString key,
const OdFieldValue pData 
)

Sets the data for the specified key of this Field object.

Parameters
key[in] Key.
pData[in] Pointer to the object containing the data.

◆ setEvaluationOption()

OdResult OdDbField::setEvaluationOption ( OdDbField::EvalOption  evaluationOption)

Sets the evaluation option for this Field object.

Parameters
evaluationOption[in] Evaluation option.
Remarks
evaluationStatus must be a combination of one or more of the following:

Value Description kDisable 0 Do not evaluate field. kOnOpen 0x01 Evaluate field when a drawing is opened. kOnSave 0x02 Evaluate field when a drawing is saved. kOnPlot 0x04 Evaluate field when a drawing is printed. kOnEtransmit 0x08 Evaluate field when a drawing is etransmitted. kOnRegen 0x10 Evaluate field when a drawing is regenerated. kOnDemand 0x20 Evaluate field when demanded. kAutomatic 0x3F Evaluate field automatically.

◆ setEvaluatorId()

OdResult OdDbField::setEvaluatorId ( const OdString evaluatorId)

Sets the ID of the evaluator for this Field object.

Parameters
evaluatorId[in] Evaluator ID.

◆ setFieldCode()

OdResult OdDbField::setFieldCode ( const OdString fieldCode,
OdDbField::FieldCodeFlag  flags = (OdDbField::FieldCodeFlag) 0,
OdDbFieldArray pChildFields = 0 
)

Sets the field code of this Field object in the specified form.

Parameters
fieldCode[in] Field code.
flags[in] Field code flags.
pChildFields[in] Pointer to an array of child fields.
Remarks
Child fields are the embedded fields of text fields, and nested fields of non-text fields.

flags must be a combination of one or more of the following:

Value Description kFieldCode 0x01 Returns the raw field code. Ignored. kEvaluatedText 0x02 Returns the evaluated text. Ignored. kEvaluatedChildren 0x04 Returns the field code with evaluated text for child fields. Ignored. kObjectReference 0x08 Returns the field code as an object reference. Ignored. kAddMarkers 0x10 Includes markers around field codes. Ignored. kEscapeBackslash 0x20 Converts single backslashes to double backslashes. Ignored. kStripOptions 0x40 Strips the standard options from the field code. Ignored. kPreserveFields 0x80 Internal use only. kTextField 0x100 Treats the field as text with embedded fields.

◆ setFilingOption()

OdResult OdDbField::setFilingOption ( OdDbField::FilingOption  filingOption)

Sets the filing option for this Field object.

Remarks
filingOption must be zero or more of the following:

Value Description kSkipFilingResult 0x01 Do not file field value.

◆ setFormat()

OdResult OdDbField::setFormat ( const OdString format)

Sets the output format for this Field object.

Parameters
format[in] Output format.
Returns
Returns eOk if successful, or an appropriate error code if not.

◆ setHyperlink()

OdResult OdDbField::setHyperlink ( const OdString psName,
const OdString psDescription,
const OdString psSubLocation = OdString::kEmpty 
)

◆ setInObject()

OdResult OdDbField::setInObject ( OdDbObject pOwner,
const OdString propertyName 
)

Sets this Field object as a property of the specified object, and adds it to the database.

Parameters
pOwner[in] Pointer to the Owner object.
propertyName[in] Name of the property.
Remarks
The specified object must be database resident.

◆ state()

OdDbField::State OdDbField::state ( ) const

Returns the state of this Field object.

Remarks
state() returns a combination of zero or more of the following:

Value Description kInitialized 0x01 Field was initialized by the evaluator. kCompiled 0x02 Field was compiled. kModified 0x04 Field code was modified, but not evaluated. kEvaluated 0x08 Field was evaluated. kHasCache 0x10 Field has evaluated cache. kHasFormattedString 0x20 Internal use only.

◆ subClose()

virtual void OdDbField::subClose ( )
virtual

Called as the first operation as this object is being closed, for database -resident objects only.

Remarks
This function is notified just before the current open operation is to be closed, giving this function the ability to perform necessary operatons.

When overriding this function:

1) If the OdDbObject's state is incorrect, throw exception.

2) Call parent class's subClose().

3) If other actions are required before close, do them.

The default implementation of this function does nothing. This function can be overridden in custom classes.

Reimplemented from OdDbObject.


The documentation for this class was generated from the following file: