ADTF
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
object_enum_base< T, INTERFACE_TYPE, CONTAINER >

basic object interface implementation template. More...

#include <object_list.h>

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
 
typedef iobject_ptr< T > value_type
 value type of the contained objects
 
typedef iobject_enum< T > my_type
 this type
 
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.
 
- 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.
 
virtual tResult GetObjects (my_type &oObjectsEnum) const=0
 Pushes every contained value to the given container in oObjectsEnum.
 
virtual tResult PushObject (const value_type &oObject)=0
 Pushes a object of value_type to the container.
 
virtual tResult GetObjects (my_type &oObjectsEnum) const =0
 Pushes every contained value to the given container in oObjectsEnum.
 
virtual tResult PushObject (const value_type &oObject)=0
 Pushes a object of value_type to the container.
 
virtual tResult GetObjects (my_type &oObjectsEnum) const=0
 Pushes every contained value to the given container in oObjectsEnum.
 
virtual tResult PushObject (const value_type &oObject)=0
 Pushes a object of value_type to the container.
 
virtual tResult GetObjects (my_type &oObjectsEnum) const =0
 Pushes every contained value to the given container in oObjectsEnum.
 

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
 
 ~iobject_enum ()
 hide DTOR
 
 ~iobject_enum ()
 hide DTOR
 
 ~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 Typedef Documentation

◆ base_type

template<typename T, typename INTERFACE_TYPE = T, template< typename ELEM, typename ALLOC=std::allocator< ELEM > > class CONTAINER = std::list>
typedef iobject_enum<INTERFACE_TYPE> base_type

base type

Definition at line 90 of file object_list.h.

◆ container_type

template<typename T, typename INTERFACE_TYPE = T, template< typename ELEM, typename ALLOC=std::allocator< ELEM > > class CONTAINER = std::list>
typedef CONTAINER<object_ptr<T> > container_type

container type

Definition at line 88 of file object_list.h.

◆ interface_type

template<typename T, typename INTERFACE_TYPE = T, template< typename ELEM, typename ALLOC=std::allocator< ELEM > > class CONTAINER = std::list>
typedef base_type interface_type

interface type

Definition at line 92 of file object_list.h.

◆ value_type

template<typename T, typename INTERFACE_TYPE = T, template< typename ELEM, typename ALLOC=std::allocator< ELEM > > class CONTAINER = std::list>
typedef object_ptr<T> value_type

internal value type

Definition at line 94 of file object_list.h.

Constructor & Destructor Documentation

◆ object_enum_base() [1/2]

template<typename T, typename INTERFACE_TYPE = T, template< typename ELEM, typename ALLOC=std::allocator< ELEM > > class CONTAINER = std::list>
object_enum_base ( )
inlineprivate

Definition at line 102 of file object_list.h.

◆ object_enum_base() [2/2]

template<typename T, typename INTERFACE_TYPE = T, template< typename ELEM, typename ALLOC=std::allocator< ELEM > > class CONTAINER = std::list>
object_enum_base ( container_type * pContainer)
inline

CTOR.

Definition at line 116 of file object_list.h.

◆ ~object_enum_base()

template<typename T, typename INTERFACE_TYPE = T, template< typename ELEM, typename ALLOC=std::allocator< ELEM > > class CONTAINER = std::list>
virtual ~object_enum_base ( )
inlinevirtual

Definition at line 119 of file object_list.h.

Member Function Documentation

◆ GetObjects()

template<typename T, typename INTERFACE_TYPE = T, template< typename ELEM, typename ALLOC=std::allocator< ELEM > > class CONTAINER = std::list>
tResult GetObjects ( base_type & oObjectsEnum) const
inlineoverride

Definition at line 160 of file object_list.h.

◆ GetSize()

template<typename T, typename INTERFACE_TYPE = T, template< typename ELEM, typename ALLOC=std::allocator< ELEM > > class CONTAINER = std::list>
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.

◆ PushObject()

template<typename T, typename INTERFACE_TYPE = T, template< typename ELEM, typename ALLOC=std::allocator< ELEM > > class CONTAINER = std::list>
tResult PushObject ( const typename interface_type::value_type & oObject)
inlineoverride

Definition at line 133 of file object_list.h.

◆ Reset()

template<typename T, typename INTERFACE_TYPE = T, template< typename ELEM, typename ALLOC=std::allocator< ELEM > > class CONTAINER = std::list>
void Reset ( )
inline

Definition at line 123 of file object_list.h.

◆ SetContainerRef()

template<typename T, typename INTERFACE_TYPE = T, template< typename ELEM, typename ALLOC=std::allocator< ELEM > > class CONTAINER = std::list>
void SetContainerRef ( container_type * pContainer)
inlineprivate

Definition at line 110 of file object_list.h.

◆ SetPushOption()

template<typename T, typename INTERFACE_TYPE = T, template< typename ELEM, typename ALLOC=std::allocator< ELEM > > class CONTAINER = std::list>
void SetPushOption ( uint32_t ui32PushOption)
inline

Definition at line 128 of file object_list.h.

Member Data Documentation

◆ m_pContainer

template<typename T, typename INTERFACE_TYPE = T, template< typename ELEM, typename ALLOC=std::allocator< ELEM > > class CONTAINER = std::list>
container_type* m_pContainer
private

container reference

Definition at line 97 of file object_list.h.

◆ m_ui32PushOption

template<typename T, typename INTERFACE_TYPE = T, template< typename ELEM, typename ALLOC=std::allocator< ELEM > > class CONTAINER = std::list>
uint32_t m_ui32PushOption = object_enum_push_option::eNone
private

current set push option

Definition at line 99 of file object_list.h.