Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

Various utility functions. More...


Functions

string_listtokenise_string (string str)
 Tokenise string at whitespace.
char ** string_list_to_array (string_list &l)
 Convert a string_list to a null-terminated array of character pointers.
void delete_string_array (char **sl)
 Deletes the array of strings returned by string_list_to_array.
bool parseRGB (Bitmap::BitmapColour &, const char *)
 Parse an RGB specification.
void verbosity (const verbosities level)
 Sets the verbosity of the methods in this class.

Variables

verbosities verbosity_ = normal


Detailed Description

Various utility functions.

Function Documentation

void Util::delete_string_array char **  sl  ) 
 

Deletes the array of strings returned by string_list_to_array.

Parameters:
sl a null-terminated array of strings

bool Util::parseRGB Bitmap::BitmapColour rgb,
const char *  s
 

Parse an RGB specification.

This is either a sequence of three integers separated by slashes (or in fact any non-number character), or else a string of the form #RRGGBB. Set the `rgb' structure to the resulting numbers. The integers must be in the range [0,255], and may be specified in decimal, octal, or hex.

Parameters:
rgb the BitmapColour corresponding to the s argument
s the RGB specification
Returns:
true if the parse is successful.

char ** Util::string_list_to_array string_list l  ) 
 

Convert a string_list to a null-terminated array of character pointers.

The resulting array can conveniently be deleted using delete_string_array.

Parameters:
l a string_list
Returns:
a pointer to a null-terminated array of null-terminated character arrays

string_list & Util::tokenise_string string  str  ) 
 

Tokenise string at whitespace.

Parameters:
str the string to be tokenised
Returns:
a list containing the whitespace-separated tokens in the string

void Util::verbosity const verbosities  level  ) 
 

Sets the verbosity of the methods in this class.

Parameters:
level how verbose the class's methods should be


Variable Documentation

verbosities Util::verbosity_ = normal
 


Generated on Sun Aug 21 18:21:10 2005 for dvi2bitmap by doxygen 1.3.8