VR-Forces 4.6 Class Documentation
 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 

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)