OCDM_ByteSequence Class Reference

Class for representing textual (UTF-8) information. This is main class for representing text in Ellogon. More...

#include <OCDM.h>

Inheritance diagram for OCDM_ByteSequence:

OCDM_Object OCDM_ByteSequenceSet List of all members.

Public Member Functions

 OCDM_ByteSequence ()
 OCDM_ByteSequence (const CDM_Object obj)
 OCDM_ByteSequence (const class OCDM_ByteSequence &obj)
 OCDM_ByteSequence (const char *str)
 This is the main constructor of the OCDM_ByteSequence class.
 OCDM_ByteSequence (const char *str, const int len)
 This is the main constructor of the OCDM_ByteSequence class.
OCDM_ByteSequenceoperator= (const class OCDM_Object &obj)
 This is the default assignment operator.
void Set (const char *str)
 Set the object to hold a particular string.
void Set (const char *str, const int len)
 Set the object to hold a particular string.
long length (void) const
 This function returns the number of characters contained in the object.
OCDM_BOOL toUpper (void) const
 Changes every character in the object to upper-case.
OCDM_BOOL toLower (void) const
 Changes every character in the object to upper-case.
OCDM_BOOL toTitle (void) const
 Changes every character in the object to upper-case.
const char * objectType (void) const

Detailed Description

Description:
Class for representing textual (UTF-8) information. This is main class for representing text in Ellogon.
Note:
This class is identical to OCDM_RawData.


Constructor & Destructor Documentation

OCDM_ByteSequence (  )  [inline]

OCDM_ByteSequence ( const CDM_Object  obj  )  [inline]

OCDM_ByteSequence ( const class OCDM_ByteSequence obj  )  [inline]

OCDM_ByteSequence ( const char *  str  ) 

Description:
This is the main constructor of the OCDM_ByteSequence class. It creates a OCDM_ByteSequence object from a string stored in a char *. The string is expected to be in UTF-8 format and must be NULL terminated.
Arguments:
  • str: a pointer to a NULL terminated string that will be copied as the object's value.
See also:
OCDM_RawData::OCDM_RawData, Tcl_NewStringObj

OCDM_ByteSequence ( const char *  str,
const int  len 
)

Description:
This is the main constructor of the OCDM_ByteSequence class. It creates a OCDM_ByteSequence object from a string stored in a char *. The string is expected to be in UTF-8 format. len specifies the number of bytes to copy from str. If negative, all bytes up to the first NULL are used.
Arguments:
  • str: a pointer to a string that will be copied as the object's value.
  • len: an integer specifying the number of bytes to be copied from str.
See also:
OCDM_RawData::OCDM_RawData, Tcl_NewStringObj


Member Function Documentation

class OCDM_ByteSequence& operator= ( const class OCDM_Object obj  )  [inline, virtual]

Description: This is the default sssignment operator. Note that under
languages that do not support operator overloading (i.e. Java, Perl, Python) this operator appears as a plain method named as "set".
Arguments:
  • obj: the object to be copied.
Returns:
This method returns a reference to the current object.

Reimplemented from OCDM_Object.

Reimplemented in OCDM_ByteSequenceSet.

void Set ( const char *  str  ) 

Description:
This function can be used to change the textual data that is held by an object. The older value (if any) will be deleted and the object will be set to hold a copy of the provided string. The string is expected to be in UTF-8 format and must be NULL terminated.
Arguments:
  • str: a pointer to a NULL terminated string that will be copied as the object's value.
See also:
OCDM_RawData::OCDM_RawData, Tcl_NewStringObj

void Set ( const char *  str,
const int  len 
)

Description:
This function can be used to change the textual data that is held by an object. The older value (if any) will be deleted and the object will be set to hold a copy of the provided string. The string is expected to be in UTF-8 format. len specifies the number of bytes to copy from str. If negative, all bytes up to the first NULL are used.
Arguments:
  • str: a pointer to a NULL terminated string that will be copied as the object's value.
  • len: an integer specifying the number of bytes to be copied from str.
See also:
OCDM_RawData::OCDM_RawData, Tcl_NewStringObj

long length ( void   )  const

OCDM_BOOL toUpper ( void   )  const

Returns:
Returns true if the convertion was succesfull, false otherwise.

OCDM_BOOL toLower ( void   )  const

Returns:
Returns true if the convertion was succesfull, false otherwise.

OCDM_BOOL toTitle ( void   )  const

Returns:
Returns true if the convertion was succesfull, false otherwise.

const char* objectType ( void   )  const [inline, virtual]

This method returns the type of the object as a string.

Reimplemented from OCDM_Object.

Reimplemented in OCDM_ByteSequenceSet.


Generated on Tue Jun 26 17:40:45 2007 for PerlCDM by  doxygen 1.5.2