48 #ifndef _MIRA_CHANNEL_PROMOTE_BY_TYPENAME_H_
49 #define _MIRA_CHANNEL_PROMOTE_BY_TYPENAME_H_
63 class TypedChannelPromoterBase :
public Object
69 virtual
void promote(ConcreteChannel<
void>* channel) const = 0;
72 typedef boost::shared_ptr<TypedChannelPromoterBase> TypedChannelPromoterBasePtr;
76 class ChannelPromoteByTypename : public LazySingleton<ChannelPromoteByTypename>
85 bool promoteChannel(ConcreteChannel<void>* channel,
const Typename& channelType);
90 template <
typename PromoteFrom>
91 bool promoteChannel(ConcreteChannel<PromoteFrom>* channel,
101 template <
typename PromoteTo>
102 bool checkForPromoter(ConcreteChannel<PromoteTo>* channel)
104 return checkForPromoter(typeName<PromoteTo>(), channel->getID());
111 bool checkForPromoter(ConcreteChannel<void>* channel)
118 bool checkForPromoter(
const Typename& channelType,
const std::string& channelID);
119 void lookForNewPromoters();
120 std::string getSourceHint();
125 std::set<ClassProxy> mKnownPromoterClasses;
128 std::multimap<Typename, ClassProxy> mKnownPromoters;
131 std::map<Typename, TypedChannelPromoterBasePtr> mInstantiatedPromoters;
std::string Typename
Definition: Typename.h:59
#define MIRA_ABSTRACT_OBJECT(classIdentifier)
Use this MACRO instead of MIRA_OBJECT to declare the class as abstract.
Definition: FactoryMacros.h:239
json_spirit::mObject Object
A representation of an object (class, struct) in JSON.
Definition: JSON.h:183
Framework channel classes.