24 std::map<adtf_util::cString, ucom::object_ptr<INamedGraphObject>> m_oGraphObjects;
26 std::multimap<int32_t, ucom::object_ptr<INamedGraphObject>> m_oObjectOrder;
56 int32_t ui32OrderNumber);
75 tResult CheckName(
const adtf_util::cString& strObjectName);
77 template <
typename OBJECT_INTERFACE>
92 template <
typename OBJECT_INTERFACE>
100template <
typename INTERFACE = IGraph>
113 return cGraph::GetNamedGraphObject(strName, pObject);
117 return cGraph::GetNamedGraphObjects(lstItems);
121 int32_t ui32OrderNumber)
override
129template<
typename CONNECTOR,
134 bool m_bConnected =
false;
138 adtf_util::cString m_strSourceName;
139 adtf_util::cString m_strSourceConnectorName;
140 adtf_util::cString m_strDestinationName;
141 adtf_util::cString m_strDestinationConnectorName;
142 bool m_bConnectRunner;
145 graph_connection(
const graph_connection&) =
delete;
146 graph_connection(graph_connection&&) =
delete;
147 graph_connection& operator=(
const graph_connection&) =
delete;
148 graph_connection& operator=(graph_connection&&) =
delete;
151 graph_connection() =
default;
153 graph_connection(
const char* strName,
154 const char* strSource,
155 const char* strSourceConnector,
157 const char* strDestConnector,
166 "The connection from %s.%s to %s.%s is not supported.",
173 m_strSourceName = strSource;
174 m_strSourceConnectorName = strSourceConnector;
175 m_strDestinationName = strDest;
176 m_strDestinationConnectorName = strDestConnector;
179 m_bConnectRunner = bConnectRunner;
181 LOG_DUMP(
"Init CONNECTION %s.%s -> %s.%s ", strSource, strSourceConnector, strDest, strDestConnector);
184 virtual ~graph_connection()
194 auto pSource = m_pSource.Lock();
195 auto pDest = m_pDest.Lock();
196 if (pSource && pDest)
198 adtf_util::cString oSourceName;
201 adtf_util::cString oDestName;
203 LOG_DETAIL(
"Connecting CONNECTION %s.%s -> %s.%s ",
204 oSourceName.GetPtr(),
205 m_strSourceConnectorName.GetPtr(),
207 m_strDestinationConnectorName.GetPtr());
209 tResult nRes = CONNECTOR::Connect(pSource,
210 m_strSourceConnectorName,
212 m_strDestinationConnectorName,
217 "Can not connect %s.%s with %s.%s - %s",
218 m_strSourceName.GetPtr(),
219 m_strSourceConnectorName.GetPtr(),
220 m_strDestinationName.GetPtr(),
221 m_strDestinationConnectorName.GetPtr(),
228 "Can not connect %s.%s with %s.%s, "
229 "a connection point disappeared ??",
230 m_strSourceName.GetPtr(),
231 m_strSourceConnectorName.GetPtr(),
232 m_strDestinationName.GetPtr(),
233 m_strDestinationConnectorName.GetPtr());
242 m_bConnected =
false;
243 auto pSource = m_pSource.Lock();
244 auto pDest = m_pDest.Lock();
246 if (pSource && pDest)
248 RETURN_IF_FAILED(CONNECTOR::Disconnect(pSource,
249 m_strSourceConnectorName,
251 m_strDestinationConnectorName,
259 auto pNO = m_pSource.Lock();
262 return pSource.
Reset(pNO);
268 return strName.Set(m_strSourceName);
273 return strName.Set(m_strSourceConnectorName);
278 auto pNO = m_pDest.Lock();
281 return pDestination.
Reset(pNO);
288 return strName.Set(m_strDestinationName);
293 return strName.Set(m_strDestinationConnectorName);
296 bool IsConnected()
const override
#define LOG_DETAIL(...)
Logs additional information.
Definition log.h:386
#define LOG_DUMP(...)
Logs a dump message.
Definition log.h:382
#define IS_FAILED(s)
Check if result is failed.
Definition result.h:20
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:736
#define RETURN_ERROR_DESC(_code,...)
Same as RETURN_ERROR(_error) using a printf like parameter list for detailed error description.
Definition result.h:44
#define THROW_IF_FAILED_DESC(s,...)
throws if the expression returns a failed tResult and ammends the error message.
Definition result.h:98
#define RETURN_NOERROR
Return status ERR_NOERROR, which requires the calling function's return type to be tResult.
Definition result.h:29
#define RETURN_ERROR(code)
Return specific error code, which requires the calling function's return type to be tResult.
Definition result.h:42
#define RETURN_IF_POINTER_NULL(_ptr)
Return ERR_POINTER if _ptr is nullptr, which requires the calling function's return type to be tResul...
Definition result.h:49
const tChar * GetDescription() const noexcept
Get user provided error description.
tErrorCode GetErrorCode() const noexcept
Get error code.
Definition string_intf.h:29
Definition graph_intf.h:24
Definition graph_intf.h:103
Definition named_graph_object_intf.h:25
virtual tResult RemoveNamedGraphObject(const ucom::ant::iobject_ptr< INamedGraphObject > &pGraphObject)
Removes a Named Graph Object by instance. This virtual function must be overwritten by any derived cl...
tResult RemoveNamedGraphObject(const char *strName)
virtual tResult AddNamedGraphObject(const ucom::ant::iobject_ptr< INamedGraphObject > &pGraphObject, int32_t ui32OrderNumber)
tResult AddNamedGraphObject(const ucom::ant::iobject_ptr< INamedGraphObject > &pGraphObject, int32_t ui32OrderNumber) override
Definition graph.h:120
virtual ~graph()=default
DTOR.
tResult SetName(const char *strName) override
Definition named_graph_object.h:64
Definition object_intf.h:33
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.
Definition object_ptr_intf.h:112
Definition object_ptr.h:384
Namespace for all functionality of the ADTF Streaming SDK provided since v3.0.
Definition bindingproxyoutport.h:16
tResult get_named_graph_object_from_graph(IGraph &oGraph, const char *strName, ucom::ant::iobject_ptr< ucom::ant::IObject > &pObjectFound)
adtf_util::cString get_named_graph_object_full_name(const INamedGraphObject &oGraphObject)
Namespace for the ADTF Streaming SDK.
Definition bindingproxyinport.h:14
iobject_enum< T > iobject_list
Definition object_list.h:387
ant::weak_object_ptr< T > weak_object_ptr
Alias always bringing the latest version of ant::weak_object_ptr into scope.
Definition weak_object_ptr.h:232
Namespace for all functionality provided by ADTF and its SDKs.
Definition adtf_client_connector.h:14
#define adtf_string_intf(__string__)
Definition string_intf.h:465