ADTF  3.18.2
object_enum_base< T, INTERFACE_TYPE, CONTAINER >

basic object interface implementation template. More...

Inheritance diagram for object_enum_base< T, INTERFACE_TYPE, CONTAINER >:
[legend]

Public Types

typedef CONTAINER< object_ptr< T > > container_type
 container type
 
typedef iobject_enum< INTERFACE_TYPE > base_type
 base type
 
typedef base_type interface_type
 interface type
 
typedef object_ptr< T > value_type
 internal value type
 
- Public Types inherited from iobject_enum< T >
typedef iobject_ptr< T > value_type
 value type of the contained objects
 
typedef iobject_enum< T > my_type
 this type
 

Public Member Functions

 object_enum_base (container_type *pContainer)
 CTOR.
 
void Reset ()
 
void SetPushOption (uint32_t ui32PushOption)
 
tResult PushObject (const typename interface_type::value_type &oObject) override
 
tResult GetObjects (base_type &oObjectsEnum) const override
 
size_t GetSize () const override
 Retrieves the current value count. More...
 
- Public Member Functions inherited from iobject_enum< T >
virtual tResult PushObject (const value_type &oObject)=0
 Pushes a object of value_type to the container. More...
 
virtual tResult GetObjects (my_type &oObjectsEnum) const=0
 Pushes every contained value to the given container in oObjectsEnum. More...
 

Private Member Functions

 object_enum_base (const object_enum_base &)=delete
 
 object_enum_base (object_enum_base &&)=delete
 
object_enum_baseoperator= (const object_enum_base &)=delete
 
object_enum_baseoperator= (object_enum_base &&)=delete
 
void SetContainerRef (container_type *pContainer)
 

Private Attributes

container_typem_pContainer
 container reference
 
uint32_t m_ui32PushOption = object_enum_push_option::eNone
 current set push option
 

Additional Inherited Members

- Protected Member Functions inherited from iobject_enum< T >
 ~iobject_enum ()
 hide DTOR
 

Detailed Description

template<typename T, typename INTERFACE_TYPE = T, template< typename ELEM, typename ALLOC=std::allocator< ELEM > > class CONTAINER = std::list>
class adtf::ucom::ant::object_enum_base< T, INTERFACE_TYPE, CONTAINER >

basic object interface implementation template.

The implementation will ONLY store values of T but represents the interface iobject_enum<INTERFACE_TYPE>. This is to filter multiple inheritance (use case: i.e. filter IInPin out of a list of IPin)

Template Parameters
Tvalue type (must be derived from IObject)
INTERFACE_TYPEinterface type (must be derived from IObject) the implementation is representing iobject_enum < INTERFACE_TYPE >.
CONTAINERcontainer type to use (i.e. std::list, std::vector etc.) The container type must support a push_back function.

Definition at line 82 of file object_list.h.

Member Function Documentation

◆ GetSize()

size_t GetSize ( ) const
inlineoverridevirtual

Retrieves the current value count.

Returns
value count of the container.

Implements iobject_enum< T >.

Definition at line 186 of file object_list.h.

References object_enum_base< T, INTERFACE_TYPE, CONTAINER >::m_pContainer.