00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00037 #ifndef RC_ACCESSOR_H_
00038 #define RC_ACCESSOR_H_
00039
00040 #include "ReChannel/communication/accessors/rc_abstract_accessor.h"
00041
00042 namespace ReChannel {
00043
00049 template<class IF>
00050 class rc_accessor
00051 : public rc_abstract_accessor<IF>
00052 {
00053 public:
00054 typedef IF if_type;
00055
00056 private:
00057 rc_accessor();
00058 };
00059
00060 }
00061
00062 #define RC_ACCESSOR(interface_type) \
00063 template<> \
00064 struct rc_accessor<interface_type > \
00065 : public rc_abstract_accessor<interface_type > \
00066
00067 #define RC_ACCESSOR_TEMPLATE(interface_type) \
00068 struct rc_accessor<interface_type > \
00069 : public rc_abstract_accessor<interface_type > \
00070
00071 #define RC_ACCESSOR_CTOR(interface_type) \
00072 typedef interface_type if_type; \
00073 rc_accessor() \
00074 : rc_abstract_accessor<if_type >()
00075
00076 #define RC_ACCESSOR_TEMPLATE_CTOR(interface_type) \
00077 RC_ACCESSOR_CTOR(interface_type)
00078
00079 #define RC_ON_TARGET_CHANGED() \
00080 virtual void rc_on_target_changed()
00081
00082 #define _RECHANNEL_EVENT_MEMBER(event_method_name) \
00083 _rc_p_event_##event_method_name
00084
00085 #define RC_EVENT(event_method_name) \
00086 virtual const sc_event& event_method_name() const \
00087 { \
00088 return _RECHANNEL_EVENT_MEMBER(event_method_name); \
00089 } \
00090 private: \
00091 sc_event _RECHANNEL_EVENT_MEMBER(event_method_name); \
00092 public: \
00093 typedef sc_event _rc_event_dummy_##event_method_name##_type
00094
00095 #define RC_EVENT_ALIAS(event_method_name, alias) \
00096 virtual const sc_event& alias() const \
00097 { \
00098 return this->event_method_name(); \
00099 } \
00100 typedef sc_event _rc_event_dummy_##alias##_type
00101
00102 #endif // RC_ACCESSOR_H_
00103
00104
00105
00106
00107