CFx SDK Documentation  2020SP3
Public Member Functions | Friends | List of all members
OdRxAttributeCollection Class Reference

#include <RxAttribute.h>

Public Member Functions

 OdRxAttributeCollection ()
 
 ~OdRxAttributeCollection ()
 
int count () const
 
const OdRxAttributegetAt (int index) const
 
OdRxAttributegetAt (int index)
 
const OdRxAttributeget (const OdRxClass *type) const
 
OdRxAttributeget (const OdRxClass *type)
 
OdResult add (const OdRxAttribute *attribute)
 
OdResult override (const OdRxAttribute *attribute)
 
OdResult remove (const OdRxAttribute *attribute)
 

Friends

class OdRxAttributeCollectionImpl
 

Detailed Description

Container for the attributes of a member (OdRxMember). Attribute collection may have only one attribute of the given class.

<group OdRx_Classes>

Definition at line 70 of file RxAttribute.h.

Constructor & Destructor Documentation

◆ OdRxAttributeCollection()

OdRxAttributeCollection::OdRxAttributeCollection ( )

Default constructor.

◆ ~OdRxAttributeCollection()

OdRxAttributeCollection::~OdRxAttributeCollection ( )

Destructor.

Member Function Documentation

◆ add()

OdResult OdRxAttributeCollection::add ( const OdRxAttribute attribute)

Add an attribute to the collection. If the collection already has an attribute of this class, it will not be replaced.

◆ count()

int OdRxAttributeCollection::count ( ) const

Number of elements in the collection.

◆ get() [1/2]

OdRxAttribute* OdRxAttributeCollection::get ( const OdRxClass type)

Finds the attribute of the given class in the collection. Returns 0 if not found.

◆ get() [2/2]

const OdRxAttribute* OdRxAttributeCollection::get ( const OdRxClass type) const

Finds the attribute of the given class in the collection (constant version). Returns 0 if not found.

◆ getAt() [1/2]

OdRxAttribute* OdRxAttributeCollection::getAt ( int  index)

Retrieve the attribute at the index (non-constant version).

◆ getAt() [2/2]

const OdRxAttribute* OdRxAttributeCollection::getAt ( int  index) const

Retrieve the attribute at the index (constant version).

◆ override()

OdResult OdRxAttributeCollection::override ( const OdRxAttribute attribute)

Add an attribute to the collection. If the collection already has an attribute of this class, it will be replaced.

◆ remove()

OdResult OdRxAttributeCollection::remove ( const OdRxAttribute attribute)

Removes the attribute of that type from the collection.

Returns
eOk if successful or eKeyNotFound otherwise.

Friends And Related Function Documentation

◆ OdRxAttributeCollectionImpl

friend class OdRxAttributeCollectionImpl
friend

Definition at line 73 of file RxAttribute.h.


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