pl-nk v0.4.5
Plonk|Plink|Plank are a set of cross-platform C/C++ frameworks for audio software development
Public Member Functions | Static Public Member Functions
Text Class Reference

A class for storing and manipulating text strings. More...

Inherits NumericalArray< Char >.

List of all members.

Public Member Functions

 Text () throw ()
 Creates an emply text string.
 Text (const char c) throw ()
 Creates a text string containing a single character.
template<class CopyType >
 Text (NumericalArray< CopyType > const &copy) throw ()
 Copy numerical values from another numerical array type to a new Text string.
template<class CopyType >
 Text (ObjectArray< CopyType > const &copy) throw ()
 Copy values from another array type to a new Text string.
 Text (const wchar_t *string) throw ()
 Create a Text string from a wide char string.
 Text (Text const &array0, Text const &array1) throw ()
 Concatentate two Text strings into one.

Static Public Member Functions

static Text fromWeak (Weak const &weak) throw ()
 Get a weakly linked copy of this object.
static Text withSize (const int size, const bool zeroData=false) throw ()
 Construct a NumericalArray that refers to some other data.
static Text newClear (const int size) throw ()
 Creates a NumericalArray with a given size (length) with all items set to zero.

Detailed Description

A class for storing and manipulating text strings.

Similar to std:string this is plonk's default text format. Internally Text is just a null terminated C string (array of chars) and is just a specialised versio of CharArray or NumericalArray<char>.


Constructor & Destructor Documentation

Text::Text ( ) throw ()

Creates an emply text string.

Text::Text ( const char  c) throw ()

Creates a text string containing a single character.

template<class CopyType >
Text::Text ( NumericalArray< CopyType > const &  copy) throw () [inline]

Copy numerical values from another numerical array type to a new Text string.

template<class CopyType >
Text::Text ( ObjectArray< CopyType > const &  copy) throw () [inline]

Copy values from another array type to a new Text string.

Text::Text ( const wchar_t *  string) throw ()

Create a Text string from a wide char string.

Text::Text ( Text const &  array0,
Text const &  array1 
) throw ()

Concatentate two Text strings into one.


Member Function Documentation

Text Text::fromWeak ( Weak const &  weak) throw () [static]

Get a weakly linked copy of this object.

This will return a blank/empty/null object of this type if the original has already been deleted.

Reimplemented from ObjectArray< Char >.

Text Text::newClear ( const int  size) throw () [static]

Creates a NumericalArray with a given size (length) with all items set to zero.

Reimplemented from NumericalArray< Char >.

Text Text::withSize ( const int  size,
const bool  zeroData = false 
) throw () [static]

Construct a NumericalArray that refers to some other data.

It is very important to note that the data is not copies so must continue to exist for the lifetime of this object.

Parameters:
sizeThe size of the source data to use.
dataToUseA pointer to the data.
needsNullTerminationWhether the data is null terminated ot not.
See also:
withArrayNoCopy Creates a NumericalArray with a given size (length).

Reimplemented from NumericalArray< Char >.


The documentation for this class was generated from the following files:
 All Classes Functions Typedefs Enumerations Enumerator Properties