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
symbolString.h
Go to the documentation of this file.
1
/*********************************************************************
2
** Copyright (c) 2004 MAK Technologies, Inc.
3
** All rights reserved.
4
*********************************************************************/
5
/*********************************************************************
6
** $RCSfile: symStr.h,v $ $Revision: 1.2 $ $State: Exp $
7
*********************************************************************/
8
#ifndef symbolString_H_
9
#define symbolString_H_
10
11
#include "
tdbutil/tdbUtilDefines.h
"
12
#include <vlutil/vlString.h>
13
#include "
tdbutil/cStringHashKey.h
"
14
15
//
16
// This class allows one to collect and compare strings using an index
17
// number instead of having to do string compares. It is not virtual
18
// and is effectively 4 bytes meaning you can pass these by value as easily
19
// as passing a pointer
20
class
DT_DLL_tdbutil
DtSymbolString
21
{
22
public
:
23
// default constructor
24
DtSymbolString
();
25
26
// additional constructors
27
// DtSymbolString(const char* str);
28
DtSymbolString
(
const
DtString
& str);
29
DtSymbolString
(
unsigned
int
i);
30
31
// destructor
32
~
DtSymbolString
();
33
34
// copy constructor
35
DtSymbolString
(
const
DtSymbolString
& orig);
36
37
// assignment operators
38
DtSymbolString
& operator=(
const
DtString
& orig);
39
DtSymbolString
& operator=(
const
char
* orig);
40
41
// cast operator
42
// \deprecated This function is deprecated as of VRF 3.9, and should *not* be used.
43
operator
const
char
*()
const
;
44
45
// @return The string, in char form, associated with the symbol.
46
const
char
* c_str()
const
;
47
48
// @return The string, in char form, associated with the symbol.
49
// \deprecated This function is deprecated as of VRF 3.9, and should *not* be used.
50
const
char
* string()
const
;
51
52
const
unsigned
int
symbol
()
const
{
return
mySymbol; };
53
54
// clone operator
55
DtSymbolString
* clone();
56
57
// comparison operators
58
bool
operator==
(
const
DtString
& str)
const
;
// string compare
59
bool
operator!=
(
const
DtString
& str)
const
;
60
61
bool
operator==
(
const
char
* str)
const
;
// string compare
62
bool
operator!=
(
const
char
* str)
const
;
63
64
bool
operator==
(
const
DtSymbolString
& str)
const
;
// int compare
65
bool
operator!=
(
const
DtSymbolString
& str)
const
;
66
67
// @note This is necessary because, unlike .Net, VC 6.0 can't auto-generate
68
// the operator when an instance of these is placed into a std::map.
69
bool
operator<(
const
DtSymbolString
& str)
const
;
70
71
protected
:
72
73
unsigned
int
mySymbol
;
74
};
75
76
77
#endif
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
)