12 #include <type_traits>
36 template<
typename DATA_BINDING_IMPL_TYPE>
39 const char* strNameOfWriterAndPin,
43 oWriter.
SetName(strNameOfWriterAndPin);
50 pPinCreated.
Reset(adtf::ucom::ucom_object_ptr_cast<IOutPin>(pPin));
68 template<
typename DATA_BINDING_IMPL_TYPE>
71 const char* strNameOfWriterAndPin,
75 return create_pin(oDataBindingImpl, oWriter, strNameOfWriterAndPin, pStreamType, pPinCreated);
92 template<
typename DATA_BINDING_IMPL_TYPE>
95 const char* strNameOfWriterAndPin,
98 return create_pin(oDataBindingImpl, oWriter, strNameOfWriterAndPin, adtf::ucom::ucom_object_ptr_cast<const IStreamType>(pStreamType));
112 template<
typename DATA_BINDING_IMPL_TYPE>
115 const char* strNameOfReaderAndPin,
119 oReader.
SetName(strNameOfReaderAndPin);
126 pPinCreated.
Reset(adtf::ucom::ucom_object_ptr_cast<IInPin>(pPin));
140 template<
typename DATA_BINDING_IMPL_TYPE>
143 const char* strNameOfReaderAndPin,
147 return create_pin(oDataBindingImpl, oReader, strNameOfReaderAndPin, pStreamType, pPinCreated);
161 template<
typename DATA_BINDING_IMPL_TYPE>
164 const char* strNameOfReaderAndPin,
167 return create_pin(oDataBindingImpl, oReader, strNameOfReaderAndPin, adtf::ucom::ucom_object_ptr_cast<const IStreamType>(pStreamType));
174 template<
typename DATA_BINDING_IMPL_TYPE,
typename READER_OR_WRITER,
typename PIN_INTERFACE>
175 tResult create_pin(DATA_BINDING_IMPL_TYPE& oDataBindingImpl,
176 READER_OR_WRITER& oStreamer,
179 typedef typename std::conditional<std::is_base_of<flash::ISampleReader, READER_OR_WRITER>::value, quiet::cInPin, quiet::cOutPin>::type pin_type;
183 auto pInPin = adtf::ucom::make_object_ptr<pin_type>(strNameOfReaderAndPin);
184 oStreamer.SetStreamerPin(ucom::ant::ucom_object_ptr_cast<flash::IStreamerPin>(pInPin));
187 return pCreatedPin.
Reset(ucom::ant::ucom_object_ptr_cast<PIN_INTERFACE>(pPin));
190 template<
typename DATA_BINDING_IMPL_TYPE,
typename READER_OR_WRITER>
191 tResult create_pin(DATA_BINDING_IMPL_TYPE& oDataBindingImpl,
192 READER_OR_WRITER& oStreamer)
194 typedef typename std::conditional<std::is_base_of<flash::ISampleReader, READER_OR_WRITER>::value, quiet::cInPin, quiet::cOutPin>::type pin_type;
198 auto pInPin = adtf::ucom::make_object_ptr<pin_type>(strNameOfReaderAndPin);
199 oStreamer.SetStreamerPin(ucom::ant::ucom_object_ptr_cast<flash::IStreamerPin>(pInPin));
201 return oDataBindingImpl.RegisterPin(pPin);
204 template<
typename DATA_BINDING_IMPL_TYPE,
typename READER_OR_WRITER,
typename PIN_INTERFACE>
206 READER_OR_WRITER& oStreamer,
207 const char* strNameOfReaderAndPin,
208 const ucom::iobject_ptr<const ant::IStreamType>& pStreamType,
209 ucom::ant::iobject_ptr<PIN_INTERFACE>& pCreatedPin)
211 oStreamer.SetName(strNameOfReaderAndPin);
212 oStreamer.SetType(pStreamType);
214 return create_pin(oDataBindingImpl, oStreamer, pCreatedPin);
217 template<
typename DATA_BINDING_IMPL_TYPE,
typename READER_OR_WRITER>
219 READER_OR_WRITER& oStreamer,
220 const char* strNameOfReaderAndPin,
221 const ucom::ant::iobject_ptr<const ant::IStreamType>& pStreamType)
223 oStreamer.SetName(strNameOfReaderAndPin);
224 oStreamer.SetType(pStreamType);
226 return create_pin(oDataBindingImpl, oStreamer);
231 using flash::create_pin;
#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.
A common result class usable as return value throughout.
The default Sample Reader will read the incomung Stream of a IInPin.
This base implementation of a sample writer is able to write to one Sample Stream which is connected ...
void SetName(const char *strName)
Sets the name of the streamer.
tResult SetType(const ucom::ant::iobject_ptr< const IStreamType > &pStreamType)
Sets the StreamType of the streamer.
void ResetPin(ucom::ant::object_ptr< PINTYPE > &pPin)
Resets the pin reference This is only internaly used.
virtual tResult Reset(const iobject_ptr< T > &i_oOther)=0
Reset this object_ptr<> with the content of another iobject_ptr<>
Base object pointer to realize binary compatible reference counting in interface methods.
Object pointer implementation used for reference counting on objects of type IObject.
string_base< cStackString > cString
cString implementation for a stack string which works on stack if string is lower than A_UTILS_DEFAUL...
tResult create_pin(DATA_BINDING_IMPL_TYPE &oDataBindingImpl, cSampleWriter &oWriter, const char *strNameOfWriterAndPin, const ucom::iobject_ptr< const IStreamType > &pStreamType, ucom::iobject_ptr< IOutPin > &pPinCreated)
Creates a cOutPin and registers it at the given oDataBindingImpl instance.
Namespace for entire ADTF SDK.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
#define adtf_string_intf(__string__)
The adtf_string_intf Macro helps to easily create a rvalue reference of a adtf::util::cString.