CFx SDK Documentation  2023 SP0
Classes | Public Member Functions | Protected Member Functions | List of all members
OdRxDispatchImpl< TBase > Class Template Referenceabstract

#include <RxDispatchImpl.h>

Inheritance diagram for OdRxDispatchImpl< TBase >:
OdRxDictionary OdRxObject

Classes

class  Iterator
 

Public Member Functions

OdRxObjectPtr getAt (const OdString &key) const
 
OdRxObjectPtr putAt (const OdString &key, OdRxObject *pObject, OdUInt32 *=0)
 
OdRxObjectPtr getAt (OdUInt32 id) const
 
OdRxObjectPtr putAt (OdUInt32 id, OdRxObject *pObject)
 
bool has (const OdString &entryName) const
 
bool has (OdUInt32 id) const
 
OdUInt32 idAt (const OdString &key) const
 
OdString keyAt (OdUInt32 id) const
 
OdUInt32 numEntries () const
 
bool isCaseSensitive () const
 
OdRxDictionaryIteratorPtr newIterator (OdRx::DictIterType type=OdRx::kDictCollated)
 
bool atKeyAndIdPut (const OdString &, OdUInt32, OdRxObject *)
 
bool resetKey (OdUInt32, const OdString &)
 
OdRxObjectPtr remove (const OdString &)
 
OdRxObjectPtr remove (OdUInt32)
 
- Public Member Functions inherited from OdRxDictionary
 ODRX_DECLARE_MEMBERS (OdRxDictionary)
 
virtual void reserve (OdUInt32 minSize)
 
void removeAll ()
 
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
 

Protected Member Functions

virtual OdRxDictionarypropertiesInfo () const =0
 
PropDescdescAt (OdUInt32 id) const
 

Additional Inherited Members

- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Detailed Description

template<class TBase = OdRxDictionary>
class OdRxDispatchImpl< TBase >

<group OdRx_Classes>

Definition at line 57 of file RxDispatchImpl.h.

Member Function Documentation

◆ atKeyAndIdPut()

template<class TBase = OdRxDictionary>
bool OdRxDispatchImpl< TBase >::atKeyAndIdPut ( const OdString ,
OdUInt32  ,
OdRxObject  
)
inline

Definition at line 117 of file RxDispatchImpl.h.

◆ descAt()

template<class TBase = OdRxDictionary>
PropDesc* OdRxDispatchImpl< TBase >::descAt ( OdUInt32  id) const
inlineprotected

Definition at line 80 of file RxDispatchImpl.h.

◆ getAt() [1/2]

template<class TBase = OdRxDictionary>
OdRxObjectPtr OdRxDispatchImpl< TBase >::getAt ( const OdString key) const
inlinevirtual

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>

Implements OdRxDictionary.

Definition at line 83 of file RxDispatchImpl.h.

◆ getAt() [2/2]

template<class TBase = OdRxDictionary>
OdRxObjectPtr OdRxDispatchImpl< TBase >::getAt ( OdUInt32  id) const
inlinevirtual

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>

Implements OdRxDictionary.

Definition at line 89 of file RxDispatchImpl.h.

◆ has() [1/2]

template<class TBase = OdRxDictionary>
bool OdRxDispatchImpl< TBase >::has ( const OdString key) const
inlinevirtual

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>

Implements OdRxDictionary.

Definition at line 104 of file RxDispatchImpl.h.

◆ has() [2/2]

template<class TBase = OdRxDictionary>
bool OdRxDispatchImpl< TBase >::has ( OdUInt32  id) const
inlinevirtual

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>

Implements OdRxDictionary.

Definition at line 105 of file RxDispatchImpl.h.

◆ idAt()

template<class TBase = OdRxDictionary>
OdUInt32 OdRxDispatchImpl< TBase >::idAt ( const OdString key) const
inlinevirtual

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>

Implements OdRxDictionary.

Definition at line 106 of file RxDispatchImpl.h.

◆ isCaseSensitive()

template<class TBase = OdRxDictionary>
bool OdRxDispatchImpl< TBase >::isCaseSensitive ( ) const
inlinevirtual

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>

Implements OdRxDictionary.

Definition at line 109 of file RxDispatchImpl.h.

◆ keyAt()

template<class TBase = OdRxDictionary>
OdString OdRxDispatchImpl< TBase >::keyAt ( OdUInt32  id) const
inlinevirtual

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>

Implements OdRxDictionary.

Definition at line 107 of file RxDispatchImpl.h.

◆ newIterator()

template<class TBase = OdRxDictionary>
OdRxDictionaryIteratorPtr OdRxDispatchImpl< TBase >::newIterator ( OdRx::DictIterType  iterType = OdRx::kDictCollated)
inlinevirtual

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>

Implements OdRxDictionary.

Definition at line 111 of file RxDispatchImpl.h.

◆ numEntries()

template<class TBase = OdRxDictionary>
OdUInt32 OdRxDispatchImpl< TBase >::numEntries ( ) const
inlinevirtual

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>

Implements OdRxDictionary.

Definition at line 108 of file RxDispatchImpl.h.

◆ propertiesInfo()

template<class TBase = OdRxDictionary>
virtual OdRxDictionary* OdRxDispatchImpl< TBase >::propertiesInfo ( ) const
protectedpure virtual

◆ putAt() [1/2]

template<class TBase = OdRxDictionary>
OdRxObjectPtr OdRxDispatchImpl< TBase >::putAt ( const OdString key,
OdRxObject pObject,
OdUInt32 pRetId = 0 
)
inlinevirtual

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>

Implements OdRxDictionary.

Definition at line 86 of file RxDispatchImpl.h.

◆ putAt() [2/2]

template<class TBase = OdRxDictionary>
OdRxObjectPtr OdRxDispatchImpl< TBase >::putAt ( OdUInt32  id,
OdRxObject pObject 
)
inlinevirtual

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>

Implements OdRxDictionary.

Definition at line 92 of file RxDispatchImpl.h.

◆ remove() [1/2]

template<class TBase = OdRxDictionary>
OdRxObjectPtr OdRxDispatchImpl< TBase >::remove ( const OdString key)
inlinevirtual

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>

Implements OdRxDictionary.

Definition at line 126 of file RxDispatchImpl.h.

◆ remove() [2/2]

template<class TBase = OdRxDictionary>
OdRxObjectPtr OdRxDispatchImpl< TBase >::remove ( OdUInt32  id)
inlinevirtual

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>

Implements OdRxDictionary.

Definition at line 130 of file RxDispatchImpl.h.

◆ resetKey()

template<class TBase = OdRxDictionary>
bool OdRxDispatchImpl< TBase >::resetKey ( OdUInt32  id,
const OdString newKey 
)
inlinevirtual

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>

Implements OdRxDictionary.

Definition at line 122 of file RxDispatchImpl.h.


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