VR-Forces 4.1 Class Documentation
symbolStore.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2004 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: symbolStore.h,v $ $Revision: 1.2 $ $State: Exp $
7 *********************************************************************/
8 #ifndef symbolStore_H_
9 #define symbolStore_H_
10 
11 #include "tdbutil/tdbUtilDefines.h"
12 #include <vlutil/vlConfig.h>
13 #include <string>
14 #include <vector>
15 #include <map>
16 
17 //
18 // The DtSymbolStore class is used to store string representations.
19 // Ideally we would use some memory allocation techniques to eliminate
20 // memory fragmentation.
22 {
23 public:
24 
25  DtSymbolStore();
26  ~DtSymbolStore();
27 
28  unsigned int getSymbol(const char* str);
29 
30  const char* getString(unsigned int sym);
31 
32 private:
33 
34  std::map<std::string, unsigned int> myStrings;
35  std::vector<std::string> myIndex;
36 };
37 
38 #endif
39 
40 
41 

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)