VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtStringKeyConverter.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2010 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
13 
14 #include <map>
15 #include <string>
16 
17 namespace makVrv
18 {
19  class DtDe;
20 
31  {
32  public:
33 
35  typedef std::map< std::string, int > StringKeyToIntKeyMap;
37  typedef std::map< int, std::string > IntKeyToStringKeyMap;
38 
41 
44 
45  private:
48 
50  DtStringKeyConverter& operator=(const DtStringKeyConverter&);
51 
52  public:
53 
56  int registerStringKey( const std::string& stringKey );
57 
60  void registerStringKey( const std::string& stringKey, int intKey );
61 
64  int lookupIntKey( const std::string& stringKey ) const;
65 
68  const std::string* findStringKey( int intKey ) const;
69 
72  const StringKeyToIntKeyMap& stringKeys() const;
73 
76  const IntKeyToStringKeyMap& intKeys() const;
77 
79  void removeKey( int intKey );
80 
82  void removeKey( const std::string& stringKey );
83 
84  protected:
85 
89  };
90 
91 }
92 
93 
std::map< int, std::string > IntKeyToStringKeyMap
Type of map of integer keys to sting keys.
Definition: DtStringKeyConverter.h:37
std::map< std::string, int > StringKeyToIntKeyMap
Type of map of string keys to integer keys.
Definition: DtStringKeyConverter.h:35
DtStringKeyConverter is used to convert string-based keys, used in files for things like model sets a...
Definition: DtStringKeyConverter.h:30
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
StringKeyToIntKeyMap myStringKeyToIntKeyMap
Definition: DtStringKeyConverter.h:86
IntKeyToStringKeyMap myIntKeyToStringKeyMap
Definition: DtStringKeyConverter.h:87
int myNextIntKey
Definition: DtStringKeyConverter.h:88
Contains DLL export macros.

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)