VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
symbolString.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2004 MAK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 
6 #ifndef symbolString_H_
7 #define symbolString_H_
8 
10 #include <vlutil/vlString.h>
12 
28 {
29 public:
30  // default constructor
32 
33  // additional constructors
34 // DtSymbolString(const char* str);
35  DtSymbolString(const DtString& str);
36  DtSymbolString(unsigned int i);
37 
38  // destructor
39  ~DtSymbolString();
40 
41  // copy constructor
42  DtSymbolString(const DtSymbolString& orig);
43 
44  // assignment operators
45  DtSymbolString& operator=(const DtString& orig);
46  DtSymbolString& operator=(const char* orig);
47 
48  // cast operator
49  // \deprecated This function is deprecated as of VRF 3.9, and should *not* be used.
50  operator const char*() const;
51 
52  // @return The string, in char form, associated with the symbol.
53  const char* c_str() const;
54 
55  // @return The string, in char form, associated with the symbol.
56  // \deprecated This function is deprecated as of VRF 3.9, and should *not* be used.
57  const char* string() const;
58 
59  const unsigned int symbol() const { return mySymbol; };
60 
61  // clone operator
62  DtSymbolString* clone();
63 
64  // comparison operators
65  bool operator==(const DtString& str) const; // string compare
66  bool operator!=(const DtString& str) const;
67 
68  bool operator==(const char* str) const; // string compare
69  bool operator!=(const char* str) const;
70 
71  bool operator==(const DtSymbolString& str) const; // int compare
72  bool operator!=(const DtSymbolString& str) const;
73 
74  // @note This is necessary because, unlike .Net, VC 6.0 can't auto-generate
75  // the operator when an instance of these is placed into a std::map.
76  bool operator<(const DtSymbolString& str) const;
77 
78 protected:
79 
80  unsigned int mySymbol;
81 };
82 
83 
84 #endif
#define DT_DLL_readerWriter
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: readerWriterDefines.h:34
This class allows one to collect and compare strings using an index number instead of having to do st...
Definition: symbolString.h:27
DT_DLL_terrainCS bool operator==(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
const unsigned int symbol() const
Definition: symbolString.h:59
unsigned int mySymbol
Definition: symbolString.h:80
DT_DLL_terrainCS bool operator!=(const DtDegMinSec &lhs, const DtDegMinSec &rhs)

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)