CFx SDK Documentation
2022 SP0
|
#include <DbField.h>
Additional Inherited Members | |
Static Public Member Functions inherited from OdRxObject | |
static OdRxObjectPtr | cast (const OdRxObject *pointer) |
static OdRxClass * | desc () |
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 | |
OdDbObjectImpl * | m_pImpl |
This class represents Field objects in an OdDbDatabase instance.
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>
enum OdDbField::State |
OdDbField::OdDbField | ( | ) |
OdUInt32 OdDbField::childCount | ( | ) | const |
Returns the number of child fields in this Field object.
OdValue::DataType OdDbField::dataType | ( | ) | const |
Returns the data type of this Field object in the specified form.
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
|
virtual |
Reads the .dwg file data of this object.
pFiler | [in] Filer object from which data are read. |
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.
|
virtual |
Writes the .dwg file data of this object.
pFiler | [in] Pointer to the filer to which data are written. |
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.
|
virtual |
Reads the DXF data of this object.
pFiler | [in] Pointer to the filer from which data are read. |
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.
|
virtual |
Writes the DXF data of this object.
pFiler | [in] Pointer to the filer to which data are to be written. |
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.
OdResult OdDbField::evaluate | ( | int | nContext, |
OdDbDatabase * | pDb = 0 , |
||
int * | pNumFound = 0 , |
||
int * | pNumEvaluated = 0 |
||
) |
Returns the evaluated Field object.
nContext | [in] Context in which the field is evaluated; the context flag can be one of the |
predefined | OdDbField::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. |
OdDbField::EvalOption OdDbField::evaluationOption | ( | ) | const |
Returns the evaluation option of this Field object.
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.
OdDbField::EvalStatus OdDbField::evaluationStatus | ( | ) | const |
Returns the evaluation status of this Field object.
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.
OdString OdDbField::evaluatorId | ( | ) | const |
Returns the ID of the evaluator for this Field object.
OdDbField::FilingOption OdDbField::filingOption | ( | ) | const |
Returns the filing option of this Field object.
Value Description kSkipFilingResult 0x01 Do not file field value.
OdDbFieldPtr OdDbField::getChild | ( | OdUInt32 | childIndex, |
OdDb::OpenMode | openMode | ||
) |
Returns the specified child field in this Field object, and opens it in the specified mode.
childIndex | [in] Child index. |
openMode | [in] Mode to apply to the child field. |
OdFieldValue OdDbField::getData | ( | const OdString & | key | ) | const |
Returns the data for the specified key of this Field object.
key | [in] Key. |
OdString OdDbField::getFieldCode | ( | OdDbField::FieldCodeFlag | flags | ) |
Returns the field code of this Field object in the specified form..
flags | [in] Field code flags. |
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.
OdString OdDbField::getFormat | ( | ) | const |
Returns the output format for this Field object.
OdResult OdDbField::getHyperlink | ( | OdString & | psName, |
OdString & | psDescription, | ||
OdString & | psSubLocation, | ||
OdString & | psDisplayString | ||
) | const |
OdString OdDbField::getValue | ( | ) | const |
Returns the field evaluation string using the output format for this Field object.
OdResult OdDbField::getValue | ( | OdFieldValue & | pValue | ) | const |
Returns the field evaluation string using the output format for this Field object.
pValue | [in] Receives a SmartPointer to the evaluation string. |
bool OdDbField::hasHyperlink | ( | ) | const |
bool OdDbField::isTextField | ( | ) | const |
Returns true if and only if this Field object is text with child fields.
OdDbField::ODDB_DECLARE_MEMBERS | ( | OdDbField | ) |
OdResult OdDbField::postInDatabase | ( | OdDbDatabase * | pDb | ) |
Adds this Field object and its Child objects to the specified database.
pDb | [in] Pointer to the database in which to post. |
OdResult OdDbField::removeHyperlink | ( | ) |
OdResult OdDbField::setData | ( | const OdString & | key, |
const OdFieldValue & | pData | ||
) |
Sets the data for the specified key of this Field object.
key | [in] Key. |
pData | [in] Pointer to the object containing the data. |
OdResult OdDbField::setEvaluationOption | ( | OdDbField::EvalOption | evaluationOption | ) |
Sets the evaluation option for this Field object.
evaluationOption | [in] Evaluation option. |
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.
Sets the ID of the evaluator for this Field object.
evaluatorId | [in] Evaluator ID. |
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.
fieldCode | [in] Field code. |
flags | [in] Field code flags. |
pChildFields | [in] Pointer to an array of child 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.
OdResult OdDbField::setFilingOption | ( | OdDbField::FilingOption | filingOption | ) |
Sets the filing option for this Field object.
Value Description kSkipFilingResult 0x01 Do not file field value.
Sets the output format for this Field object.
format | [in] Output format. |
OdResult OdDbField::setHyperlink | ( | const OdString & | psName, |
const OdString & | psDescription, | ||
const OdString & | psSubLocation = OdString::kEmpty |
||
) |
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.
pOwner | [in] Pointer to the Owner object. |
propertyName | [in] Name of the property. |
OdDbField::State OdDbField::state | ( | ) | const |
Returns the state of this Field object.
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.
|
virtual |
Called as the first operation as this object is being closed, for database -resident objects only.
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.