VR-Forces 4.0.4 Class Documentation
include/tdbutil/symbolStore.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2004 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: symbolStore.h,v $ $Revision: 1.2 $ $State: Exp $
00007 *********************************************************************/
00008 #ifndef symbolStore_H_
00009 #define symbolStore_H_
00010 
00011 #include "tdbutil/tdbUtilDefines.h"
00012 #include <vlutil/vlConfig.h> 
00013 #include <string>
00014 #include <vector>
00015 #include <map>
00016 
00017 //
00018 // The DtSymbolStore class is used to store string representations.
00019 // Ideally we would use some memory allocation techniques to eliminate
00020 // memory fragmentation.
00021 class DT_DLL_tdbutil DtSymbolStore
00022 {
00023 public: 
00024 
00025    DtSymbolStore();
00026    ~DtSymbolStore();
00027    
00028    unsigned int getSymbol(const char* str);
00029    
00030    const char* getString(unsigned int sym);
00031 
00032 private:
00033    
00034    std::map<std::string, unsigned int> myStrings;
00035    std::vector<std::string> myIndex;
00036 };
00037 
00038 #endif
00039 
00040 
00041 

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)