VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtEntityAppearanceMapper.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #ifndef DtEntityAppearanceMapper_H_
11 #define DtEntityAppearanceMapper_H_
12 
13 #include <vrvVrl/vrvVrl.h>
14 
15 #include <vlpi/disEnums.h>
16 #include <vlpi/entityType.h>
17 
18 #include <map>
19 
20 namespace makVrv
21 {
26  {
27  public:
28  typedef std::map<int,int> AttributeToStateMap;
29 
30  struct StateInfo
31  {
32  int bitShift;
33  int state;
34  };
35 
36  typedef std::map<int,StateInfo> AttributeToStateInfoMap;
37 
39  DtEntityAppearanceMapper(const DtEntityType& type, const AttributeToStateMap& appearanceMap);
40 
42  virtual ~DtEntityAppearanceMapper();
43 
45  bool mapAttributeToState(const DtAppearAttribute attr, const DtAppearAttrVal val,
46  int& state,int& stateVal) const;
47 
48 
49  //Get a map to attributes to state info.
50  inline const AttributeToStateInfoMap& attributes() const
51  {
52  return myAttributesToStateMap;
53  }
54 
55  const DtEntityType& entityType() const
56  {
57  return myEntityType;
58  }
59 
60  protected:
61 
62  DtEntityType myEntityType;
64  };
65 }
66 
67 #endif
68 
#define DT_DLL_VRVVRL
Definition: vrvVrl.h:19
int state
Definition: DtEntityAppearanceMapper.h:33
Decoder for converting a particular entity type&#39;s appearance bits into generic enumerated values...
Definition: DtEntityAppearanceMapper.h:25
const DtEntityType & entityType() const
Definition: DtEntityAppearanceMapper.h:55
const AttributeToStateInfoMap & attributes() const
Definition: DtEntityAppearanceMapper.h:50
std::map< int, StateInfo > AttributeToStateInfoMap
Definition: DtEntityAppearanceMapper.h:36
Definition: DtEntityAppearanceMapper.h:30
DtEntityType myEntityType
Definition: DtEntityAppearanceMapper.h:62
std::map< int, int > AttributeToStateMap
Definition: DtEntityAppearanceMapper.h:28
int bitShift
Definition: DtEntityAppearanceMapper.h:32
Contains DLL export macros.
AttributeToStateInfoMap myAttributesToStateMap
Definition: DtEntityAppearanceMapper.h:63

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)