QSDK 1.1 Documentation
Main Page | Modules | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

Q::Text Struct Reference
[QServer]

A simple wrapper class for null-terminated strings. More...

#include <Q/q.h>

List of all members.

Public Member Functions

 Text ()
 Text (const char *text)
 Text (const Text &t)
 ~Text ()
size_t size () const
Textadd (const char *s)
Texttruncate (size_t size)
 operator const char * () const
int operator== (const char *) const
int operator!= (const char *s) const
Textoperator= (const char *s)
Textoperator= (const Text &t)


Detailed Description

A simple wrapper class for null-terminated strings.


Constructor & Destructor Documentation

Q::Text::Text  )  [inline]
 

Construct a null string.

Q::Text::Text const char *  text  ) 
 

Construct a string whose value is set to text.

Q::Text::Text const Text t  ) 
 

Construct a string as a copy of an existing string.

Q::Text::~Text  ) 
 

Destroy the string.


Member Function Documentation

Text& Q::Text::add const char *  s  ) 
 

Append the string s to this string.

Q::Text::operator const char *  )  const [inline]
 

Cast the string to 'const char *'.

int Q::Text::operator!= const char *  s  )  const [inline]
 

Compare two strings for inequality.

Text& Q::Text::operator= const Text t  ) 
 

Assign a new value to the string.

Text& Q::Text::operator= const char *  s  ) 
 

Assign a new value to the string.

int Q::Text::operator== const char *   )  const
 

Compare two strings for equality.

size_t Q::Text::size  )  const
 

Return the number of characters in the string.

Text& Q::Text::truncate size_t  size  ) 
 

Truncate the string to contain at most size characters.

Return to QSDK documentation Contents page. Contact details for support, information and fault-reporting.
Qube Software Limited © 2000-2004