25#ifndef _SAFIR_DOB_CONSUMER_BASE_H
26#define _SAFIR_DOB_CONSUMER_BASE_H
43#pragma warning (disable: 4250)
92 friend class Safir::Dob::Internal::Callbacks;
96 (L
"Call to ConsumerBase::ToRevokedRegistrationBase is illegal. Method must be overridden!",
100 (L
"Call to ConsumerBase::ToCompletedRegistrationBase is illegal. Method must be overridden!",
104 (L
"Call to ConsumerBase::ToEntityRequestBase is illegal. Method must be overridden!",
106 virtual EntityInjectionBase * ToEntityInjectionBase()
108 (L
"Call to ConsumerBase::ToEntityInjectionBase is illegal. Method must be overridden!",
110 virtual ServiceRequestBase * ToServiceRequestBase()
111 {
throw Dob::Typesystem::SoftwareViolationException
112 (L
"Call to ConsumerBase::ToServiceRequestBase is illegal. Method must be overridden!",
114 virtual StopHandler * ToStopHandler()
115 {
throw Dob::Typesystem::SoftwareViolationException
116 (L
"Call to ConsumerBase::ToStopHandler is illegal. Method must be overridden!",
118 virtual Dispatcher * ToDispatcher()
119 {
throw Dob::Typesystem::SoftwareViolationException
120 (L
"Call to ConsumerBase::ToDispatcher is illegal. Method must be overridden!",
122 virtual EntityHandler * ToEntityHandler()
123 {
throw Dob::Typesystem::SoftwareViolationException
124 (L
"Call to ConsumerBase::ToEntityHandler is illegal. Method must be overridden!",
126 virtual EntityHandlerInjection * ToEntityHandlerInjection()
127 {
throw Dob::Typesystem::SoftwareViolationException
128 (L
"Call to ConsumerBase::ToEntityHandlerInjection is illegal. Method must be overridden!",
130 virtual EntityHandlerPending * ToEntityHandlerPending()
131 {
throw Dob::Typesystem::SoftwareViolationException
132 (L
"Call to ConsumerBase::ToEntityHandlerPending is illegal. Method must be overridden!",
134 virtual ServiceHandler * ToServiceHandler()
135 {
throw Dob::Typesystem::SoftwareViolationException
136 (L
"Call to ConsumerBase::ToServiceHandler is illegal. Method must be overridden!",
138 virtual ServiceHandlerPending * ToServiceHandlerPending()
139 {
throw Dob::Typesystem::SoftwareViolationException
140 (L
"Call to ConsumerBase::ToServiceHandlerPending is illegal. Method must be overridden!",
142 virtual Requestor * ToRequestor()
143 {
throw Dob::Typesystem::SoftwareViolationException
144 (L
"Call to ConsumerBase::ToRequestor is illegal. Method must be overridden!",
146 virtual MessageSender * ToMessageSender()
147 {
throw Dob::Typesystem::SoftwareViolationException
148 (L
"Call to ConsumerBase::ToMessageSender is illegal. Method must be overridden!",
150 virtual RegistrationSubscriber * ToRegistrationSubscriber()
151 {
throw Dob::Typesystem::SoftwareViolationException
152 (L
"Call to ConsumerBase::ToRegistrationSubscriber is illegal. Method must be overridden!",
154 virtual MessageSubscriber * ToMessageSubscriber()
155 {
throw Dob::Typesystem::SoftwareViolationException
156 (L
"Call to ConsumerBase::ToMessageSubscriber is illegal. Method must be overridden!",
158 virtual EntitySubscriber * ToEntitySubscriber()
159 {
throw Dob::Typesystem::SoftwareViolationException
160 (L
"Call to ConsumerBase::ToEntitySubscriber is illegal. Method must be overridden!",
165 static RevokedRegistrationBase * ToRevokedRegistrationBase(
void * consumerBase)
166 {
return static_cast<ConsumerBase*
>(consumerBase)->ToRevokedRegistrationBase();}
167 static CompletedRegistrationBase * ToCompletedRegistrationBase(
void * consumerBase)
168 {
return static_cast<ConsumerBase*
>(consumerBase)->ToCompletedRegistrationBase();}
169 static EntityRequestBase * ToEntityRequestBase(
void * consumerBase)
170 {
return static_cast<ConsumerBase*
>(consumerBase)->ToEntityRequestBase();}
171 static EntityInjectionBase * ToEntityInjectionBase(
void * consumerBase)
172 {
return static_cast<ConsumerBase*
>(consumerBase)->ToEntityInjectionBase();}
173 static ServiceRequestBase * ToServiceRequestBase(
void * consumerBase)
174 {
return static_cast<ConsumerBase*
>(consumerBase)->ToServiceRequestBase();}
175 static StopHandler * ToStopHandler(
void * consumerBase)
176 {
return static_cast<ConsumerBase*
>(consumerBase)->ToStopHandler();}
177 static Dispatcher * ToDispatcher(
void * consumerBase)
178 {
return static_cast<ConsumerBase*
>(consumerBase)->ToDispatcher();}
179 static EntityHandler * ToEntityHandler(
void * consumerBase)
180 {
return static_cast<ConsumerBase*
>(consumerBase)->ToEntityHandler();}
181 static EntityHandlerInjection * ToEntityHandlerInjection(
void * consumerBase)
182 {
return static_cast<ConsumerBase*
>(consumerBase)->ToEntityHandlerInjection();}
183 static EntityHandlerPending * ToEntityHandlerPending(
void * consumerBase)
184 {
return static_cast<ConsumerBase*
>(consumerBase)->ToEntityHandlerPending();}
185 static ServiceHandler * ToServiceHandler(
void * consumerBase)
186 {
return static_cast<ConsumerBase*
>(consumerBase)->ToServiceHandler();}
187 static ServiceHandlerPending * ToServiceHandlerPending(
void * consumerBase)
188 {
return static_cast<ConsumerBase*
>(consumerBase)->ToServiceHandlerPending();}
189 static Requestor * ToRequestor(
void * consumerBase)
190 {
return static_cast<ConsumerBase*
>(consumerBase)->ToRequestor();}
191 static MessageSender * ToMessageSender(
void * consumerBase)
192 {
return static_cast<ConsumerBase*
>(consumerBase)->ToMessageSender();}
193 static RegistrationSubscriber * ToRegistrationSubscriber(
void * consumerBase)
194 {
return static_cast<ConsumerBase*
>(consumerBase)->ToRegistrationSubscriber();}
195 static MessageSubscriber * ToMessageSubscriber(
void * consumerBase)
196 {
return static_cast<ConsumerBase*
>(consumerBase)->ToMessageSubscriber();}
197 static EntitySubscriber * ToEntitySubscriber(
void * consumerBase)
198 {
return static_cast<ConsumerBase*
>(consumerBase)->ToEntitySubscriber();}
357 (void)injectedEntityProxy;
368 (void)injectedEntityProxy;
379 (void)injectedEntityProxy;
#define DOSE_CPP_API
Definition DoseCppExportDefs.h:33
#define __WFILE__
Definition Exceptions.h:31
This namespace contains all the functionality and definitions of the SAFIR SDK.
Definition Backdoor.h:31
This namespace contains all functionality of the DOB (Components DOSE and DOTS).
Definition Connection.h:38
std::shared_ptr< ResponseSender > ResponseSenderPtr
Definition ResponseSender.h:106
Definition ConsumerBase.h:70
DotsC_TypeId TypeId
A unique type identifier.
Definition Defs.h:218
Interface for reception of a stop order.
Definition Consumer.h:55
Interface for reception of a dispatch order.
Definition Consumer.h:74
Interface to be implemented by an entity handler that makes a non-pending registration and that doesn...
Definition Consumer.h:115
Interface to be implemented by an entity handler that makes a non-pending registration for a type tha...
Definition Consumer.h:155
Interface to be implemented by an entity handler that makes a pending registration.
Definition Consumer.h:197
Interface to be implemented by a service handler that makes a non-pending registration.
Definition Consumer.h:218
Interface to be implemented by a service handler that makes a pending registration.
Definition Consumer.h:242
Interface to be implemented by an application that sends requests (Request on entities or service req...
Definition Consumer.h:254
Interface to be implemented by senders of messages.
Definition Consumer.h:280
Interface to be implemented by subscribers of handler registrations.
Definition Consumer.h:299
Interface to be implemented by subscribers of messages.
Definition Consumer.h:331
Interface to be implemented by subscribers of entities.
Definition Consumer.h:352
Base class used when composing more elaborated interfaces.
Definition ConsumerBase.h:87
virtual ~ConsumerBase()
Definition ConsumerBase.h:89
Base class used when composing more elaborated interfaces.
Definition ConsumerBase.h:209
virtual ~RevokedRegistrationBase()
Virtual destructor is needed since we have virtual member functions.
Definition ConsumerBase.h:212
virtual void OnRevokedRegistration(const Safir::Dob::Typesystem::TypeId typeId, const Safir::Dob::Typesystem::HandlerId &handlerId)=0
Indicates that the handler is no longer registered for the given type.
Base class used when composing more elaborated interfaces.
Definition ConsumerBase.h:233
virtual void OnCompletedRegistration(const Safir::Dob::Typesystem::TypeId typeId, const Safir::Dob::Typesystem::HandlerId &handlerId)=0
Indicates that a pending registration has completed and the handler is now registered.
Interface to receive entity requests.
Definition ConsumerBase.h:255
virtual void OnCreateRequest(const Safir::Dob::EntityRequestProxy entityRequestProxy, Safir::Dob::ResponseSenderPtr responseSender)=0
Called when someone requests an entity to be created.
virtual void OnDeleteRequest(const Safir::Dob::EntityRequestProxy entityRequestProxy, Safir::Dob::ResponseSenderPtr responseSender)=0
Called when someone requests an entity to be deleted.
virtual void OnUpdateRequest(const Safir::Dob::EntityRequestProxy entityRequestProxy, Safir::Dob::ResponseSenderPtr responseSender)=0
Called when someone requests an entity to be updated.
virtual ~EntityRequestBase()
Virtual destructor is needed since we have virtual member functions.
Definition ConsumerBase.h:258
This Consumer Base class contains callback methods that can be overridden by an entity handler that r...
Definition ConsumerBase.h:347
virtual void OnInjectedDeletedEntity(const Safir::Dob::InjectedEntityProxy injectedEntityProxy)
Called when an entity delete is about to be injected in the system.
Definition ConsumerBase.h:377
virtual void OnInjectedNewEntity(const Safir::Dob::InjectedEntityProxy injectedEntityProxy)
Called when a new entity is about to be injected in the system.
Definition ConsumerBase.h:355
virtual void OnInitialInjectionsDone(const Safir::Dob::Typesystem::TypeId typeId, const Safir::Dob::Typesystem::HandlerId &handlerId)
Indicates that all initial injection data has been transfered to the handler.
Definition ConsumerBase.h:398
virtual void OnInjectedUpdatedEntity(const Safir::Dob::InjectedEntityProxy injectedEntityProxy)
Called when an updated entity is about to be injected in the system.
Definition ConsumerBase.h:366
Interface to receive service requests.
Definition ConsumerBase.h:418
virtual void OnServiceRequest(const Safir::Dob::ServiceRequestProxy serviceRequestProxy, Safir::Dob::ResponseSenderPtr responseSender)=0
Called when a service request is received.
virtual ~ServiceRequestBase()
Virtual destructor is needed since we have virtual member functions.
Definition ConsumerBase.h:421
Proxy class for an entity request.
Definition EntityRequestProxy.h:54
Proxy class for entity injections.
Definition InjectedEntityProxy.h:53
Proxy class for a service request.
Definition ServiceRequestProxy.h:53
Meant to be used when something goes very wrong.
Definition Exceptions.h:364
Class containing the identity of a handler.
Definition HandlerId.h:46