Class SymbolPtr


			
class SymbolPtr : public ObjectPtr
Programmer: Ryan Davis

Description:

I provide an extension of ObjectPtr's services to include named accessors and utilities for Symbols.

Public Methods:

static ObjectPtr create (const String & aValue);
I am create. I act as a "factory method" for creating new symbol objects.

static SymbolPtr convert (const ObjectPtr & obj);
I convert obj to a valid SymbolPtr or gNil if obj wasn't an symbol.

SymbolPtr (const ObjectPtr & pointee);
This is the constructor. It has a default value of gNil, so it can be used as the generic constructor as well. This constructor creates a Object pointer that points to the address passed in through .

Boolean operator== (const ObjectPtr & aString);
I return true if we point to the same object. I am necessary because the op== below hides my equivalent in the superclass.

Boolean operator== (const String & aString);
I return true if the string data held by my object is equal to aString.

Boolean operator== (const SymbolPtr & aSymbol);
I return true if the string data held by my object is equal to aString.

String value ();
I am the String get accessor.

void value (const String & aValue);
I am the String set accessor. In reality, because of Smalltalk's definition, I actually create a new String object to point to... i.e. I call create & set myself to point to the result of create.. I am the method used to verify the validity of the methods in SymbolPtr. TESTING

Protected Methods:

friend void genesis ();


static ClassPtr & klassPtr ();


static UInteger indexOf (const String & symbol);
returns i (good) or i>max (bad)

static void add (const SymbolPtr & symbol);
UNIQUE_SYMBOLS

Protected Members: