CFx SDK Documentation  2020SP3
Public Member Functions | List of all members
OdRxDictionary Class Referenceabstract

#include <RxDictionary.h>

Inheritance diagram for OdRxDictionary:
OdRxObject OdRxDispatchImpl< TBase >

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdRxDictionary)
 
virtual void reserve (OdUInt32 minSize)
 
virtual OdRxObjectPtr getAt (const OdString &key) const =0
 
virtual OdRxObjectPtr getAt (OdUInt32 id) const =0
 
virtual OdRxObjectPtr putAt (const OdString &key, OdRxObject *pObject, OdUInt32 *pRetId=0)=0
 
virtual OdRxObjectPtr putAt (OdUInt32 id, OdRxObject *pObject)=0
 
virtual bool resetKey (OdUInt32 id, const OdString &newKey)=0
 
virtual OdRxObjectPtr remove (const OdString &key)=0
 
virtual OdRxObjectPtr remove (OdUInt32 id)=0
 
void removeAll ()
 
virtual bool has (const OdString &key) const =0
 
virtual bool has (OdUInt32 id) const =0
 
virtual OdUInt32 idAt (const OdString &key) const =0
 
virtual OdString keyAt (OdUInt32 id) const =0
 
virtual OdUInt32 numEntries () const =0
 
virtual OdRxDictionaryIteratorPtr newIterator (OdRx::DictIterType iterType=OdRx::kDictCollated)=0
 
virtual bool isCaseSensitive () const =0
 
OdSmartPtr< OdRxDictionarysubDict (const OdString *path, int numSteps, bool createIfNotFound)
 
OdSmartPtr< OdRxDictionarysubDictCr (const OdString *path, int numSteps)
 
- 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
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
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 ()
 

Detailed Description

<group OdRx_Classes> This class implements the Dictionary object.

Remarks
Each instance of OdRxbDictionary is a single container object, in which items are searched, added, modified, and deleted.
Each dictionary item is associated with an unique textual string named keyword and 32-Bit ID with an unique OdDbObject. Anonymous names are signified by specifying a name starting with an asterisk; e.g., *U. A unique name (also starting with an asterisk) will be constructed for the entry. Entry names honor the rules of Symbol names Names may be any length. Names are case-insensitve Names may not contain any of the following characters: | * \ : ; < > ? " , equals
See also
OdRxDictionaryIterator

Corresponding C++ library: TD_Db

See also
<link dictionary_sample.html, Example of Working with a Dictionary>
<link dictionary.html, Working with Dictionaries>

Definition at line 113 of file RxDictionary.h.

Member Function Documentation

◆ getAt() [1/2]

virtual OdRxObjectPtr OdRxDictionary::getAt ( const OdString key) const
pure virtual

Returns the /non-typified smart pointer/ to the instance that is associated with the dictionary item specified by the keyword.

Parameters
key[in] Item keyword as a string value.
Remarks
Returns a Null if the specified item is not found.
See also
<link dictionary_sample.html, Example of Working with a Dictionary>
<link dictionary_functionality.html, Functionality of Dictionaries>

Implemented in OdRxDispatchImpl< TBase >.

◆ getAt() [2/2]

virtual OdRxObjectPtr OdRxDictionary::getAt ( OdUInt32  id) const
pure virtual

Returns the /non-typified smart pointer/ to the instance that is associated with the dictionary item specified by the ID.

Parameters
id[in] Item ID as an integer value.
Remarks
Returns a Null if the specified item is not found.
See also
<link dictionary_sample.html, Example of Working with a Dictionary>
<link dictionary_functionality.html, Functionality of Dictionaries>

Implemented in OdRxDispatchImpl< TBase >.

◆ has() [1/2]

virtual bool OdRxDictionary::has ( const OdString key) const
pure virtual

Returns true if and only if the dictionary object contains the item with the specified keyword.

Parameters
key[in] Keyword as a string value.
See also
<link dictionary_sample.html, Example of Working with a Dictionary>
<link dictionary_functionality.html, Functionality of Dictionaries>

Implemented in OdRxDispatchImpl< TBase >.

◆ has() [2/2]

virtual bool OdRxDictionary::has ( OdUInt32  id) const
pure virtual

Returns true if and only if the dictionary object contains the item with the specified ID.

Parameters
id[in] ID as an integer value.
See also
<link dictionary_sample.html, Example of Working with a Dictionary>
<link dictionary_functionality.html, Functionality of Dictionaries>

Implemented in OdRxDispatchImpl< TBase >.

◆ idAt()

virtual OdUInt32 OdRxDictionary::idAt ( const OdString key) const
pure virtual

Returns the ID of the item specified by the keyword in the dictionary object.

Parameters
key[in] Keyword as a string value.
Remarks
Returns (-1) if the keyword is not found in the dictionary.
See also
<link dictionary_sample.html, Example of Working with a Dictionary>
<link dictionary_functionality.html, Functionality of Dictionaries>

Implemented in OdRxDispatchImpl< TBase >.

◆ isCaseSensitive()

virtual bool OdRxDictionary::isCaseSensitive ( ) const
pure virtual

Returns true if and only if keywords of the dictionary object are case-sensitive, or false if keywords are case-insensitive.

See also
<link dictionary_functionality.html, Functionality of Dictionaries>

Implemented in OdRxDispatchImpl< TBase >.

◆ keyAt()

virtual OdString OdRxDictionary::keyAt ( OdUInt32  id) const
pure virtual

Returns the keyword of the item specified by the ID in the dictionary object.

Parameters
id[in] Entry ID.
Remarks
Returns an empty string if ID is not found in the dictionary.
See also
<link dictionary_sample.html, Example of Working with a Dictionary>
<link dictionary_functionality.html, Functionality of Dictionaries>

Implemented in OdRxDispatchImpl< TBase >.

◆ newIterator()

virtual OdRxDictionaryIteratorPtr OdRxDictionary::newIterator ( OdRx::DictIterType  iterType = OdRx::kDictCollated)
pure virtual

Returns a new interator that can be used to traverse through items of the dictionary object.

Parameters
iterType[in] Type of iterator.
Remarks
The iterator type can be one of the following:

Description OdRx::kDictCollated Traverses the entries in the order they were added to the dictionary. OdRx::kDictSorted Traverses the entries in alphabetical order by key value.

See also
<link dictionary_sample.html, Example of Working with a Dictionary>
<link dictionary_functionality.html, Functionality of Dictionaries>

<link dictionary_iterating.html, Iterating through Items of a Dictionary>

<link iterator_concept.html, Concept of Iterators>

Implemented in OdRxDispatchImpl< TBase >.

◆ numEntries()

virtual OdUInt32 OdRxDictionary::numEntries ( ) const
pure virtual

Returns the number of items in the dictionary object.

See also
<link dictionary_sample.html, Example of Working with a Dictionary>
<link dictionary_functionality.html, Functionality of Dictionaries>

Implemented in OdRxDispatchImpl< TBase >.

◆ ODRX_DECLARE_MEMBERS()

OdRxDictionary::ODRX_DECLARE_MEMBERS ( OdRxDictionary  )

◆ putAt() [1/2]

virtual OdRxObjectPtr OdRxDictionary::putAt ( const OdString key,
OdRxObject pObject,
OdUInt32 pRetId = 0 
)
pure virtual

Puts the instance specified by the smart pointer into the dictionary object and associates it with the specified keyword.

Parameters
key[in] Keyword as a string value.
pObject[in] Pointer to the instance to be put.
pRetId[in] Pointer to an OdUInt32 to receive the Entry ID of the entry.
Returns
Returns a smart pointer to the object at this entry prior to the call.
Remarks
Keyword and smart pointer must not be Null.
See also
<link dictionary_sample.html, Example of Working with a Dictionary>
<link dictionary_functionality.html, Functionality of Dictionaries>

Implemented in OdRxDispatchImpl< TBase >.

◆ putAt() [2/2]

virtual OdRxObjectPtr OdRxDictionary::putAt ( OdUInt32  id,
OdRxObject pObject 
)
pure virtual

Puts the instance specified by the smart pointer into the dictionary object and associates it with the specified keyword.

Parameters
id[in] ID as an integer value.
pObject[in] Pointer to the instance to be put.
Returns
Returns a smart pointer to the object at this entry prior to the call.
Remarks
Smart pointer must not be Null, and id > 0.
See also
<link dictionary_sample.html, Example of Working with a Dictionary>
<link dictionary_functionality.html, Functionality of Dictionaries>

Implemented in OdRxDispatchImpl< TBase >.

◆ remove() [1/2]

virtual OdRxObjectPtr OdRxDictionary::remove ( const OdString key)
pure virtual

Removes the item specified by keyword from the dictionary object.

Parameters
key[in] Keyword as a string value.
Remarks
This method does not delete the instance associated with the removed item and returns a smart pointer to the instance referenced by the item.
See also
<link dictionary_sample.html, Example of Working with a Dictionary>
<link dictionary_functionality.html, Functionality of Dictionaries>

Implemented in OdRxDispatchImpl< TBase >.

◆ remove() [2/2]

virtual OdRxObjectPtr OdRxDictionary::remove ( OdUInt32  id)
pure virtual

Removes the item specified by keyword or ID from the dictionary object.

Parameters
id[in] ID as an integer value.
Remarks
This method does not delete the instance associated with the removed item and returns a smart pointer to the instance referenced by the item.
See also
<link dictionary_sample.html, Example of Working with a Dictionary>
<link dictionary_functionality.html, Functionality of Dictionaries>

Implemented in OdRxDispatchImpl< TBase >.

◆ removeAll()

void OdRxDictionary::removeAll ( )
inline

Definition at line 267 of file RxDictionary.h.

◆ reserve()

virtual void OdRxDictionary::reserve ( OdUInt32  minSize)
virtual

Allocates storage for the specified number of items in this dictionary object.

Parameters
minSize[in] Minimum number of items for allocating.
See also
<link dictionary_sample.html, Example of Working with a Dictionary>
<link dictionary_functionality.html, Functionality of Dictionaries>

◆ resetKey()

virtual bool OdRxDictionary::resetKey ( OdUInt32  id,
const OdString newKey 
)
pure virtual

Sets the keyword for the item specified by ID for the dictionary object.

Parameters
id[in] ID as an integer value.
newKey[in] New keyword as a string value.
Returns
Returns true if and only if successful.
See also
<link dictionary_sample.html, Example of Working with a Dictionary>
<link dictionary_functionality.html, Functionality of Dictionaries>

Implemented in OdRxDispatchImpl< TBase >.

◆ subDict()

OdRxDictionaryPtr OdRxDictionary::subDict ( const OdString path,
int  numSteps,
bool  createIfNotFound 
)
inline

Definition at line 428 of file RxDictionary.h.

◆ subDictCr()

OdRxDictionaryPtr OdRxDictionary::subDictCr ( const OdString path,
int  numSteps 
)
inline

Definition at line 434 of file RxDictionary.h.


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