Jamoma API  0.6.0.a19
TTSymbolBase.cpp
1 /*
2  * Jamoma Class for representing Symbols
3  * Copyright © 2008, Timothy Place
4  *
5  * License: This code is licensed under the terms of the "New BSD License"
6  * http://creativecommons.org/licenses/BSD/
7  */
8 
9 #include "TTSymbolBase.h"
10 #include "TTSymbolTable.h"
11 
12 
13 /****************************************************************************************************/
14 
15 
16 TTSymbolBase::TTSymbolBase(const TTString& newString, TTPtrSizedInt newSymbolTableId, TTInt32 newSymbolId)
17 {
18  init(newString, newSymbolTableId, newSymbolId);
19 }
20 
21 
22 TTSymbolBase::~TTSymbolBase()
23 {
24  ;
25 }
26 
27 
28 // Copy Constructor
30 {
31  mSymbolId = oldSymbol.mSymbolId;
32  mSymbolTableId = oldSymbol.mSymbolTableId;
33  mString = oldSymbol.mString;
34 }
35 
36 
37 void TTSymbolBase::init(const TTString& newString, TTPtrSizedInt newSymbolTableId, TTInt32 newSymbolId)
38 {
39  mSymbolId = newSymbolId;
40  mSymbolTableId = newSymbolTableId;
41  mString = newString;
42 }
43 
The TTSymbolBase class is used to represent a string and efficiently pass and compare that string...
Definition: TTSymbolBase.h:28
TTSymbolBase(const TTString &newString, TTPtrSizedInt newSymbolTableId, TTInt32 newSymbolId)
The constructor is intended only for use by the TTSymbolBaseTable object when creating new symbols in...
void init(const TTString &newString, TTPtrSizedInt newSymbolTableId, TTInt32 newSymbolId)
used by the constructors to create the new symbol
std::int32_t TTInt32
32 bit signed integer
Definition: TTBase.h:177
long TTPtrSizedInt
An integer that is the same size as a pointer.
Definition: TTBase.h:240
The TTString class is used to represent a string.
Definition: TTString.h:34