String Type

The string type is implemented by the classes StringMessage and StringParticle, which are derived from Message and Particle, respectively. It contains an InfString object. InfString is a version of StringList that allows limited modification and is used to interface C++ to Tcl.

Again, it uses the reference-counting mechanism of the Message and Envelope classes to ensure that strings are not deleted until no longer needed. StringMessage is currently very simple, it adds the following functions to Message.

Constructors

StringMessage()

Create a new string message with an empty string.

StringMessage(const char* name)

Create a new string message with a copy of the given string. The given string can be deleted, since the new message does not reference it.

StringMessage(const StringMessage& src)

Create a new string message containing the same string as the given string message. Again, the string is copied.

Operations

StringList print()

Return the string contained in this message in a StringList object.