VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtMilStdJsonRegistryBase.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 
10 
11 #include <vrvMilStd/vrvMilStd.h>
13 
14 #include <rapidjson/document.h>
15 
16 #include <string>
17 
18 namespace makVrv
19 {
20 
27 {
28 public:
30  virtual ~DtMilStdJsonRegistryBase();
31 
36  DtMilStdJsonRegistryBase& operator=( const DtMilStdJsonRegistryBase& ) = delete;
37  DtMilStdJsonRegistryBase& operator=( const DtMilStdJsonRegistryBase&& ) = delete;
39 
43  bool isLoaded() const { return myLoaded; }
44 
52  virtual const char* registryName() const = 0;
53 
54 protected:
61  virtual bool openAndParse( const std::string& filePath, rapidjson::Document& doc ) const;
62 
64  virtual bool setAndValidateVersions(const rapidjson::Document& doc, const std::string& filePath);
65 
73  virtual bool requireField(const rapidjson::Value& obj,
74  const char* fieldName,
75  const std::string& context ) const;
76 
91  virtual bool validateStructure( const rapidjson::Document& doc,
92  const std::string& filePath, int version ) const;
93 
94 protected:
95  int myVersion;
97  bool myLoaded;
98 };
99 
100 } // namespace makVrv
int myVersion
Version number read from the JSON file. Set by derived-class load() implementations.
Definition: DtMilStdJsonRegistryBase.h:95
bool myLoaded
True after a successful load(). Set by derived-class load() implementations.
Definition: DtMilStdJsonRegistryBase.h:97
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
int myMaxVersion
Maximum version supported by this registry. Set by derived-class load() implementations.
Definition: DtMilStdJsonRegistryBase.h:96
bool isLoaded() const
Returns true after a successful load().
Definition: DtMilStdJsonRegistryBase.h:43
Contains makVrv::DtVirtualBaseClass class.
#define DT_DLL_VRVMILSTD
Definition: vrvMilStd.h:20
IMGUI_API void Value(const char *prefix, bool b)
Base class for MIL-STD-2525D JSON registry loaders.
Definition: DtMilStdJsonRegistryBase.h:26
Contains DLL export macros.

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)