VR-Forces 4.8 Class Documentation
 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) 2017 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 
17 //defining these here avoids needing to include tree.h which would propagate dependencies to other projects
18 typedef struct _xmlNode xmlNode;
20 struct _xmlNode;
21 
22 typedef unsigned char xmlChar;
23 
24 namespace makVrv
25 {
26 
27  class DtDe;
28 
34  {
35  public:
36 
39 
41  virtual ~DtLightPointTable();
42 
46  virtual bool addLight(DtLightPointType *lightPointType, const std::string& codeStr);
47 
49  virtual DtLightPointType* getLight(unsigned int code);
50 
52  virtual DtLightPointType* getLight(const std::string& type);
53 
58  virtual void loadLightTableFromXML(const std::string& fileName);
59 
66  virtual void saveDefaultLightValuesToCSV(const std::string& filename);
67 
73  virtual void loadDefaultLightValuesFromCSV(const std::string& filename);
74 
77  virtual void loadDefaultLightValuesFromXML(const std::string& fileName);
78 
83  virtual void loadTunningLightValuesFromXML(const std::string& fileName);
84 
86  virtual bool isDirty();
87 
89  virtual void clean();
90 
92  virtual int maxCode();
93 
95  virtual void updateLightPointTypeMap();
96 
98  int getOrCreateLightTypeCode(const DtLightPointType &lp);
99 
100  protected:
101 
103  virtual void loadLightTypeFromXML(xmlNodePtr lightTypeNode, const std::string* parentType);
104 
106  bool compareXmlString(const xmlChar *xmlStr, const char* compareStr);
107 
108  protected:
109 
110  typedef std::map < DtLightPointType, unsigned int > LightPointTypeIntMap;
111  typedef std::pair < DtLightPointType, unsigned int > LightPointTypeIntPair;
112 
113  typedef std::map < unsigned int, DtLightPointType* > IntLightPointTypeMap;
114  typedef std::pair < unsigned int, DtLightPointType* > IntLightPointTypePair;
119 
123 
126 
127 
128  typedef std::map < const std::string, unsigned int> StringIntMap;
129  typedef std::pair < const std::string, unsigned int> StringIntPair;
131 
132  };
133 
134 }
std::map< const std::string, unsigned int > StringIntMap
Definition: DtLightPointTable.h:128
#define DT_DLL_VRVUTIL
Definition: vrvUtil.h:34
std::pair< unsigned int, DtLightPointType * > IntLightPointTypePair
Definition: DtLightPointTable.h:114
StringIntMap myHierarchyToCodeTable
Definition: DtLightPointTable.h:130
std::map< unsigned int, DtLightPointType * > IntLightPointTypeMap
Definition: DtLightPointTable.h:113
bool myDirtyFlag
Definition: DtLightPointTable.h:124
struct _xmlNode xmlNode
Definition: DtLightPointTable.h:18
std::pair< DtLightPointType, unsigned int > LightPointTypeIntPair
Definition: DtLightPointTable.h:111
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:33
std::pair< const std::string, unsigned int > StringIntPair
Definition: DtLightPointTable.h:129
xmlNode * xmlNodePtr
Definition: DtLightPointTable.h:19
int myMaxCode
Definition: DtLightPointTable.h:125
unsigned char xmlChar
Definition: DtLightPointTable.h:20
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:118
LightPointTypeIntMap myLightPointTypes
used when creating additional custom types that are not in the tables that are saved on disk ...
Definition: DtLightPointTable.h:122
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:110

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)