ADTF
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
cGraph

Default implementation for the IFilterGraph interface. More...

#include <graph.h>

Inheritance diagram for cGraph:
[legend]

Public Member Functions

 cGraph ()=default
 CTOR.
 
virtual ~cGraph ()
 DTOR.
 
tResult GetNamedGraphObject (const char *strName, ucom::ant::iobject_ptr< ucom::ant::IObject > &pObject) const
 
tResult GetNamedGraphObjects (ucom::ant::iobject_list< INamedGraphObject > &lstItems) const
 
virtual tResult AddNamedGraphObject (const ucom::ant::iobject_ptr< INamedGraphObject > &pGraphObject, int32_t ui32OrderNumber)
 This is to intialize and build an FilterGraph.
 
tResult RemoveNamedGraphObject (const char *strName)
 Removes a named Object from the Filter Graph.
 
virtual tResult RemoveNamedGraphObject (const ucom::ant::iobject_ptr< INamedGraphObject > &pGraphObject)
 Removes a Named Graph Object by instance.
 

Protected Member Functions

tResult CheckName (const adtf_util::cString &strObjectName)
 
template<typename OBJECT_INTERFACE>
tResult AddObject (const ucom::ant::iobject_ptr< OBJECT_INTERFACE > &pGraphObject, int32_t ui32OrderNumber)
 
tResult RemoveAllConnectionsFrom (const INamedGraphObject *pObj)
 
tResult AddAlias (const char *strAliasName, const ucom::ant::iobject_ptr< INamedGraphObject > &pGraphObject)
 
tResult GetAliasObjects (ucom::ant::iobject_list< INamedGraphObject > &lstItems) const
 

Private Member Functions

template<typename OBJECT_INTERFACE>
tResult EraseObject (const ucom::ant::iobject_ptr< OBJECT_INTERFACE > &pGraphObject)
 

Private Attributes

std::map< adtf_util::cString, ucom::object_ptr< INamedGraphObject > > m_oGraphObjects
 Graph Object Registry.
 
std::multimap< int32_t, ucom::object_ptr< INamedGraphObject > > m_oObjectOrder
 Graph Object Registry.
 

Detailed Description

Default implementation for the IFilterGraph interface.

See also
sec_filter_graph

Definition at line 21 of file graph.h.

Member Function Documentation

◆ AddNamedGraphObject()

virtual tResult AddNamedGraphObject ( const ucom::ant::iobject_ptr< INamedGraphObject > & pGraphObject,
int32_t ui32OrderNumber )
virtual

This is to intialize and build an FilterGraph.

See the INamedGraphObject and all derived default implementations within the SDK.

Items with the same ui32OrderNumber will initialized in order of AddNamedGraphObject call.

Parameters
[in]pGraphObjectThe item to add.
[in]ui32OrderNumberThe initialize order number of the item.
See also
INamedGraphObject
Returns
Standard Result Code
Return values
ERR_INVALID_ARGNo name set for graph object.
ERR_RESOURCE_IN_USEThere is already a graph object with the name.

Reimplemented in graph< INTERFACE >, and graph< INTERFACE >.

Referenced by adtf::streaming::devil::add_binding_proxy(), adtf::streaming::devil::add_data_in_port(), adtf::streaming::devil::add_data_out_port(), adtf::streaming::devil::add_graph_object(), adtf::streaming::devil::add_sample_stream_in_port(), adtf::streaming::devil::add_sample_stream_out_port(), and graph< INTERFACE >::AddNamedGraphObject().

◆ AddObject()

template<typename OBJECT_INTERFACE>
tResult AddObject ( const ucom::ant::iobject_ptr< OBJECT_INTERFACE > & pGraphObject,
int32_t ui32OrderNumber )
inlineprotected

Definition at line 79 of file graph.h.

◆ RemoveNamedGraphObject() [1/2]

tResult RemoveNamedGraphObject ( const char * strName)

Removes a named Object from the Filter Graph.

Parameters
[in]strNameName of the item to remove.
Returns
Standard Result Code
Return values
ERR_NOT_FOUNDNo item with the name strName exists

Referenced by cFilterGraph::AddNamedGraphObject().

◆ RemoveNamedGraphObject() [2/2]

virtual tResult RemoveNamedGraphObject ( const ucom::ant::iobject_ptr< INamedGraphObject > & pGraphObject)
virtual

Removes a Named Graph Object by instance.

This virtual function must be overwritten by any derived class.

Parameters
pGraphObjectthe Graph Object to remove
Returns
tResult

Member Data Documentation

◆ m_oGraphObjects

std::map<adtf_util::cString, ucom::object_ptr<INamedGraphObject> > m_oGraphObjects
private

Graph Object Registry.

Definition at line 25 of file graph.h.

◆ m_oObjectOrder

std::multimap<int32_t, ucom::object_ptr<INamedGraphObject> > m_oObjectOrder
private

Graph Object Registry.

Definition at line 27 of file graph.h.