University of Sheffield   

    The Simons
    Component Library

Introduction   Class Hierarchy   Class Listing   Index of Classes   Index of Methods   Header Files  

StringID Class Reference

#include <StringID.h>

Inheritance diagram for StringID:

SequenceID CollectionID ObjectID List of all members.

Detailed Description

StringID: a typed reference to a String.

StringID is a strongly typed, reference counting pointer that refers to a String. StringID variables may be initialised to String* objects and all subtypes. StringID variables may alias objects held by other StringID variables, or any subtype. When a StringID acquires an object, it increments the object's reference count. When a StringID releases an object, it decrements the object's reference count. If the reference count reaches zero, the object is automatically deleted.

A StringID variable may be initialised with a String object, or with a literal Character array. In the latter case, a String object is automatically constructed, which copies the contents of the literal array.


Public Member Functions

 StringID ()
 Declare a StringID.

 ~StringID ()
 Release a StringID.

 StringID (const Null *)
 Initialise a StringID to refer explicitly to null.

 StringID (const String *)
 Initialise a StringID to refer to a String.

 StringID (const StringID &)
 Initialise a StringID to alias another StringID.

 StringID (const Character *)
 Initialise a StringID to refer to a literal Character array.

StringID & operator= (const String *)
 Reassign this StringID to refer to a String.

StringID & operator= (const StringID &)
 Reassign this StringID to alias another StringID.

Stringoperator-> () const
 Invoke a method on this StringID.


Constructor & Destructor Documentation

StringID::StringID  )  [inline]
 

Declare a StringID.

Returns:
a null StringID.

StringID::~StringID  )  [inline]
 

Release a StringID.

StringID::StringID const Null null  )  [inline]
 

Initialise a StringID to refer explicitly to null.

Parameters:
null - the null reference.
Returns:
a StringID referring to null.

StringID::StringID const String string  )  [inline]
 

Initialise a StringID to refer to a String.

Parameters:
string - the String.
Returns:
a StringID referring to the string.

StringID::StringID const StringID &  pointer  )  [inline]
 

Initialise a StringID to alias another StringID.

Parameters:
pointer - the other StringID.
Returns:
a StringID referring to the string.

StringID::StringID const Character literal  )  [inline]
 

Initialise a StringID to refer to a literal Character array.

Constructs a String to copy the literal Character array.

Parameters:
literal - the literal Character array.
Returns:
a StringID referring to a new String copy of the array.


Member Function Documentation

String * StringID::operator->  )  const
 

Invoke a method on this StringID.

Returns:
the result of the method.

Reimplemented from SequenceID.

StringID & StringID::operator= const StringID &  pointer  )  [inline]
 

Reassign this StringID to alias another StringID.

Parameters:
pointer - the other StringID.
Returns:
a StringID referring to the same String as the other StringID.

StringID & StringID::operator= const String string  )  [inline]
 

Reassign this StringID to refer to a String.

Parameters:
string - the String.
Returns:
a StringID referring to the string.


The documentation for this class was generated from the following files:
Generated on Fri May 5 17:17:20 2006 for The Simons Component Library by doxygen1.3