53 #ifndef _MIRA_CHANNEL_PROMOTE_BY_TYPENAME_REGISTRATION_H_ 54 #define _MIRA_CHANNEL_PROMOTE_BY_TYPENAME_REGISTRATION_H_ 71 template <
typename PromoteTo,
typename T>
72 struct PromoteHelperCheckFundamental
74 static void promote(ConcreteChannel<void>* channel)
77 if constexpr(!boost::is_fundamental<T>::value)
78 channel_cast<PromoteTo>(channel);
82 template <
typename PromoteTo>
85 static void promote(ConcreteChannel<void>* channel)
87 channel_cast<PromoteTo>(channel);
96 struct PromoteHelper<
boost::shared_ptr<T>>
97 :
public PromoteHelperCheckFundamental<boost::shared_ptr<T>, T> {};
103 template <
typename T>
104 struct PromoteHelper<
std::vector<boost::shared_ptr<T>>>
105 :
public PromoteHelperCheckFundamental<std::vector<boost::shared_ptr<T>>, T> {};
126 template <
typename PromoteTo,
typename ExtraDiscriminator>
127 class TypedChannelPromoter :
public TypedChannelPromoterBase
133 void promote(ConcreteChannel<
void>* channel)
const 135 detail::PromoteHelper<PromoteTo>::promote(channel);
141 return mira::typeName<PromoteTo>();
147 #ifdef MIRA_DISABLE_CHANNELPROMOTERS 149 #define MIRA_REGISTER_CHANNELTYPE(channeltype) 151 #ifndef MIRA_UNIQUE_IDENTIFIER_ENABLED 152 #pragma message("UniqueIdentifier not enabled. " \ 153 "MIRA_REGISTER_CHANNELTYPE disabled.") 154 #define MIRA_REGISTER_CHANNELTYPE(channeltype) 157 #define MIRA_REGISTER_CHANNELTYPE_UNIQUE_NAME \ 158 MIRA_FILE_LINE_IDENTIFIER 164 #define MIRA_REGISTER_CHANNELTYPE(channeltype) \ 165 namespace MIRA_REGISTER_CHANNELTYPE_UNIQUE_NAME { \ 168 MIRA_VARTEMPLATE_CLASS_REGISTER( \ 169 (mira), TypedChannelPromoter, 2, \ 171 MIRA_REGISTER_CHANNELTYPE_UNIQUE_NAME::plain), \ 172 mira::TypedChannelPromoterBase) \ 174 namespace MIRA_REGISTER_CHANNELTYPE_UNIQUE_NAME { \ 175 class boost_optional{}; \ 177 MIRA_VARTEMPLATE_CLASS_REGISTER( \ 178 (mira), TypedChannelPromoter, 2, \ 179 (boost::optional<channeltype>, \ 180 MIRA_REGISTER_CHANNELTYPE_UNIQUE_NAME::boost_optional), \ 181 mira::TypedChannelPromoterBase) \ 183 namespace MIRA_REGISTER_CHANNELTYPE_UNIQUE_NAME { \ 184 class boost_shared_ptr{}; \ 186 MIRA_VARTEMPLATE_CLASS_REGISTER( \ 187 (mira), TypedChannelPromoter, 2, \ 188 (boost::shared_ptr<channeltype>, \ 189 MIRA_REGISTER_CHANNELTYPE_UNIQUE_NAME::boost_shared_ptr), \ 190 mira::TypedChannelPromoterBase) \ 192 namespace MIRA_REGISTER_CHANNELTYPE_UNIQUE_NAME { \ 193 class std_vector{}; \ 195 MIRA_VARTEMPLATE_CLASS_REGISTER( \ 196 (mira), TypedChannelPromoter, 2, \ 197 (std::vector<channeltype>, \ 198 MIRA_REGISTER_CHANNELTYPE_UNIQUE_NAME::std_vector), \ 199 mira::TypedChannelPromoterBase) \ 201 namespace MIRA_REGISTER_CHANNELTYPE_UNIQUE_NAME { \ 202 class std_vector_boost_optional{}; \ 204 MIRA_VARTEMPLATE_CLASS_REGISTER( \ 205 (mira), TypedChannelPromoter, 2, \ 206 (std::vector<boost::optional<channeltype>>, \ 207 MIRA_REGISTER_CHANNELTYPE_UNIQUE_NAME::std_vector_boost_optional),\ 208 mira::TypedChannelPromoterBase) \ 210 namespace MIRA_REGISTER_CHANNELTYPE_UNIQUE_NAME { \ 211 class std_vector_boost_shared_ptr{}; \ 213 MIRA_VARTEMPLATE_CLASS_REGISTER( \ 214 (mira), TypedChannelPromoter, 2, \ 215 (std::vector<boost::shared_ptr<channeltype>>, \ 216 MIRA_REGISTER_CHANNELTYPE_UNIQUE_NAME::std_vector_boost_shared_ptr),\ 217 mira::TypedChannelPromoterBase) Definition: SyncTimedRead.h:62
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
Determine a unique identifier (or string).
#define MIRA_META_OBJECT(classIdentifier, MetaInfo)
Use this MACRO instead of MIRA_OBJECT if you like to add meta information to your class...
Definition: FactoryMacros.h:204
The framework that holds all manager classes and provides startup and shutdown of all framework relat...
Typename typeName(bool cvqualify=true)
Returns a compiler and platform independent typename of T.
Definition: Typename.h:103