VR-Forces Development_Version Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
tdbutil
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
#include <tbb/concurrent_hash_map.h>
17
#include <tbb/concurrent_vector.h>
18
#include <tbb/spin_mutex.h>
19
20
//
21
// The DtSymbolStore class is used to store string representations.
22
// Ideally we would use some memory allocation techniques to eliminate
23
// memory fragmentation.
24
class
DT_DLL_tdbutil
DtSymbolStore
25
{
26
public
:
27
28
DtSymbolStore
();
29
~
DtSymbolStore
();
30
31
unsigned
int
getSymbol(
const
char
* str);
32
33
const
char
* getString(
unsigned
int
sym);
34
35
private
:
36
37
typedef
tbb::concurrent_hash_map<std::string, unsigned int>
HashMap
;
38
HashMap
myStrings
;
39
typedef
tbb::concurrent_vector<std::string>
StringList
;
40
//std::vector<std::string> myIndex;
41
StringList
myIndex
;
42
tbb::spin_mutex
myAddSymbolMutex
;
43
};
44
45
#endif
46
47
48
Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (
www.mak.com
)