VR-Exchange 2.10 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
pObjectPublisher.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2016 MAK Technologies, Inc.
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <portal/pConnection.h>
13 #include <portal/pGenericObject.h>
14 #include <portal/pControlMessage.h>
15 
16 namespace MAKVrExchange
17 {
18 
23  {
24  public:
25 
28 
30  virtual ~DtPortalObjectPublisher();
31 
33  virtual void forceUpdate();
34 
36  virtual void tick() = 0;
37 
40 
41  virtual DtPortalObject* baseSr();
42  virtual const DtPortalObject* baseSr() const;
43 
45 
48  virtual void processNewBrokerStarted( const DtBrokerStartedMessage& msg );
49 
50  protected:
51 
54  static void newBrokerStartedCb( const DtBrokerStartedMessage& msg, void* usr );
55 
56  protected:
57 
61 
62  };
63 
64 
67  template<typename T_PortalObject>
69  {
70  public:
71 
74 
77 
80 
81  virtual T_PortalObject* sr();
82  virtual const T_PortalObject* sr() const;
83 
85 
87  virtual void tick();
88 
89  protected:
90 
92  static void filterObjectCallback( const DtFilterObjectMessage& object, void* userData );
93 
94  protected:
95 
98  T_PortalObject myAsSeenByStateRepository;
99 
101  T_PortalObject* myStateRepository;
102 
103  };
104 
105 }
106 
107 #define _pObjectPublisher_INL_
108 #include <portal/pObjectPublisher.inl>
109 #undef _pObjectPublisher_INL_
Contains the DtPortalControlMessage class declarations.
#define DT_DLL_LIBPORTAL
Definition: include/portal/dllExport.h:20
bool myForceUpdateFlag
Definition: pObjectPublisher.h:58
DtPortalConnection * myConn
Definition: pObjectPublisher.h:59
DtPortalObjectPublisherTemplate(DtPortalConnection *conn)
CTOR.
DtPortalObject are messages which also serve as state repositories for simulated objects.
Definition: pObject.h:23
A simple template class to hold different types of State Repositories.
Definition: pObjectPublisher.h:68
PortalControlMessageTemplate is used to create new DtPortalControlMessage types.
Definition: pControlMessage.h:71
Contains the DtPortalGenericObject class declaration.
T_PortalObject myAsSeenByStateRepository
This is the &quot;as Seen By&quot; state repository which is only updated when data is sent out...
Definition: pObjectPublisher.h:98
T_PortalObject * myStateRepository
The state repository, which is the current state of the object.
Definition: pObjectPublisher.h:101
DtPortalObject * myBaseStateRepository
Definition: pObjectPublisher.h:60
DtFilterObjectMessage is used to indicate a specific object needs to be filtered. ...
Definition: pControlMessage.h:105
virtual void tick()
Ticks the publisher and sends updates if needed.
virtual ~DtPortalObjectPublisherTemplate()
Virtual DTOR.
This class is responsible for publishing messages with persistent state.
Definition: pObjectPublisher.h:22
static void filterObjectCallback(const DtFilterObjectMessage &object, void *userData)
Callback function used for DtFilterObjectMessage messages.
Connects a broker to the Portal Data Exchange.
Definition: pConnection.h:49
Contains the DtPortalConnection class declaration.

Document ID: Generated on Mon May 25 18:45:12 EDT 2026 from SVN revision 289111
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)