VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtLightPointTable.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright(c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 #include <vrvUtil/vrvUtil.h>
13 
14 #include <string>
15 #include <map>
16 #include <boost/atomic.hpp>
17 
18 //defining these here avoids needing to include tree.h which would propagate dependencies to other projects
19 typedef struct _xmlNode xmlNode;
21 struct _xmlNode;
22 
23 typedef unsigned char xmlChar;
24 
25 namespace makVrv
26 {
27 
28  class DtDe;
29 
35  {
36  public:
37 
40 
42  virtual ~DtLightPointTable();
43 
47  virtual bool addLight(DtLightPointType *lightPointType, const std::string& codeStr);
48 
50  virtual DtLightPointType* getLight(unsigned int code);
51 
53  virtual DtLightPointType* getLight(const std::string& type);
54 
59  virtual void loadLightTableFromXML(const std::string& fileName);
60 
67  virtual void saveDefaultLightValuesToCSV(const std::string& filename);
68 
74  virtual void loadDefaultLightValuesFromCSV(const std::string& filename);
75 
78  virtual void loadDefaultLightValuesFromXML(const std::string& fileName);
79 
84  virtual void loadTunningLightValuesFromXML(const std::string& fileName);
85 
87  virtual bool isDirty();
88 
90  virtual void clean();
91 
93  virtual int maxCode();
94 
96  virtual void updateLightPointTypeMap();
97 
99  virtual int getOrCreateLightTypeCode(const DtLightPointType &lp);
100 
101  protected:
102 
104  virtual void loadLightTypeFromXML(xmlNodePtr lightTypeNode, const std::string* parentType);
105 
107  virtual bool compareXmlString(const xmlChar *xmlStr, const char* compareStr);
108 
109  protected:
110 
111  typedef std::map < DtLightPointType, unsigned int > LightPointTypeIntMap;
112  typedef std::pair < DtLightPointType, unsigned int > LightPointTypeIntPair;
113 
114  typedef std::map < unsigned int, DtLightPointType* > IntLightPointTypeMap;
115  typedef std::pair < unsigned int, DtLightPointType* > IntLightPointTypePair;
120 
124 
125  boost::atomic<bool> myDirtyFlag;
127 
128 
129  typedef std::map < const std::string, unsigned int> StringIntMap;
130  typedef std::pair < const std::string, unsigned int> StringIntPair;
132 
133  };
134 
135 }
std::map< const std::string, unsigned int > StringIntMap
Definition: DtLightPointTable.h:129
#define DT_DLL_VRVUTIL
Definition: vrvUtil.h:34
std::pair< unsigned int, DtLightPointType * > IntLightPointTypePair
Definition: DtLightPointTable.h:115
StringIntMap myHierarchyToCodeTable
Definition: DtLightPointTable.h:131
std::map< unsigned int, DtLightPointType * > IntLightPointTypeMap
Definition: DtLightPointTable.h:114
struct _xmlNode xmlNode
Definition: DtLightPointTable.h:19
std::pair< DtLightPointType, unsigned int > LightPointTypeIntPair
Definition: DtLightPointTable.h:112
Contains DLL export macros.
Lights Table class, handles loading the light type table default files and keeping track of all the c...
Definition: DtLightPointTable.h:34
std::pair< const std::string, unsigned int > StringIntPair
Definition: DtLightPointTable.h:130
xmlNode * xmlNodePtr
Definition: DtLightPointTable.h:20
int myMaxCode
Definition: DtLightPointTable.h:126
unsigned char xmlChar
Definition: DtLightPointTable.h:21
IntLightPointTypeMap myLightsTable
Table of CDB Lights loaded from Light.xml (and complete by either the Light_xxx.xml Tunning file or L...
Definition: DtLightPointTable.h:119
LightPointTypeIntMap myLightPointTypes
used when creating additional custom types that are not in the tables that are saved on disk ...
Definition: DtLightPointTable.h:123
Light point information class, Used to represent a Light Point Type in the light point table with all...
Definition: DtLightPointType.h:22
std::map< DtLightPointType, unsigned int > LightPointTypeIntMap
Definition: DtLightPointTable.h:111
boost::atomic< bool > myDirtyFlag
Definition: DtLightPointTable.h:125

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)