25#ifndef _SAFIR_DOB_CONNECTION_BASE_H
26#define _SAFIR_DOB_CONNECTION_BASE_H
294 const bool includeSubclasses,
338 const bool includeSubclasses,
385 const bool includeUpdates,
386 const bool includeSubclasses,
387 const bool restartSubscription,
406 const bool includeUpdates,
407 const bool restartSubscription,
441 const bool includeSubclasses,
490 const bool includeSubclasses,
491 const bool restartSubscription,
513 const bool includeSubclasses,
779 const bool includeSubclasses)
const;
830 const bool includeSubclasses)
const;
868 virtual DotsC_Int32 GetControllerId()
const = 0;
873 const bool considerChangeFlags)
const;
#define DOSE_CPP_API
Definition DoseCppExportDefs.h:33
This namespace contains all the functionality and definitions of the SAFIR SDK.
Definition Backdoor.h:31
std::shared_ptr< Message > MessagePtr
Definition Message.h:34
std::shared_ptr< Service > ServicePtr
Definition Service.h:34
Safir::Dob::Typesystem::Int32 RequestId
Represents the id of a request.
Definition Defs.h:42
std::shared_ptr< Entity > EntityPtr
Definition Entity.h:34
DotsC_Int64 Int64
64 bit integer type.
Definition Defs.h:69
DotsC_TypeId TypeId
A unique type identifier.
Definition Defs.h:218
Base class for all aspects.
Definition ConnectionAspectBase.h:38
Common base class for connections to the DOB.
Definition ConnectionBase.h:59
void UnsubscribeMessage(const Dob::Typesystem::TypeId typeId, const Dob::Typesystem::ChannelId &channelId, const bool includeSubclasses, Dob::MessageSubscriber *const messageSubscriber) const
Remove a message subscription made by the given subscriber (additional parameters).
void RegisterEntityHandlerInjection(const Safir::Dob::Typesystem::TypeId typeId, const Dob::Typesystem::HandlerId &handlerId, const Dob::InstanceIdPolicy::Enumeration instanceIdPolicy, Dob::EntityHandlerInjection *const entityHandlerInjection) const
Register an entity handler that also gets informed about injected entities.
void UnsubscribeEntity(const Dob::Typesystem::TypeId typeId, const bool includeSubclasses, Dob::EntitySubscriber *const entitySubscriber) const
Remove an entity subscription made by the given subscriber (additional parameters).
Dob::Typesystem::Int64 GetNumberOfInstances(const Dob::Typesystem::TypeId typeId, const Dob::Typesystem::HandlerId &handlerId, const bool includeSubclasses) const
This method is used to get the number of instances of an entity that exists.
ConnectionBase()
Constructor.
void UnsubscribeEntity(const Dob::Typesystem::TypeId typeId, Dob::EntitySubscriber *const entitySubscriber) const
Remove an entity subscription made by the given subscriber.
void SubscribeMessage(const Dob::Typesystem::TypeId typeId, const Dob::Typesystem::ChannelId &channelId, Dob::MessageSubscriber *const messageSubscriber) const
Set up subscription for messages of a certain type and its subclasses.
Dob::InstanceIdPolicy::Enumeration GetInstanceIdPolicy(const Dob::Typesystem::TypeId typeId, const Dob::Typesystem::HandlerId &handlerId) const
This method is used to get the instanceIdPolicy for a specific class and handler.
Dob::RequestId CreateRequest(const Dob::EntityPtr &request, const Dob::Typesystem::HandlerId &handlerId, Dob::Requestor *const requestor) const
Request to a handler to create an entity instance without specifying the instanceId.
void ExitDispatch() const
Interrupt the ongoing Dispatch even if all data to the application have not been distpatched.
void SubscribeRegistration(const Dob::Typesystem::TypeId typeId, const Dob::Typesystem::HandlerId &handlerId, const bool includeSubclasses, const bool restartSubscription, Dob::RegistrationSubscriber *const registrationSubscriber) const
Set up subscription for notifications about when a specific handler for an entity type or a service t...
Dob::EntityIterator GetEntityIterator(const Dob::Typesystem::TypeId typeId, const bool includeSubclasses) const
Retreives an STL compliant iterator to iterate over created instances.
virtual bool IsOpen() const =0
Tells if the connection is opened.
const Dob::EntityProxy Read(const Dob::Typesystem::EntityId &entityId) const
Read an entity from the distributed object pool.
Dob::RequestId CreateRequest(const Dob::EntityPtr &request, const Dob::Typesystem::InstanceId &instanceId, const Dob::Typesystem::HandlerId &handlerId, Dob::Requestor *const requestor) const
Request to a handler to create a specific entity instance.
void SubscribeMessage(const Dob::Typesystem::TypeId typeId, const Dob::Typesystem::ChannelId &channelId, const bool includeSubclasses, Dob::MessageSubscriber *const messageSubscriber) const
Set up subscription for messages of a certain type (additional parameters).
virtual ~ConnectionBase()
Destructor.
void SubscribeEntity(const Dob::Typesystem::TypeId typeId, Dob::EntitySubscriber *const entitySubscriber) const
Set up subscription for instances of an entity type and its subclasses.
void RegisterServiceHandlerPending(const Dob::Typesystem::TypeId typeId, const Dob::Typesystem::HandlerId &handlerId, Dob::ServiceHandlerPending *const serviceHandlerPending) const
Pending registration of a handler for a given service type.
void DeleteAllInstances(const Dob::Typesystem::TypeId typeId, const Dob::Typesystem::HandlerId &handlerId) const
Allows an entity handler to delete all owned instances.
void Send(const Dob::MessagePtr &message, const Dob::Typesystem::ChannelId &channelId, Dob::MessageSender *const messageSender) const
Send a message on the specified channel.
void UnsubscribeEntity(const Dob::Typesystem::EntityId &entityId, Dob::EntitySubscriber *const entitySubscriber) const
Remove an entity instance subscription made by the given subscriber.
Dob::RequestId ServiceRequest(const Dob::ServicePtr &request, const Dob::Typesystem::HandlerId &handlerId, Dob::Requestor *const requestor) const
Send a request to the given service handler.
Dob::RequestId DeleteRequest(const Dob::Typesystem::EntityId &entityId, Dob::Requestor *const requestor) const
Send a delete request on an existing entity instance.
void SubscribeEntity(const Dob::Typesystem::EntityId &entityId, const bool includeUpdates, const bool restartSubscription, Dob::EntitySubscriber *const entitySubscriber) const
Set up subscription for a specific instance of an entity type.
void RegisterEntityHandler(const Safir::Dob::Typesystem::TypeId typeId, const Dob::Typesystem::HandlerId &handlerId, const Dob::InstanceIdPolicy::Enumeration instanceIdPolicy, Dob::EntityHandler *const entityHandler) const
Registration of an entity handler for a given type.
void UnsubscribeMessage(const Dob::Typesystem::TypeId typeId, const Dob::Typesystem::ChannelId &channelId, Dob::MessageSubscriber *const messageSubscriber) const
Remove a message subscription made by the given subscriber.
bool IsCreated(const Dob::Typesystem::EntityId &entityId) const
Check if an instance of an entity is created or not.
void UnregisterHandler(const Dob::Typesystem::TypeId typeId, const Dob::Typesystem::HandlerId &handlerId) const
Unregister of an entity handler or a service handler.
void RegisterServiceHandler(const Safir::Dob::Typesystem::TypeId typeId, const Dob::Typesystem::HandlerId &handlerId, Dob::ServiceHandler *const serviceHandler) const
Register a service handler for a given type.
Dob::RequestId UpdateRequest(const Dob::EntityPtr &request, const Dob::Typesystem::InstanceId &instanceId, Dob::Requestor *const requestor) const
Send an update request on an existing entity instance.
void UnsubscribeRegistration(const Dob::Typesystem::TypeId typeId, const Dob::Typesystem::HandlerId &handlerId, const bool includeSubclasses, Dob::RegistrationSubscriber *const registrationSubscriber) const
Removes a registration subscription.
void SubscribeEntity(const Dob::Typesystem::TypeId typeId, const bool includeUpdates, const bool includeSubclasses, const bool restartSubscription, Dob::EntitySubscriber *const entitySubscriber) const
Subscription for an entity type (additional parameters).
void Delete(const Dob::Typesystem::EntityId &entityId, const Dob::Typesystem::HandlerId &handlerId) const
Allows an entity handler to delete a specific owned entity instance.
void RegisterEntityHandlerPending(const Dob::Typesystem::TypeId typeId, const Dob::Typesystem::HandlerId &handlerId, const Dob::InstanceIdPolicy::Enumeration instanceIdPolicy, Dob::EntityHandlerPending *const entityHandlerPending) const
Pending registration of a handler for a given entity type.
void SetAll(const Dob::EntityPtr &entity, const Dob::Typesystem::InstanceId &instanceId, const Dob::Typesystem::HandlerId &handlerId) const
Allows an entity handler to create or update an entity.
void SetChanges(const Dob::EntityPtr &entity, const Dob::Typesystem::InstanceId &instanceId, const Dob::Typesystem::HandlerId &handlerId) const
Merge the changed members of an entity straight into the pool (the given handler must be the owner).
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
A STL conformant forward iterator used to traverse entity instances.
Definition EntityIterator.h:47
Proxy class for an entity.
Definition EntityProxy.h:54
Class containing the identity of a channel.
Definition ChannelId.h:46
Class containing the identity of an entity.
Definition EntityId.h:43
Class containing the identity of a handler.
Definition HandlerId.h:46
Class containing the identity of an instance.
Definition InstanceId.h:49
Enumeration
Definition InstanceIdPolicy.h:37