VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
entityProcessor.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright (c) 2026 MAK Technologies, Inc.
3  * All rights reserved.
4  ******************************************************************************/
5 
6 #pragma once
7 
8 #include "iProcessor.h"
9 #include "dataTypes.h"
10 #include "vrfManager.h"
11 
12 #include <set>
13 #include <string>
14 #include <vector>
15 
16 namespace makVrf
17 {
18 class DtStateData;
19 }
20 
39 {
40 public:
41  DtEntityProcessor() = default;
42  virtual ~DtEntityProcessor() override = default;
43 
44  // =========================================================================
45  // DtProcessor interface
46  // =========================================================================
47  virtual void initialize(const DtVrfContext& context) override;
48  virtual void poll() override;
49  virtual void dispatchPendingEvents() override;
50  virtual void shutdown() override;
51  virtual int count() const override;
52 
53  // =========================================================================
54  // Query interface
55  // =========================================================================
56 
59  std::vector<DtDatasource::DtEntitySnapshot> queryAll() const;
60 
65  DtDatasource::DtEntitySnapshot query(const std::string& objectName) const;
66 
67  // =========================================================================
68  // Object tracking status
69  // =========================================================================
70 
71 protected:
72  std::shared_ptr<DtDatasource::DtEntitySnapshot> snapshotForEntity(DtWebServerObjectPtr obj) const;
73  void parseIffForEntity(DtWebServerObjectPtr obj, std::shared_ptr<DtDatasource::DtEntitySnapshot>& ptr) const;
74 
75 private:
77 };
std::shared_ptr< DtDatasource::DtEntitySnapshot > snapshotForEntity(DtWebServerObjectPtr obj) const
DtDatasource::DtEntitySnapshot query(const std::string &objectName) const
Return the snapshot for a single entity by objectName. Returns a default-constructed DtEntitySnapshot...
virtual void shutdown() override
Called on teardown. Release any resources.
virtual void poll() override
Called each tick while the VRF API mutex is held. Collect state changes and queue them internally...
DtVrfContext myVrfContext
Definition: entityProcessor.h:76
virtual void dispatchPendingEvents() override
Called each tick AFTER the VRF API mutex is released. Deliver any queued change notifications.
DtEntitySnapshot - Complete state of an entity at a point in time. VRF-agnostic intermediate represen...
Definition: dataTypes.h:57
DtVrfContext - Bundles the VRF runtime objects passed to a processor on initialization. All pointers remain valid for the lifetime of the processor.
Definition: vrfManager.h:59
DtProcessor - Abstract base interface for per-client data processors.
Definition: iProcessor.h:25
void parseIffForEntity(DtWebServerObjectPtr obj, std::shared_ptr< DtDatasource::DtEntitySnapshot > &ptr) const
DtEntityProcessor()=default
std::vector< DtDatasource::DtEntitySnapshot > queryAll() const
Return snapshots for all currently known entities. TODO: implement once the shared VRF data store is ...
virtual ~DtEntityProcessor() override=default
DtEntityProcessor - Lightweight per-client entity processor.
Definition: entityProcessor.h:38
virtual int count() const override
Number of objects currently known to this processor.
std::shared_ptr< DtWebServerObject > DtWebServerObjectPtr
Definition: webServerObject.h:90
virtual void initialize(const DtVrfContext &context) override
Called once before the first tick.

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)