VR-Forces 4.7 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
readerWriter
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: 193772 $ $State: Exp $
7
*********************************************************************/
8
#ifndef symbolStore_H_
9
#define symbolStore_H_
10
11
#include "
readerWriter/readerWriterDefines.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_readerWriter
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 Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (
www.mak.com
)