OLConstantString Class Reference
[Text]

The class used to store constant "strings" that can be directly instantiated in code using the convention @"this is a constant". More...

#import <ObjectiveLib/Text.h>

List of all members.

Public Member Functions

(id) - class
 Return the class object.
(int) - compare:
 Compare this object to another.
(id) - copy
 Copy this object.
(const char *) - cString
 Return the array of characters controlled by this object.
(id) - free
 Free the memory associated with this object.
(unsigned) - hash
 Return a hash code.
(BOOL) - isEqual:
 Return whether this text object is equal to another one.
(unsigned) - length
 Return the length of the controlled sequence of characters.

Static Public Member Functions

(id) + class
 Return the class object.
(void) + load
 Performed when the class is loaded into the runtime system.

Protected Attributes

char * c_string
 The character data.
unsigned len
 The length of the data.


Detailed Description

The class used to store constant "strings" that can be directly instantiated in code using the convention @"this is a constant".

Instances of this class that contain non-ASCII characters are not supported.

See also:
OLText, OLTextBuffer


Member Function Documentation

- (id) class  

Return the class object.

Returns:
a reference to the class object

+ (id) class  

Return the class object.

Returns:
a reference to the class object

- (int) compare: (id)  other  

Compare this object to another.

OLConstantString objects can be compared to other OLConstantString objects and to OLText objects. The two objects, if compatible, will be compared lexicographically.

Parameters:
other the object to which to compare this one
Returns:
a value greater than, equal to, or less than zero accoringly as this object is greater than, equal to, or less than other

- (id) copy  

Copy this object.

Returns:
a copy of this object

- (const char*) cString  

Return the array of characters controlled by this object.

Returns:
the controlled array

- (id) free  

Free the memory associated with this object.

- (unsigned) hash  

Return a hash code.

The hash code for this text object is computed using OLHash.

Returns:
the hash code

- (BOOL) isEqual: (id)  other  

Return whether this text object is equal to another one.

This message returns YES if compare: returns zero.

Parameters:
other the object to test
Returns:
YES if object is equal to this text object

- (unsigned) length  

Return the length of the controlled sequence of characters.

Returns:
the length

+ (void) load  

Performed when the class is loaded into the runtime system.

Please do not call this method. It is for the use of the runtime system.


Member Data Documentation

- (char*) c_string [protected]

The character data.

- (unsigned) len [protected]

The length of the data.


The documentation for this class was generated from the following file:
ObjectiveLibGenerated Sun Apr 22 15:18:23 2007, © 2004-2007 Will Mason
SourceForge.net Logo