25 #ifndef _SAFIR_DOB_CONSUMER_BASE_H
26 #define _SAFIR_DOB_CONSUMER_BASE_H
43 #pragma warning (disable: 4250)
51 class RevokedRegistrationBase;
52 class CompletedRegistrationBase;
53 class EntityRequestBase;
54 class EntityInjectionBase;
55 class ServiceRequestBase;
59 class EntityHandlerInjection;
60 class EntityHandlerPending;
62 class ServiceHandlerPending;
65 class RegistrationSubscriber;
66 class MessageSubscriber;
67 class EntitySubscriber;
90 friend class Safir::Dob::Internal::Callbacks;
94 (L
"Call to ConsumerBase::ToRevokedRegistrationBase is illegal. Method must be overridden!",
98 (L
"Call to ConsumerBase::ToCompletedRegistrationBase is illegal. Method must be overridden!",
102 (L
"Call to ConsumerBase::ToEntityRequestBase is illegal. Method must be overridden!",
104 virtual EntityInjectionBase * ToEntityInjectionBase()
106 (L
"Call to ConsumerBase::ToEntityInjectionBase is illegal. Method must be overridden!",
108 virtual ServiceRequestBase * ToServiceRequestBase()
109 {
throw Dob::Typesystem::SoftwareViolationException
110 (L
"Call to ConsumerBase::ToServiceRequestBase is illegal. Method must be overridden!",
112 virtual StopHandler * ToStopHandler()
113 {
throw Dob::Typesystem::SoftwareViolationException
114 (L
"Call to ConsumerBase::ToStopHandler is illegal. Method must be overridden!",
116 virtual Dispatcher * ToDispatcher()
117 {
throw Dob::Typesystem::SoftwareViolationException
118 (L
"Call to ConsumerBase::ToDispatcher is illegal. Method must be overridden!",
120 virtual EntityHandler * ToEntityHandler()
121 {
throw Dob::Typesystem::SoftwareViolationException
122 (L
"Call to ConsumerBase::ToEntityHandler is illegal. Method must be overridden!",
124 virtual EntityHandlerInjection * ToEntityHandlerInjection()
125 {
throw Dob::Typesystem::SoftwareViolationException
126 (L
"Call to ConsumerBase::ToEntityHandlerInjection is illegal. Method must be overridden!",
128 virtual EntityHandlerPending * ToEntityHandlerPending()
129 {
throw Dob::Typesystem::SoftwareViolationException
130 (L
"Call to ConsumerBase::ToEntityHandlerPending is illegal. Method must be overridden!",
132 virtual ServiceHandler * ToServiceHandler()
133 {
throw Dob::Typesystem::SoftwareViolationException
134 (L
"Call to ConsumerBase::ToServiceHandler is illegal. Method must be overridden!",
136 virtual ServiceHandlerPending * ToServiceHandlerPending()
137 {
throw Dob::Typesystem::SoftwareViolationException
138 (L
"Call to ConsumerBase::ToServiceHandlerPending is illegal. Method must be overridden!",
140 virtual Requestor * ToRequestor()
141 {
throw Dob::Typesystem::SoftwareViolationException
142 (L
"Call to ConsumerBase::ToRequestor is illegal. Method must be overridden!",
144 virtual MessageSender * ToMessageSender()
145 {
throw Dob::Typesystem::SoftwareViolationException
146 (L
"Call to ConsumerBase::ToMessageSender is illegal. Method must be overridden!",
148 virtual RegistrationSubscriber * ToRegistrationSubscriber()
149 {
throw Dob::Typesystem::SoftwareViolationException
150 (L
"Call to ConsumerBase::ToRegistrationSubscriber is illegal. Method must be overridden!",
152 virtual MessageSubscriber * ToMessageSubscriber()
153 {
throw Dob::Typesystem::SoftwareViolationException
154 (L
"Call to ConsumerBase::ToMessageSubscriber is illegal. Method must be overridden!",
156 virtual EntitySubscriber * ToEntitySubscriber()
157 {
throw Dob::Typesystem::SoftwareViolationException
158 (L
"Call to ConsumerBase::ToEntitySubscriber is illegal. Method must be overridden!",
163 static RevokedRegistrationBase * ToRevokedRegistrationBase(
void * consumerBase)
164 {
return static_cast<ConsumerBase*
>(consumerBase)->ToRevokedRegistrationBase();}
165 static CompletedRegistrationBase * ToCompletedRegistrationBase(
void * consumerBase)
166 {
return static_cast<ConsumerBase*
>(consumerBase)->ToCompletedRegistrationBase();}
167 static EntityRequestBase * ToEntityRequestBase(
void * consumerBase)
168 {
return static_cast<ConsumerBase*
>(consumerBase)->ToEntityRequestBase();}
169 static EntityInjectionBase * ToEntityInjectionBase(
void * consumerBase)
170 {
return static_cast<ConsumerBase*
>(consumerBase)->ToEntityInjectionBase();}
171 static ServiceRequestBase * ToServiceRequestBase(
void * consumerBase)
172 {
return static_cast<ConsumerBase*
>(consumerBase)->ToServiceRequestBase();}
173 static StopHandler * ToStopHandler(
void * consumerBase)
174 {
return static_cast<ConsumerBase*
>(consumerBase)->ToStopHandler();}
175 static Dispatcher * ToDispatcher(
void * consumerBase)
176 {
return static_cast<ConsumerBase*
>(consumerBase)->ToDispatcher();}
177 static EntityHandler * ToEntityHandler(
void * consumerBase)
178 {
return static_cast<ConsumerBase*
>(consumerBase)->ToEntityHandler();}
179 static EntityHandlerInjection * ToEntityHandlerInjection(
void * consumerBase)
180 {
return static_cast<ConsumerBase*
>(consumerBase)->ToEntityHandlerInjection();}
181 static EntityHandlerPending * ToEntityHandlerPending(
void * consumerBase)
182 {
return static_cast<ConsumerBase*
>(consumerBase)->ToEntityHandlerPending();}
183 static ServiceHandler * ToServiceHandler(
void * consumerBase)
184 {
return static_cast<ConsumerBase*
>(consumerBase)->ToServiceHandler();}
185 static ServiceHandlerPending * ToServiceHandlerPending(
void * consumerBase)
186 {
return static_cast<ConsumerBase*
>(consumerBase)->ToServiceHandlerPending();}
187 static Requestor * ToRequestor(
void * consumerBase)
188 {
return static_cast<ConsumerBase*
>(consumerBase)->ToRequestor();}
189 static MessageSender * ToMessageSender(
void * consumerBase)
190 {
return static_cast<ConsumerBase*
>(consumerBase)->ToMessageSender();}
191 static RegistrationSubscriber * ToRegistrationSubscriber(
void * consumerBase)
192 {
return static_cast<ConsumerBase*
>(consumerBase)->ToRegistrationSubscriber();}
193 static MessageSubscriber * ToMessageSubscriber(
void * consumerBase)
194 {
return static_cast<ConsumerBase*
>(consumerBase)->ToMessageSubscriber();}
195 static EntitySubscriber * ToEntitySubscriber(
void * consumerBase)
196 {
return static_cast<ConsumerBase*
>(consumerBase)->ToEntitySubscriber();}
boost::shared_ptr< ResponseSender > ResponseSenderPtr
Definition: ResponseSender.h:107
Class containing the identity of a handler.
Definition: HandlerId.h:44
Proxy class for a service request.
Definition: ServiceRequestProxy.h:52
virtual ~ServiceRequestBase()
Virtual destructor is needed since we have virtual member functions.
Definition: ConsumerBase.h:410
Base class used when composing more elaborated interfaces.
Definition: ConsumerBase.h:230
virtual void OnInjectedUpdatedEntity(const Safir::Dob::InjectedEntityProxy injectedEntityProxy)
Called when an updated entity is about to be injected in the system.
Definition: ConsumerBase.h:361
Meant to be used when something goes very wrong.
Definition: Exceptions.h:360
virtual ~ConsumerBase()
Definition: ConsumerBase.h:87
DotsC_TypeId TypeId
A unique type identifier.
Definition: Defs.h:219
Proxy class for an entity request.
Definition: EntityRequestProxy.h:53
virtual void OnInitialInjectionsDone(const Safir::Dob::Typesystem::TypeId typeId, const Dob::Typesystem::HandlerId &handlerId)
Indicates that all initial injection data has been transfered to the handler.
Definition: ConsumerBase.h:387
Base class used when composing more elaborated interfaces.
Definition: ConsumerBase.h:84
#define __WFILE__
Definition: Exceptions.h:31
Proxy class for entity injections.
Definition: InjectedEntityProxy.h:52
virtual ~EntityRequestBase()
Virtual destructor is needed since we have virtual member functions.
Definition: ConsumerBase.h:256
virtual ~RevokedRegistrationBase()
Virtual destructor is needed since we have virtual member functions.
Definition: ConsumerBase.h:210
This Consumer Base class contains callback methods that can be overridden by an entity handler that r...
Definition: ConsumerBase.h:344
#define DOSE_CPP_API
Definition: DoseCppExportDefs.h:33
Interface to receive entity requests.
Definition: ConsumerBase.h:251
virtual void OnInjectedDeletedEntity(const Safir::Dob::InjectedEntityProxy injectedEntityProxy)
Called when an entity delete is about to be injected in the system.
Definition: ConsumerBase.h:369
virtual void OnInjectedNewEntity(const Safir::Dob::InjectedEntityProxy injectedEntityProxy)
Called when a new entity is about to be injected in the system.
Definition: ConsumerBase.h:353
Base class used when composing more elaborated interfaces.
Definition: ConsumerBase.h:205
Interface to receive service requests.
Definition: ConsumerBase.h:405