Safir SDK Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ConnectionAspectInjector.h
Go to the documentation of this file.
1 /******************************************************************************
2 *
3 * Copyright Saab AB, 2007-2013 (http://safir.sourceforge.net)
4 *
5 * Created by: Anders Widén / stawi
6 *
7 *******************************************************************************
8 *
9 * This file is part of Safir SDK Core.
10 *
11 * Safir SDK Core is free software: you can redistribute it and/or modify
12 * it under the terms of version 3 of the GNU General Public License as
13 * published by the Free Software Foundation.
14 *
15 * Safir SDK Core is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with Safir SDK Core. If not, see <http://www.gnu.org/licenses/>.
22 *
23 ******************************************************************************/
24 
25 #ifndef _SAFIR_DOB_CONNECTION_ASPECT_INJECTOR_H
26 #define _SAFIR_DOB_CONNECTION_ASPECT_INJECTOR_H
27 
32 
33 #include <string>
34 
35 namespace Safir
36 {
37 namespace Dob
38 {
44  {
45  public:
51  ConnectionAspectInjector(const ConnectionBase& connection) : ConnectionAspectBase(connection) {}
52 
65  void InjectChanges(const Dob::EntityPtr& entity,
66  const Dob::Typesystem::InstanceId& instanceId,
67  const Dob::Typesystem::Int64 timestamp,
68  const Dob::Typesystem::HandlerId& handlerId) const;
69 
80  void InjectDelete(const Dob::Typesystem::EntityId& entityId,
81  const Dob::Typesystem::Int64 timestamp,
82  const Dob::Typesystem::HandlerId& handlerId) const;
83 
84 
92  void InitialSet(const Dob::EntityPtr& entity,
93  const Dob::Typesystem::InstanceId& instanceId,
94  const Dob::Typesystem::HandlerId& handlerId) const;
95 
123  void SubscribeEntity(const Dob::Typesystem::TypeId typeId,
124  const bool includeUpdates,
125  const bool includeSubclasses,
126  const bool restartSubscription,
127  const bool wantsGhostDelete,
128  const bool wantsLastState,
129  const bool doesntWantSourceIsPermanentStore,
130  const bool wantsAllStateChanges,
131  const bool timestampChangeInfo,
132  Dob::EntitySubscriber* const entitySubscriber) const;
133  };
134 
135 }
136 }
137 
138 #endif
Base class for all aspects.
Definition: ConnectionAspectBase.h:38
Class containing the identity of an entity.
Definition: EntityId.h:41
Class containing the identity of a handler.
Definition: HandlerId.h:44
boost::shared_ptr< Entity > EntityPtr
Definition: Entity.h:32
Class containing the identity of an instance.
Definition: InstanceId.h:47
Interface to be implemented by subscribers of entities.
Definition: Consumer.h:350
DotsC_Int64 Int64
64 bit integer type.
Definition: Defs.h:70
DotsC_TypeId TypeId
A unique type identifier.
Definition: Defs.h:219
Common base class for connections to the DOB.
Definition: ConnectionBase.h:52
Class that provides methods for special applications that injects entities into the system apart from...
Definition: ConnectionAspectInjector.h:43
ConnectionAspectInjector(const ConnectionBase &connection)
Constructor.
Definition: ConnectionAspectInjector.h:51
#define DOSE_CPP_API
Definition: DoseCppExportDefs.h:33