25 std::map<adtf_util::cString, ucom::object_ptr<INamedGraphObject>>
m_oGraphObjects;
57 int32_t ui32OrderNumber);
78 template <
typename OBJECT_INTERFACE>
93 template <
typename OBJECT_INTERFACE>
101 template <
typename INTERFACE = IGraph>
114 return cGraph::GetNamedGraphObject(strName, pObject);
118 return cGraph::GetNamedGraphObjects(lstItems);
122 int32_t ui32OrderNumber)
override
130 template<
typename CONNECTOR,
135 bool m_bConnected =
false;
143 bool m_bConnectRunner;
155 const char* strSource,
156 const char* strSourceConnector,
158 const char* strDestConnector,
167 "The connection from %s.%s to %s.%s is not supported.",
174 m_strSourceName = strSource;
175 m_strSourceConnectorName = strSourceConnector;
176 m_strDestinationName = strDest;
177 m_strDestinationConnectorName = strDestConnector;
180 m_bConnectRunner = bConnectRunner;
182 LOG_DUMP(
"Init CONNECTION %s.%s -> %s.%s ", strSource, strSourceConnector, strDest, strDestConnector);
195 auto pSource = m_pSource.
Lock();
196 auto pDest = m_pDest.
Lock();
197 if (pSource && pDest)
204 LOG_DETAIL(
"Connecting CONNECTION %s.%s -> %s.%s ",
205 oSourceName.GetPtr(),
206 m_strSourceConnectorName.GetPtr(),
208 m_strDestinationConnectorName.GetPtr());
210 tResult nRes = CONNECTOR::Connect(pSource,
211 m_strSourceConnectorName,
213 m_strDestinationConnectorName,
218 "Can not connect %s.%s with %s.%s - %s",
219 m_strSourceName.GetPtr(),
220 m_strSourceConnectorName.GetPtr(),
221 m_strDestinationName.GetPtr(),
222 m_strDestinationConnectorName.GetPtr(),
229 "Can not connect %s.%s with %s.%s, "
230 "a connection point disappeared ??",
231 m_strSourceName.GetPtr(),
232 m_strSourceConnectorName.GetPtr(),
233 m_strDestinationName.GetPtr(),
234 m_strDestinationConnectorName.GetPtr());
243 m_bConnected =
false;
244 auto pSource = m_pSource.
Lock();
245 auto pDest = m_pDest.
Lock();
247 if (pSource && pDest)
250 m_strSourceConnectorName,
252 m_strDestinationConnectorName,
260 auto pNO = m_pSource.
Lock();
263 return pSource.
Reset(pNO);
269 return strName.Set(m_strSourceName);
274 return strName.Set(m_strSourceConnectorName);
279 auto pNO = m_pDest.
Lock();
282 return pDestination.
Reset(pNO);
289 return strName.Set(m_strDestinationName);
294 return strName.Set(m_strDestinationConnectorName);
297 bool IsConnected()
const override
#define LOG_DETAIL(...)
Logs additional information.
#define LOG_DUMP(...)
Logs a dump message.
#define IS_FAILED(s)
Check if result is failed.
#define RETURN_ERROR_DESC(_code,...)
Same as RETURN_ERROR(_error) using a printf like parameter list for detailed error description.
#define RETURN_IF_FAILED(s)
Return if expression is failed, which requires the calling function's return type to be tResult.
#define RETURN_NOERROR
Return status ERR_NOERROR, which requires the calling function's return type to be tResult.
#define RETURN_ERROR(code)
Return specific error code, which requires the calling function's return type to be tResult.
#define RETURN_IF_POINTER_NULL(_ptr)
Return ERR_POINTER if _ptr is nullptr, which requires the calling function's return type to be tResul...
A common result class usable as return value throughout.
const tChar * GetDescription() const
Get user provided error description.
tErrorCode GetErrorCode() const
Get error code.
The IString interface provides methods for getting and setting strings through abstract interfaces.
Interface to describe a connection within the IGraph.
Defines the Interface used to connect Items to each other.
Interface for a NamedGraphObject which can be added to the FilterGraph.
Default implementation for the IFilterGraph interface.
std::multimap< int32_t, ucom::object_ptr< INamedGraphObject > > m_oObjectOrder
Graph Object Registry.
virtual tResult AddNamedGraphObject(const ucom::ant::iobject_ptr< INamedGraphObject > &pGraphObject, int32_t ui32OrderNumber)
This is to intialize and build an FilterGraph.
virtual tResult RemoveNamedGraphObject(const ucom::ant::iobject_ptr< INamedGraphObject > &pGraphObject)
Removes a Named Graph Object by instance.
tResult RemoveNamedGraphObject(const char *strName)
Removes a named Object from the Filter Graph.
std::map< adtf_util::cString, ucom::object_ptr< INamedGraphObject > > m_oGraphObjects
Graph Object Registry.
Generator Template to create a graph implementation.
virtual ~graph()=default
DTOR.
tResult AddNamedGraphObject(const ucom::ant::iobject_ptr< INamedGraphObject > &pGraphObject, int32_t ui32OrderNumber) override
This is to intialize and build an FilterGraph.
tResult SetName(const char *strName) override
Sets the Name of the object.
Base class for every interface type within the uCOM.
virtual tResult Reset(const iobject_ptr< T > &i_oOther)=0
Reset this object_ptr<> with the content of another iobject_ptr<>
virtual T * Get() const =0
Get raw pointer to shared object.
Base object pointer to realize binary compatible reference counting in interface methods.
Object pointer implementation used for reference counting on objects of type IObject.
Implementation of a weak pointer for usage with iobject_ptr and object_ptr.
object_ptr< T > Lock() const
Create an object_ptr<> from *this weak pointer (thread safe).
Use this template if you want to implement an ucom::ant::IObject based Interface and/or subclass an e...
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
string_base< cStackString > cString
cString implementation for a stack string which works on stack if string is lower than A_UTILS_DEFAUL...
tResult get_named_graph_object_from_graph(IGraph &oGraph, const char *strName, ucom::ant::iobject_ptr< ucom::ant::IObject > &pObjectFound)
Helper function to retrieve a graph object from a graph with fully qualified unique name of an object...
adtf_util::cString get_named_graph_object_full_name(const INamedGraphObject &oGraphObject)
Helper function to retrieve a full qualified unique name of an object registered in IFilterGraph.
Namespace for entire ADTF SDK.
#define adtf_string_intf(__string__)
The adtf_string_intf Macro helps to easily create a rvalue reference of a adtf::util::cString.
#define THROW_IF_FAILED_DESC(s,...)
throws if the expression returns a failed tResult and ammends the error message.