7 #ifndef __signal_dispatchi_h__ 8 #define __signal_dispatchi_h__ 36 virtual bool call(
const String &a_name,
39 virtual bool call(
const String &a_name,
43 virtual SignatureMap &signatures(
void) = 0;
46 bool call(
const String &a_name,
49 bool call(
const String &a_name,
51 template<
class T,
class U>
52 bool call(
const String &a_name,
55 template<
class T,
class U>
56 bool call(
const String &a_name,
62 void dispatch(
const String &a_name);
65 virtual bool checkedCall(
const String &a_name,
75 instance.set<T>(registry()->
master()->typeMaster(), a_arg1);
76 args.push_back(instance);
77 return call(a_name, args);
87 instance.set<T>(registry()->
master()->typeMaster(), arg1);
88 args.push_back(instance);
89 return call(a_name, args);
92 template<
class T,
class U>
97 instance.set<T>(registry()->
master()->typeMaster(), a_arg1);
98 args.push_back(instance);
99 instance.set<U>(registry()->
master()->typeMaster(), a_arg2);
100 args.push_back(instance);
101 return call(a_name, args);
104 template<
class T,
class U>
113 instance.set<T>(registry()->
master()->typeMaster(), arg1);
114 args.push_back(instance);
115 instance.set<U>(registry()->
master()->typeMaster(), arg2);
116 args.push_back(instance);
117 return call(a_name, args);
122 void DispatchI::dispatch(
const String &a_name)
124 m_dispatchSignatures[a_name].append(
125 registry()->master()->typeMaster()->lookupType(
TypeInfo(
typeid(T))));
virtual bool call(const String &a_name, Array< Instance > &a_argv)=0
Execute the call.
Smart pointer used with types represented by BaseType.
Definition: Instance.h:28
kernel
Definition: namespace.dox:3
std::map< String, Signature > SignatureMap
Signature map.
Definition: DispatchI.h:16
C++ type_info wrapper.
Definition: Type.h:20
General call mechanism to enable exposure to scripting without requiring any binding work...
Definition: DispatchI.h:29
Automatically reference-counted string container.
Definition: String.h:128
Group of named instances.
Definition: InstanceMap.h:17
Wrapper for std::vector.
Definition: Array.h:21
Base for all interfacable components.
Definition: Component.h:20
sp< Master > master(void) const
Access the Master (ptr may not be valid)
Definition: Registry.cc:98
Per-class participation non-RTTI fallback dynamic casting mechanism.
Definition: Castable.h:192