ionflux.org | Impressum

General tools

Collaboration diagram for General tools:

General tools and utility classes and functions. More...

Classes

class  Ionflux::Tools::ByteDump
 Byte dump. More...
class  Ionflux::Tools::Canvas
 Drawing canvas. More...
class  Ionflux::Tools::ClassInfo
 Class information. More...
struct  Ionflux::Tools::Color
 Color. More...
struct  Ionflux::Tools::Color8bpp
 Color (8 bits per pixel, RGBA). More...
class  Ionflux::Tools::EMailAddress
 EMail address. More...
class  Ionflux::Tools::File
 File. More...
class  Ionflux::Tools::GtkCairoArea
 GTK+/Cairo drawing area. More...
class  Ionflux::Tools::ManagedObject
 Base class for managed objects. More...
class  Ionflux::Tools::Object
 Object. More...

Typedefs

typedef std::map< const std::string,
const Color * > 
Ionflux::Tools::ColorMap
 Maps for color lookup by name.

Functions

Color8bpp Ionflux::Tools::to8bpp (const Color &color)
 Get 8 bpp representation.
std::string Ionflux::Tools::toHex (const Color &color)
 Get hexadecimal representation.
Color Ionflux::Tools::createColorFromHex (const std::string &hexColor)
 Create color from hexadecimal representation.
void Ionflux::Tools::addBasicColors (ColorMap &colorMap)
 Add basic colors.
const Color * Ionflux::Tools::getByName (const std::string &colorName, ColorMap &colorMap)
 Get color by name.
std::string Ionflux::Tools::makeHex (const std::string &inputData)
 Make readable hexadecimal code.
std::string Ionflux::Tools::makeReadable (const std::string &inputData, const std::string &replacement)
 Replace unreadable characters.
std::string Ionflux::Tools::makeNiceHex (const std::string &hex, const std::string &readable, int bytesPerLine, int groupBytes)
 Make nice hexadecimal output.
std::string Ionflux::Tools::sha1 (const std::string &secret, bool hexOut=false)
 Calculate SHA-1 hash.
void Ionflux::Tools::explode (const std::string &bytes, const std::string &splitString, std::vector< std::string > &result)
 Explode a string.
void Ionflux::Tools::explodeQuoted (const std::string &bytes, std::vector< std::string > &result)
 Explode a string.
bool Ionflux::Tools::isOneOf (char c, const std::string &testChars)
 Check type of a character.
bool Ionflux::Tools::isNumber (const std::string &bytes)
 Check whether a string represents a number.
bool Ionflux::Tools::isAlpha (const std::string &bytes)
 Check whether a string represents an alpha.
bool Ionflux::Tools::isInteger (const std::string &bytes)
 Check whether a string represents an integer.
bool Ionflux::Tools::isFloat (const std::string &bytes)
 Check whether a string represents a float.
bool Ionflux::Tools::isIdentifier (const std::string &bytes)
 Check whether a string represents an identifier.
std::string Ionflux::Tools::readFile (const std::string &fileName)
 Read a file.
bool Ionflux::Tools::writeFile (const std::string &fileName, const std::string &data, char writeMode)
 Write to file.
bool Ionflux::Tools::bz2Compress (const std::string &inputData, std::string &outputBuffer)
 Compress data.
bool Ionflux::Tools::bz2Decompress (const std::string &inputData, std::string &outputBuffer)
 Decompress data.
std::string Ionflux::Tools::packInt (int data)
 Pack integer.
std::string Ionflux::Tools::packDouble (double data)
 Pack double.
std::string Ionflux::Tools::packBool (bool data)
 Pack boolean.
int Ionflux::Tools::unpackInt (const std::string &data)
 Unpack integer.
double Ionflux::Tools::unpackDouble (const std::string &data)
 Unpack double.
bool Ionflux::Tools::unpackBool (const std::string &data)
 Unpack boolean.
void Ionflux::Tools::socketInit ()
 Initialize socket API.
void Ionflux::Tools::socketShutdown ()
 Shutdown socket API.
void Ionflux::Tools::daemonize ()
 Daemonize.
std::string Ionflux::Tools::parseHex (const std::string &inputData)
 Parse hex string.
void Ionflux::Tools::getPassword (const std::string &prompt, std::string &password)
 Get a password.
void Ionflux::Tools::getRandomBytes (std::string &bytes, unsigned int n, MTRand *source)
 Get random bytes.
void Ionflux::Tools::getRandomIdentifier (std::string &bytes, unsigned int n, MTRand *source)
 Get random identifier.
bool Ionflux::Tools::readDir (const std::string &dirName, std::vector< std::string > &target, bool prependDirName=false, bool recursive=false)
 Read directory entries.
std::string Ionflux::Tools::getCurrentDir ()
 Get current working directory.
bool Ionflux::Tools::getFileList (const std::vector< std::string > &pathList, std::vector< std::string > &target, bool recursive=false, const std::string &filterExpr="")
 Get file list.
int Ionflux::Tools::getOpPrecedence (const std::string &op, bool unary=false)
 Get operator precedence.
std::string Ionflux::Tools::escape (const std::string &source, const std::string &escapeWhat=" '\"")
 Escape string.
std::string Ionflux::Tools::toUpper (const std::string &text, unsigned int numChars=0, unsigned int offset=0)
 Convert string to upper case.
std::string Ionflux::Tools::toLower (const std::string &text, unsigned int numChars=0, unsigned int offset=0)
 Convert string to lower case.
bool Ionflux::Tools::toBool (const std::string &text)
 Convert string to bool.
unsigned int Ionflux::Tools::utf8GetSize (unsigned char byte)
 Get UTF-8 character size.
unsigned int Ionflux::Tools::utf8GetSize (const std::string &bytes)
 Get UTF-8 character string size.
bool Ionflux::Tools::utf8ToUInt (const std::string &bytes, unsigned int &target)
 Convert UTF-8 character to unsigned int.
bool Ionflux::Tools::utf8ToUInt (const std::string &bytes, std::vector< unsigned int > &target)
 Convert UTF-8 character string to unsigned int vector.
std::string Ionflux::Tools::uintToUtf8 (unsigned int uniChar)
 Convert unsigned int to UTF-8 character.
void Ionflux::Tools::uintToUtf8 (const std::vector< unsigned int > &uniChars, std::string &target)
 Convert unsigned int vector to UTF-8 character string.
std::string Ionflux::Tools::utf8Trim (const std::string &bytes, bool leftTrim=true, bool rightTrim=true)
 Trim UTF-8 string.
bool Ionflux::Tools::utf8IsOneOf (unsigned int c, const std::string &testChars)
 Check type of Unicode character.
bool Ionflux::Tools::utf8IsOneOf (unsigned int c, const std::vector< unsigned int > &testChars)
 Check type of Unicode character.
std::string Ionflux::Tools::utf8Escape (const std::string &source)
 Escape UTF-8 string.
std::string Ionflux::Tools::utf8Unescape (const std::string &source)
 Unescape ASCII string.
std::string Ionflux::Tools::quote (const std::string &source, const unsigned char quoteChar= '\'')
 Quote string.
std::string Ionflux::Tools::unquote (const std::string &source, const std::string &addQuoteChars="")
 Unquote string.
std::string Ionflux::Tools::trim (const std::string &bytes, bool leftTrim=true, bool rightTrim=true)
 Trim byte string.
const CharTypeMap & Ionflux::Tools::getCharTypes ()
 Get character type lookup map.
std::string Ionflux::Tools::urlEncode (const std::string &bytes)
 URL-encode bytes.
std::string Ionflux::Tools::urlDecode (const std::string &bytes)
 URL-decode bytes.
std::string Ionflux::Tools::appendDirSeparator (const std::string &path, unsigned char separator=DIR_SEPARATOR)
 Append directory separator.
std::string Ionflux::Tools::prependDirSeparator (const std::string &path, unsigned char separator=DIR_SEPARATOR)
 Prepend directory separator.
bool Ionflux::Tools::validatePath (const std::string &path, int mask=0755)
 Validate path.
std::string Ionflux::Tools::xmlEscape (const std::string &bytes)
 Escape XML markup.
MTRand & Ionflux::Tools::getRandomizer ()
 Get randomizer.

Variables

const Color Ionflux::Tools::COLOR_ALICEBLUE
 Basic colors as defined by the SVG 1.1 specification.
const Color Ionflux::Tools::COLOR_ANTIQUEWHITE
const Color Ionflux::Tools::COLOR_AQUA
const Color Ionflux::Tools::COLOR_AQUAMARINE
const Color Ionflux::Tools::COLOR_AZURE
const Color Ionflux::Tools::COLOR_BEIGE
const Color Ionflux::Tools::COLOR_BISQUE
const Color Ionflux::Tools::COLOR_BLACK
const Color Ionflux::Tools::COLOR_BLANCHEDALMOND
const Color Ionflux::Tools::COLOR_BLUE
const Color Ionflux::Tools::COLOR_BLUEVIOLET
const Color Ionflux::Tools::COLOR_BROWN
const Color Ionflux::Tools::COLOR_BURLYWOOD
const Color Ionflux::Tools::COLOR_CADETBLUE
const Color Ionflux::Tools::COLOR_CHARTREUSE
const Color Ionflux::Tools::COLOR_CHOCOLATE
const Color Ionflux::Tools::COLOR_CORAL
const Color Ionflux::Tools::COLOR_CORNFLOWERBLUE
const Color Ionflux::Tools::COLOR_CORNSILK
const Color Ionflux::Tools::COLOR_CRIMSON
const Color Ionflux::Tools::COLOR_CYAN
const Color Ionflux::Tools::COLOR_DARKBLUE
const Color Ionflux::Tools::COLOR_DARKCYAN
const Color Ionflux::Tools::COLOR_DARKGOLDENROD
const Color Ionflux::Tools::COLOR_DARKGRAY
const Color Ionflux::Tools::COLOR_DARKGREEN
const Color Ionflux::Tools::COLOR_DARKGREY
const Color Ionflux::Tools::COLOR_DARKKHAKI
const Color Ionflux::Tools::COLOR_DARKMAGENTA
const Color Ionflux::Tools::COLOR_DARKOLIVEGREEN
const Color Ionflux::Tools::COLOR_DARKORANGE
const Color Ionflux::Tools::COLOR_DARKORCHID
const Color Ionflux::Tools::COLOR_DARKRED
const Color Ionflux::Tools::COLOR_DARKSALMON
const Color Ionflux::Tools::COLOR_DARKSEAGREEN
const Color Ionflux::Tools::COLOR_DARKSLATEBLUE
const Color Ionflux::Tools::COLOR_DARKSLATEGRAY
const Color Ionflux::Tools::COLOR_DARKSLATEGREY
const Color Ionflux::Tools::COLOR_DARKTURQUOISE
const Color Ionflux::Tools::COLOR_DARKVIOLET
const Color Ionflux::Tools::COLOR_DEEPPINK
const Color Ionflux::Tools::COLOR_DEEPSKYBLUE
const Color Ionflux::Tools::COLOR_DIMGRAY
const Color Ionflux::Tools::COLOR_DIMGREY
const Color Ionflux::Tools::COLOR_DODGERBLUE
const Color Ionflux::Tools::COLOR_FIREBRICK
const Color Ionflux::Tools::COLOR_FLORALWHITE
const Color Ionflux::Tools::COLOR_FORESTGREEN
const Color Ionflux::Tools::COLOR_FUCHSIA
const Color Ionflux::Tools::COLOR_GAINSBORO
const Color Ionflux::Tools::COLOR_GHOSTWHITE
const Color Ionflux::Tools::COLOR_GOLD
const Color Ionflux::Tools::COLOR_GOLDENROD
const Color Ionflux::Tools::COLOR_GRAY
const Color Ionflux::Tools::COLOR_GREY
const Color Ionflux::Tools::COLOR_GREEN
const Color Ionflux::Tools::COLOR_GREENYELLOW
const Color Ionflux::Tools::COLOR_HONEYDEW
const Color Ionflux::Tools::COLOR_HOTPINK
const Color Ionflux::Tools::COLOR_INDIANRED
const Color Ionflux::Tools::COLOR_INDIGO
const Color Ionflux::Tools::COLOR_IVORY
const Color Ionflux::Tools::COLOR_KHAKI
const Color Ionflux::Tools::COLOR_LAVENDER
const Color Ionflux::Tools::COLOR_LAVENDERBLUSH
const Color Ionflux::Tools::COLOR_LAWNGREEN
const Color Ionflux::Tools::COLOR_LEMONCHIFFON
const Color Ionflux::Tools::COLOR_LIGHTBLUE
const Color Ionflux::Tools::COLOR_LIGHTCORAL
const Color Ionflux::Tools::COLOR_LIGHTCYAN
const Color Ionflux::Tools::COLOR_LIGHTGOLDENRODYELLOW
const Color Ionflux::Tools::COLOR_LIGHTGRAY
const Color Ionflux::Tools::COLOR_LIGHTGREEN
const Color Ionflux::Tools::COLOR_LIGHTGREY
const Color Ionflux::Tools::COLOR_LIGHTPINK
const Color Ionflux::Tools::COLOR_LIGHTSALMON
const Color Ionflux::Tools::COLOR_LIGHTSEAGREEN
const Color Ionflux::Tools::COLOR_LIGHTSKYBLUE
const Color Ionflux::Tools::COLOR_LIGHTSLATEGRAY
const Color Ionflux::Tools::COLOR_LIGHTSLATEGREY
const Color Ionflux::Tools::COLOR_LIGHTSTEELBLUE
const Color Ionflux::Tools::COLOR_LIGHTYELLOW
const Color Ionflux::Tools::COLOR_LIME
const Color Ionflux::Tools::COLOR_LIMEGREEN
const Color Ionflux::Tools::COLOR_LINEN
const Color Ionflux::Tools::COLOR_MAGENTA
const Color Ionflux::Tools::COLOR_MAROON
const Color Ionflux::Tools::COLOR_MEDIUMAQUAMARINE
const Color Ionflux::Tools::COLOR_MEDIUMBLUE
const Color Ionflux::Tools::COLOR_MEDIUMORCHID
const Color Ionflux::Tools::COLOR_MEDIUMPURPLE
const Color Ionflux::Tools::COLOR_MEDIUMSEAGREEN
const Color Ionflux::Tools::COLOR_MEDIUMSLATEBLUE
const Color Ionflux::Tools::COLOR_MEDIUMSPRINGGREEN
const Color Ionflux::Tools::COLOR_MEDIUMTURQUOISE
const Color Ionflux::Tools::COLOR_MEDIUMVIOLETRED
const Color Ionflux::Tools::COLOR_MIDNIGHTBLUE
const Color Ionflux::Tools::COLOR_MINTCREAM
const Color Ionflux::Tools::COLOR_MISTYROSE
const Color Ionflux::Tools::COLOR_MOCCASIN
const Color Ionflux::Tools::COLOR_NAVAJOWHITE
const Color Ionflux::Tools::COLOR_NAVY
const Color Ionflux::Tools::COLOR_OLDLACE
const Color Ionflux::Tools::COLOR_OLIVE
const Color Ionflux::Tools::COLOR_OLIVEDRAB
const Color Ionflux::Tools::COLOR_ORANGE
const Color Ionflux::Tools::COLOR_ORANGERED
const Color Ionflux::Tools::COLOR_ORCHID
const Color Ionflux::Tools::COLOR_PALEGOLDENROD
const Color Ionflux::Tools::COLOR_PALEGREEN
const Color Ionflux::Tools::COLOR_PALETURQUOISE
const Color Ionflux::Tools::COLOR_PALEVIOLETRED
const Color Ionflux::Tools::COLOR_PAPAYAWHIP
const Color Ionflux::Tools::COLOR_PEACHPUFF
const Color Ionflux::Tools::COLOR_PERU
const Color Ionflux::Tools::COLOR_PINK
const Color Ionflux::Tools::COLOR_PLUM
const Color Ionflux::Tools::COLOR_POWDERBLUE
const Color Ionflux::Tools::COLOR_PURPLE
const Color Ionflux::Tools::COLOR_RED
const Color Ionflux::Tools::COLOR_ROSYBROWN
const Color Ionflux::Tools::COLOR_ROYALBLUE
const Color Ionflux::Tools::COLOR_SADDLEBROWN
const Color Ionflux::Tools::COLOR_SALMON
const Color Ionflux::Tools::COLOR_SANDYBROWN
const Color Ionflux::Tools::COLOR_SEAGREEN
const Color Ionflux::Tools::COLOR_SEASHELL
const Color Ionflux::Tools::COLOR_SIENNA
const Color Ionflux::Tools::COLOR_SILVER
const Color Ionflux::Tools::COLOR_SKYBLUE
const Color Ionflux::Tools::COLOR_SLATEBLUE
const Color Ionflux::Tools::COLOR_SLATEGRAY
const Color Ionflux::Tools::COLOR_SLATEGREY
const Color Ionflux::Tools::COLOR_SNOW
const Color Ionflux::Tools::COLOR_SPRINGGREEN
const Color Ionflux::Tools::COLOR_STEELBLUE
const Color Ionflux::Tools::COLOR_TAN
const Color Ionflux::Tools::COLOR_TEAL
const Color Ionflux::Tools::COLOR_THISTLE
const Color Ionflux::Tools::COLOR_TOMATO
const Color Ionflux::Tools::COLOR_TURQUOISE
const Color Ionflux::Tools::COLOR_VIOLET
const Color Ionflux::Tools::COLOR_WHEAT
const Color Ionflux::Tools::COLOR_WHITE
const Color Ionflux::Tools::COLOR_WHITESMOKE
const Color Ionflux::Tools::COLOR_YELLOW
const Color Ionflux::Tools::COLOR_YELLOWGREEN
const Color Ionflux::Tools::COLOR_NONE
 Basic colors defined by the Ionflux Tools.
const Color Ionflux::Tools::COLOR_GREY_10
const Color Ionflux::Tools::COLOR_GREY_20
const Color Ionflux::Tools::COLOR_GREY_30
const Color Ionflux::Tools::COLOR_GREY_40
const Color Ionflux::Tools::COLOR_GREY_50
const Color Ionflux::Tools::COLOR_GREY_60
const Color Ionflux::Tools::COLOR_GREY_70
const Color Ionflux::Tools::COLOR_GREY_80
const Color Ionflux::Tools::COLOR_GREY_90
const std::string Ionflux::Tools::MODULE_NAME = "Ionflux Tools"
 Module name.
const std::string Ionflux::Tools::MODULE_VERSION = "0.2.3"
 Module version.
const int Ionflux::Tools::READ_BUFFER_SIZE = 1024
 Default size for read buffers.
const int Ionflux::Tools::COMPRESS_BUFFER_SIZE = 1024
 Default size for compression (and decompression) buffers.
const int Ionflux::Tools::DIR_BUFFER_SIZE = 1024
 Default size for directory name buffers.
const int Ionflux::Tools::DIR_BUFFER_SIZE_MAX = 65536
 Maximum size for directory name buffers.
const char Ionflux::Tools::DIR_SEPARATOR = '/'
 Directory separator.

Detailed Description

General tools and utility classes and functions.


Typedef Documentation

typedef std::map<const std::string, const Color*> Ionflux::Tools::ColorMap
 

Maps for color lookup by name.


Function Documentation

void Ionflux::Tools::addBasicColors ColorMap colorMap  ) 
 

Add basic colors.

Add basic colors to a color map.

Parameters:
colorMap Color map.

std::string Ionflux::Tools::appendDirSeparator const std::string &  path,
unsigned char  separator = DIR_SEPARATOR
 

Append directory separator.

Append directory separator to path, if not already present.

Parameters:
path Path to which a directory separator should be appended.
separator Directory separator to be used.
Returns:
Path with directory separator appended.

bool Ionflux::Tools::bz2Compress const std::string &  inputData,
std::string &  outputBuffer
 

Compress data.

Compresses data using bzip2.

Parameters:
inputData The data to be compressed.
outputBuffer Where to store the compressed data.
Returns:
true on success, false otherwise.

bool Ionflux::Tools::bz2Decompress const std::string &  inputData,
std::string &  outputBuffer
 

Decompress data.

Decompresses data using bzip2.

Parameters:
inputData The data to be decompressed.
outputBuffer Where to store the decompressed data.
Returns:
true on success, false otherwise.

Color Ionflux::Tools::createColorFromHex const std::string &  hexColor  ) 
 

Create color from hexadecimal representation.

Create a color from a hexadecimal representation.

Parameters:
hexColor Hexadecimal color.
Returns:
Color.

void Ionflux::Tools::daemonize  ) 
 

Daemonize.

Detaches the process from the terminal.

std::string Ionflux::Tools::escape const std::string &  source,
const std::string &  escapeWhat = " '\""
 

Escape string.

Escapes a string so it may be used (for example) with a function like explodeQuoted(), or anything else thar requires quotes and whitespace to be escaped.

Parameters:
source String to be escaped.
escapeWhat Characters which should be escaped.
Returns:
Escaped string.
See also:
explodeQuoted()

void Ionflux::Tools::explode const std::string &  bytes,
const std::string &  splitString,
std::vector< std::string > &  result
 

Explode a string.

Splits up a string of bytes at 'splitString', creating a vector containing the separated elements.

Parameters:
bytes Byte String to be exploded.
splitString Separator string.
result Vector to store the result in.

void Ionflux::Tools::explodeQuoted const std::string &  bytes,
std::vector< std::string > &  result
 

Explode a string.

Explodes a string using whitespace separators. Quoted parts of the string are treated as a single element. Valid quote characters are ' and ". Quote characters may be escaped using '\'.

Parameters:
bytes Byte String to be exploded.
result Vector to store the result in.

const Color * Ionflux::Tools::getByName const std::string &  colorName,
ColorMap colorMap
 

Get color by name.

Get a color from a color map by name.

Parameters:
colorName Color name.
colorMap Color map.
Returns:
Color with specified name, or 0 if no matching color is found.

const CharTypeMap & Ionflux::Tools::getCharTypes  ) 
 

Get character type lookup map.

Get a static character type lookup map.

Returns:
Character type lookup map.

std::string Ionflux::Tools::getCurrentDir  ) 
 

Get current working directory.

Returns:
The current working directory.

bool Ionflux::Tools::getFileList const std::vector< std::string > &  pathList,
std::vector< std::string > &  target,
bool  recursive = false,
const std::string &  filterExpr = ""
 

Get file list.

Get a list of files from a list of paths. The specified paths may be searched recursively and an optional regular expression may be specified as a filter.

Parameters:
pathList List of files and directories.
target Where to store the file names.
recursive Whether to search for files recursively.
filterExpr Regular expression to match file names with.
Returns:
true on success, false otherwise.

int Ionflux::Tools::getOpPrecedence const std::string &  op,
bool  unary = false
 

Get operator precedence.

Get a numeric value indicating the order of precedence of the specified operator. The value thus obtained may be used to determine the precedence of one operator over another operator.

Note:
unary needs to be specified only for operators for which unary-ness is ambiguous. i.e. which exist as both a unary and a binary operator.
Parameters:
op Operator.
unary Whether the operator should be treated as an unary operator (applies only if unary-ness of operator is amiguous).
Returns:
Non-negative numeric value indicating order of precedence, or -1 if the operator is not recognized.

void Ionflux::Tools::getPassword const std::string &  prompt,
std::string &  password
 

Get a password.

Reads a password from standard input.

Parameters:
prompt Password prompt.
password Where to store the password.

void Ionflux::Tools::getRandomBytes std::string &  bytes,
unsigned int  n,
MTRand *  source
 

Get random bytes.

Gets a specified number of random bytes.

Note:
You can specify an MTRand object to be used for random number generation. If you pass null, a random number source will be generated automatically (not recommended).
Parameters:
bytes Buffer in which to store the random bytes.
n Number of random bytes.
source Random number source.

void Ionflux::Tools::getRandomIdentifier std::string &  bytes,
unsigned int  n,
MTRand *  source
 

Get random identifier.

Gets a random identifier of specified length.

Note:
You can specify an MTRand object to be used for random number generation. If you pass null, a random number source will be generated automatically (not recommended).
Parameters:
bytes Buffer in which to store the random identifier.
n Length of random identifier.
source Random number source.

MTRand & Ionflux::Tools::getRandomizer  ) 
 

Get randomizer.

Get a (static) MT randomizer.

Returns:
MT randomizer.

bool Ionflux::Tools::isAlpha const std::string &  bytes  ) 
 

Check whether a string represents an alpha.

Returns true if the string represents a (latin) alpha, false otherwise.

Parameters:
bytes String to be checked.
Returns:
true if the string represents a (latin) alpha, false otherwise.

bool Ionflux::Tools::isFloat const std::string &  bytes  ) 
 

Check whether a string represents a float.

Returns true if the string represents a (decimal) floating point value (positive or negative), false otherwise.

Parameters:
bytes String to be checked.
Returns:
true if the string represents a (decimal) floating point value, false otherwise.

bool Ionflux::Tools::isIdentifier const std::string &  bytes  ) 
 

Check whether a string represents an identifier.

Returns true if the string represents an idenifier, false otherwise.

Note:
For purposes of this function, an identifier is a byte string consisting of alphanumeric characters or underscores '_' (in 8-bit ISO-8859-1 encoding).
Parameters:
bytes String to be checked.
Returns:
true if the string represents an idenifier, false otherwise.

bool Ionflux::Tools::isInteger const std::string &  bytes  ) 
 

Check whether a string represents an integer.

Returns true if the string represents a (decimal) integer value (positive or negative), false otherwise.

Parameters:
bytes String to be checked.
Returns:
true if the string represents a (decimal) integer, false otherwise.

bool Ionflux::Tools::isNumber const std::string &  bytes  ) 
 

Check whether a string represents a number.

Returns true if the string represents a (decimal) number, false otherwise.

Parameters:
bytes String to be checked.
Returns:
true if the string represents a (decimal) number, false otherwise.

bool Ionflux::Tools::isOneOf char  c,
const std::string &  testChars
 

Check type of a character.

Returns true if the character 'c' is one of the characters of 'testChars'.

Parameters:
c Character to be checked.
testChars String of characters.
Returns:
true if the character 'c' is one of the characters of 'testChars', false otherwise.

std::string Ionflux::Tools::makeHex const std::string &  inputData  ) 
 

Make readable hexadecimal code.

Convert a string that not necessarily contains readable characters to readable hexadecimal code.

Parameters:
inputData A string of bytes to be converted.
Returns:
Hexadecimal string.

std::string Ionflux::Tools::makeNiceHex const std::string &  hex,
const std::string &  readable,
int  bytesPerLine,
int  groupBytes
 

Make nice hexadecimal output.

This function generates a nice human readable hexadecimal output from a string of hexadecimal bytes and a readable representation of that string, similar to the display of a hex editor.

Parameters:
hex String of bytes in hexadecimal representation.
readable Readable representation of the string.
bytesPerLine How many bytes to display per line.
groupBytes How many bytes to display in each group.
Returns:
Nicely formatted hexadecimal output.

std::string Ionflux::Tools::makeReadable const std::string &  inputData,
const std::string &  replacement
 

Replace unreadable characters.

Convert a string that not necessarily contains readable characters to readable characters, replacing characters considered unreadable with 'replacement'.

Parameters:
inputData A string of bytes to be converted.
replacement A string with which to replace unreadable characters.
Returns:
String composed of readable characters.

std::string Ionflux::Tools::packBool bool  data  ) 
 

Pack boolean.

Packs a boolean value into a byte string (in network byte order).

Note:
Although a boolean may be represented as a single bit, the resulting string will be 1 byte long.
Parameters:
data The boolean to be packed.
Returns:
A byte equivalent the boolean value true (different from zero) or false (equal to zero).

std::string Ionflux::Tools::packDouble double  data  ) 
 

Pack double.

Packs a double precision floating point value into a byte string (in host byte order).

Parameters:
data The double to be packed.
Returns:
The bytes of the double, in host byte order.

std::string Ionflux::Tools::packInt int  data  ) 
 

Pack integer.

Packs an integer value into a byte string (in network byte order).

Parameters:
data The integer to be packed.
Returns:
The bytes of the integer, in network byte order.

std::string Ionflux::Tools::parseHex const std::string &  inputData  ) 
 

Parse hex string.

Parse a hex string into a byte string.

Parameters:
inputData The hex string to be parsed.
Returns:
The bytes represented by the hexadecimal string.

std::string Ionflux::Tools::prependDirSeparator const std::string &  path,
unsigned char  separator = DIR_SEPARATOR
 

Prepend directory separator.

Prepend directory separator to path, if not already present.

Parameters:
path Path to which a directory separator should be prepended.
separator Directory separator to be used.
Returns:
Path with directory separator prepended.

std::string Ionflux::Tools::quote const std::string &  source,
const unsigned char  quoteChar = '\''
 

Quote string.

Add quotes to a string.

Parameters:
source String to be quoted.
quoteChar Quote character to be used.
Returns:
Quoted string.

bool Ionflux::Tools::readDir const std::string &  dirName,
std::vector< std::string > &  target,
bool  prependDirName = false,
bool  recursive = false
 

Read directory entries.

Reads all entries from a directory and stores them in a vector.

Parameters:
dirName Name (or path) of the directory.
target Where to store the directory entries.
prependDirName Whether to prepend the directory name (or path) to the entries.
recursive Whether to read the directory recursively.
Returns:
true on success, false otherwise.

std::string Ionflux::Tools::readFile const std::string &  fileName  ) 
 

Read a file.

Reads a file and returns the complete contents as a byte string.

Parameters:
fileName File name.
Returns:
Contents of the file.

std::string Ionflux::Tools::sha1 const std::string &  secret,
bool  hexOut = false
 

Calculate SHA-1 hash.

Calculate the SHA-1 hash for a string.

Parameters:
secret The string containing the secret which should be hashed.
hexOut If set to true, the return value will be a hexadecimal string.
Returns:
SHA-1 hash of the input secret.

void Ionflux::Tools::socketInit  ) 
 

Initialize socket API.

Initialize the socket API. This may be necessary on some systems (Win32), while it does nothing on others (Linux, BSD).

void Ionflux::Tools::socketShutdown  ) 
 

Shutdown socket API.

Shutdown the socket API. This may be necessary on some systems (Win32), while it does nothing on others (Linux, BSD).

Color8bpp Ionflux::Tools::to8bpp const Color &  color  ) 
 

Get 8 bpp representation.

Get an 8 bits per pixel RGBA representation of a color.

Parameters:
color Color.
Returns:
8 bpp RGBA representation of the color.

bool Ionflux::Tools::toBool const std::string &  text  ) 
 

Convert string to bool.

Converts a boolean string (e.g. 'yes', 'no', 'true', 'false') to a value of type bool if possible.

Note:
If the string cannot be converted to a bool, the function returns false anyway.
Parameters:
text Boolean text string.
Returns:
Boolean value.

std::string Ionflux::Tools::toHex const Color &  color  ) 
 

Get hexadecimal representation.

Get the hexadecimal representation of a color.

Parameters:
color Color.
Returns:
Hexadecimal representation of the color.

std::string Ionflux::Tools::toLower const std::string &  text,
unsigned int  numChars = 0,
unsigned int  offset = 0
 

Convert string to lower case.

Convert a text string to lower case if possible.

Parameters:
text Input text string.
numChars Maximum number of characters to convert.
offset Index where to start case conversion.
Returns:
Lower case string.

std::string Ionflux::Tools::toUpper const std::string &  text,
unsigned int  numChars = 0,
unsigned int  offset = 0
 

Convert string to upper case.

Convert a text string to upper case if possible.

Parameters:
text Input text string.
numChars Maximum number of characters to convert.
offset Index where to start case conversion.
Returns:
Upper case string.

std::string Ionflux::Tools::trim const std::string &  bytes,
bool  leftTrim = true,
bool  rightTrim = true
 

Trim byte string.

Remove whitespace characters from the beginning and end of the specified string.

See also:
utf8Trim
Parameters:
bytes Byte string.
leftTrim Remove whitespace from beginning of string.
rightTrim Remove whitespace from end of string.
Returns:
String with whitespace removed from beginning and end.

void Ionflux::Tools::uintToUtf8 const std::vector< unsigned int > &  uniChars,
std::string &  target
 

Convert unsigned int vector to UTF-8 character string.

Converts the specified unicode character codes to a UTF-8 character string.

Parameters:
uniChars Vector of unicode character codes.
target Where to store the UTF-8 character string.

std::string Ionflux::Tools::uintToUtf8 unsigned int  uniChar  ) 
 

Convert unsigned int to UTF-8 character.

Converts the specified unicode character code to a UTF-8 character, represented by a byte string.

Parameters:
uniChar Unicode character code.
Returns:
UTF-8 character.

bool Ionflux::Tools::unpackBool const std::string &  data  ) 
 

Unpack boolean.

Unpacks a boolean value from a byte string.

Parameters:
data The bytes to be unpacked.
Returns:
Boolean equivalent to the data byte.

double Ionflux::Tools::unpackDouble const std::string &  data  ) 
 

Unpack double.

Unpacks a double value from a byte string.

Parameters:
data The bytes to be unpacked.
Returns:
The double extracted from the data bytes.

int Ionflux::Tools::unpackInt const std::string &  data  ) 
 

Unpack integer.

Unpacks an integer value from a byte string (in network byte order).

Parameters:
data The bytes to be unpacked.
Returns:
The integer extracted from the data bytes.

std::string Ionflux::Tools::unquote const std::string &  source,
const std::string &  addQuoteChars = ""
 

Unquote string.

Remove quotes from a string.

Parameters:
source String to be unquoted.
addQuoteChars Additional quote characters.
Returns:
Unquoted string.

std::string Ionflux::Tools::urlDecode const std::string &  bytes  ) 
 

URL-decode bytes.

Decode bytes according to RFC 1738.

Parameters:
bytes Bytes to be decoded.
Returns:
URL-decoded bytes.

std::string Ionflux::Tools::urlEncode const std::string &  bytes  ) 
 

URL-encode bytes.

Encode bytes according to RFC 1738.

Parameters:
bytes Bytes to be encoded.
Returns:
URL-encoded bytes.

std::string Ionflux::Tools::utf8Escape const std::string &  source  ) 
 

Escape UTF-8 string.

Escape an UTF-8 string.

Parameters:
source UTF-8 string of characters.
Returns:
An escaped string of ASCII characters.

unsigned int Ionflux::Tools::utf8GetSize const std::string &  bytes  ) 
 

Get UTF-8 character string size.

Get the size, in characters, of the specified UTF-8 character string.

Parameters:
bytes UTF-8 character string.
Returns:
Size of UTF-8 character string, or 0 if an error occurs.

unsigned int Ionflux::Tools::utf8GetSize unsigned char  byte  ) 
 

Get UTF-8 character size.

Get the size, in bytes, of the UTF-8 character starting at byte.

Parameters:
byte Byte.
Returns:
Size of UTF-8 character, or 0 if byte is not the first byte of an UTF-8 character.

bool Ionflux::Tools::utf8IsOneOf unsigned int  c,
const std::vector< unsigned int > &  testChars
 

Check type of Unicode character.

Returns true if the character 'c' is one of the characters of 'testChars'.

Parameters:
c Unicode Character to be checked.
testChars Unicode characters.
Returns:
true if the character 'c' is one of the characters of 'testChars', false otherwise.

bool Ionflux::Tools::utf8IsOneOf unsigned int  c,
const std::string &  testChars
 

Check type of Unicode character.

Returns true if the character 'c' is one of the characters of 'testChars'.

Parameters:
c Unicode Character to be checked.
testChars UTF-8 string of characters.
Returns:
true if the character 'c' is one of the characters of 'testChars', false otherwise.

bool Ionflux::Tools::utf8ToUInt const std::string &  bytes,
std::vector< unsigned int > &  target
 

Convert UTF-8 character string to unsigned int vector.

Converts an UTF-8 character string to a vector of unsigned int if possible.

Parameters:
bytes String containing the bytes of an UTF-8 character.
target Where to store the result.
Returns:
true on success, false if one of the characters cannot be decoded.

bool Ionflux::Tools::utf8ToUInt const std::string &  bytes,
unsigned int &  target
 

Convert UTF-8 character to unsigned int.

Converts an UTF-8 character to an unsigned int if possible.

Parameters:
bytes String containing the bytes of an UTF-8 character.
target Where to store the result.
Returns:
true on success, false if the character cannot be decoded.

std::string Ionflux::Tools::utf8Trim const std::string &  bytes,
bool  leftTrim = true,
bool  rightTrim = true
 

Trim UTF-8 string.

Remove whitespace characters from the beginning and end of the specified UTF-8 string.

See also:
trim
Parameters:
bytes UTF-8 string.
leftTrim Remove whitespace from beginning of string.
rightTrim Remove whitespace from end of string.
Returns:
String with whitespace removed from beginning and end.

std::string Ionflux::Tools::utf8Unescape const std::string &  source  ) 
 

Unescape ASCII string.

Unescape a string of ASCII characters.

Parameters:
source ASCII string of characters.
Returns:
An unescaped string of UTF-8 characters.

bool Ionflux::Tools::validatePath const std::string &  path,
int  mask = 0755
 

Validate path.

Validate a path. Missing directories will be created automatically.

Parameters:
path Path.
mask Mask for newly created directories.
Returns:
true on success, false otherwise.

bool Ionflux::Tools::writeFile const std::string &  fileName,
const std::string &  data,
char  writeMode
 

Write to file.

Writes the specified byte string to a file. If 'writeMode' is 'w' (or 0), the file is overwritten, if 'writeMode' is 'a', the byte string is appended to the file.

Parameters:
fileName File name.
data Data to be written.
writeMode File write mode.
Returns:
true on success, false otherwise.

std::string Ionflux::Tools::xmlEscape const std::string &  bytes  ) 
 

Escape XML markup.

Escape a string so it may be used in an XML document without interfering with markup.

Parameters:
bytes Bytes to be escaped.
Returns:
escaped String;


Variable Documentation

const Color Ionflux::Tools::COLOR_ALICEBLUE
 

Initial value:

 { "aliceblue",
    0.941176, 0.972549, 1.000000, 1.000000 }
Basic colors as defined by the SVG 1.1 specification.

see http://www.w3.org/TR/SVG11/types.html#ColorKeywords

const Color Ionflux::Tools::COLOR_ANTIQUEWHITE
 

Initial value:

 { "antiquewhite",
    0.980392, 0.921569, 0.843137, 1.000000 }

const Color Ionflux::Tools::COLOR_AQUA
 

Initial value:

 { "aqua",
    0.000000, 1.000000, 1.000000, 1.000000 }

const Color Ionflux::Tools::COLOR_AQUAMARINE
 

Initial value:

 { "aquamarine",
    0.498039, 1.000000, 0.831373, 1.000000 }

const Color Ionflux::Tools::COLOR_AZURE
 

Initial value:

 { "azure",
    0.941176, 1.000000, 1.000000, 1.000000 }

const Color Ionflux::Tools::COLOR_BEIGE
 

Initial value:

 { "beige",
    0.960784, 0.960784, 0.862745, 1.000000 }

const Color Ionflux::Tools::COLOR_BISQUE
 

Initial value:

 { "bisque",
    1.000000, 0.894118, 0.768627, 1.000000 }

const Color Ionflux::Tools::COLOR_BLACK
 

Initial value:

 { "black",
    0.000000, 0.000000, 0.000000, 1.000000 }

const Color Ionflux::Tools::COLOR_BLANCHEDALMOND
 

Initial value:

 { "blanchedalmond",
    1.000000, 0.921569, 0.803922, 1.000000 }

const Color Ionflux::Tools::COLOR_BLUE
 

Initial value:

 { "blue",
    0.000000, 0.000000, 1.000000, 1.000000 }

const Color Ionflux::Tools::COLOR_BLUEVIOLET
 

Initial value:

 { "blueviolet",
    0.541176, 0.168627, 0.886275, 1.000000 }

const Color Ionflux::Tools::COLOR_BROWN
 

Initial value:

 { "brown",
    0.647059, 0.164706, 0.164706, 1.000000 }

const Color Ionflux::Tools::COLOR_BURLYWOOD
 

Initial value:

 { "burlywood",
    0.870588, 0.721569, 0.529412, 1.000000 }

const Color Ionflux::Tools::COLOR_CADETBLUE
 

Initial value:

 { "cadetblue",
    0.372549, 0.619608, 0.627451, 1.000000 }

const Color Ionflux::Tools::COLOR_CHARTREUSE
 

Initial value:

 { "chartreuse",
    0.498039, 1.000000, 0.000000, 1.000000 }

const Color Ionflux::Tools::COLOR_CHOCOLATE
 

Initial value:

 { "chocolate",
    0.823529, 0.411765, 0.117647, 1.000000 }

const Color Ionflux::Tools::COLOR_CORAL
 

Initial value:

 { "coral",
    1.000000, 0.498039, 0.313725, 1.000000 }

const Color Ionflux::Tools::COLOR_CORNFLOWERBLUE
 

Initial value:

 { "cornflowerblue",
    0.392157, 0.584314, 0.929412, 1.000000 }

const Color Ionflux::Tools::COLOR_CORNSILK
 

Initial value:

 { "cornsilk",
    1.000000, 0.972549, 0.862745, 1.000000 }

const Color Ionflux::Tools::COLOR_CRIMSON
 

Initial value:

 { "crimson",
    0.862745, 0.078431, 0.235294, 1.000000 }

const Color Ionflux::Tools::COLOR_CYAN
 

Initial value:

 { "cyan",
    0.000000, 1.000000, 1.000000, 1.000000 }

const Color Ionflux::Tools::COLOR_DARKBLUE
 

Initial value:

 { "darkblue",
    0.000000, 0.000000, 0.545098, 1.000000 }

const Color Ionflux::Tools::COLOR_DARKCYAN
 

Initial value:

 { "darkcyan",
    0.000000, 0.545098, 0.545098, 1.000000 }

const Color Ionflux::Tools::COLOR_DARKGOLDENROD
 

Initial value:

 { "darkgoldenrod",
    0.721569, 0.525490, 0.043137, 1.000000 }

const Color Ionflux::Tools::COLOR_DARKGRAY
 

Initial value:

 { "darkgray",
    0.662745, 0.662745, 0.662745, 1.000000 }

const Color Ionflux::Tools::COLOR_DARKGREEN
 

Initial value:

 { "darkgreen",
    0.000000, 0.392157, 0.000000, 1.000000 }

const Color Ionflux::Tools::COLOR_DARKGREY
 

Initial value:

 { "darkgrey",
    0.662745, 0.662745, 0.662745, 1.000000 }

const Color Ionflux::Tools::COLOR_DARKKHAKI
 

Initial value:

 { "darkkhaki",
    0.741176, 0.717647, 0.419608, 1.000000 }

const Color Ionflux::Tools::COLOR_DARKMAGENTA
 

Initial value:

 { "darkmagenta",
    0.545098, 0.000000, 0.545098, 1.000000 }

const Color Ionflux::Tools::COLOR_DARKOLIVEGREEN
 

Initial value:

 { "darkolivegreen",
    0.333333, 0.419608, 0.184314, 1.000000 }

const Color Ionflux::Tools::COLOR_DARKORANGE
 

Initial value:

 { "darkorange",
    1.000000, 0.549020, 0.000000, 1.000000 }

const Color Ionflux::Tools::COLOR_DARKORCHID
 

Initial value:

 { "darkorchid",
    0.600000, 0.196078, 0.800000, 1.000000 }

const Color Ionflux::Tools::COLOR_DARKRED
 

Initial value:

 { "darkred",
    0.545098, 0.000000, 0.000000, 1.000000 }

const Color Ionflux::Tools::COLOR_DARKSALMON
 

Initial value:

 { "darksalmon",
    0.913725, 0.588235, 0.478431, 1.000000 }

const Color Ionflux::Tools::COLOR_DARKSEAGREEN
 

Initial value:

 { "darkseagreen",
    0.560784, 0.737255, 0.560784, 1.000000 }

const Color Ionflux::Tools::COLOR_DARKSLATEBLUE
 

Initial value:

 { "darkslateblue",
    0.282353, 0.239216, 0.545098, 1.000000 }

const Color Ionflux::Tools::COLOR_DARKSLATEGRAY
 

Initial value:

 { "darkslategray",
    0.184314, 0.309804, 0.309804, 1.000000 }

const Color Ionflux::Tools::COLOR_DARKSLATEGREY
 

Initial value:

 { "darkslategrey",
    0.184314, 0.309804, 0.309804, 1.000000 }

const Color Ionflux::Tools::COLOR_DARKTURQUOISE
 

Initial value:

 { "darkturquoise",
    0.000000, 0.807843, 0.819608, 1.000000 }

const Color Ionflux::Tools::COLOR_DARKVIOLET
 

Initial value:

 { "darkviolet",
    0.580392, 0.000000, 0.827451, 1.000000 }

const Color Ionflux::Tools::COLOR_DEEPPINK
 

Initial value:

 { "deeppink",
    1.000000, 0.078431, 0.576471, 1.000000 }

const Color Ionflux::Tools::COLOR_DEEPSKYBLUE
 

Initial value:

 { "deepskyblue",
    0.000000, 0.749020, 1.000000, 1.000000 }

const Color Ionflux::Tools::COLOR_DIMGRAY
 

Initial value:

 { "dimgray",
    0.411765, 0.411765, 0.411765, 1.000000 }

const Color Ionflux::Tools::COLOR_DIMGREY
 

Initial value:

 { "dimgrey",
    0.411765, 0.411765, 0.411765, 1.000000 }

const Color Ionflux::Tools::COLOR_DODGERBLUE
 

Initial value:

 { "dodgerblue",
    0.117647, 0.564706, 1.000000, 1.000000 }

const Color Ionflux::Tools::COLOR_FIREBRICK
 

Initial value:

 { "firebrick",
    0.698039, 0.133333, 0.133333, 1.000000 }

const Color Ionflux::Tools::COLOR_FLORALWHITE
 

Initial value:

 { "floralwhite",
    1.000000, 0.980392, 0.941176, 1.000000 }

const Color Ionflux::Tools::COLOR_FORESTGREEN
 

Initial value:

 { "forestgreen",
    0.133333, 0.545098, 0.133333, 1.000000 }

const Color Ionflux::Tools::COLOR_FUCHSIA
 

Initial value:

 { "fuchsia",
    1.000000, 0.000000, 1.000000, 1.000000 }

const Color Ionflux::Tools::COLOR_GAINSBORO
 

Initial value:

 { "gainsboro",
    0.862745, 0.862745, 0.862745, 1.000000 }

const Color Ionflux::Tools::COLOR_GHOSTWHITE
 

Initial value:

 { "ghostwhite",
    0.972549, 0.972549, 1.000000, 1.000000 }

const Color Ionflux::Tools::COLOR_GOLD
 

Initial value:

 { "gold",
    1.000000, 0.843137, 0.000000, 1.000000 }

const Color Ionflux::Tools::COLOR_GOLDENROD
 

Initial value:

 { "goldenrod",
    0.854902, 0.647059, 0.125490, 1.000000 }

const Color Ionflux::Tools::COLOR_GRAY
 

Initial value:

 { "gray",
    0.501961, 0.501961, 0.501961, 1.000000 }

const Color Ionflux::Tools::COLOR_GREEN
 

Initial value:

 { "green",
    0.000000, 0.501961, 0.000000, 1.000000 }

const Color Ionflux::Tools::COLOR_GREENYELLOW
 

Initial value:

 { "greenyellow",
    0.678431, 1.000000, 0.184314, 1.000000 }

const Color Ionflux::Tools::COLOR_GREY
 

Initial value:

 { "grey",
    0.501961, 0.501961, 0.501961, 1.000000 }

const Color Ionflux::Tools::COLOR_GREY_10
 

Initial value:

 { "grey_10",
    0.900000, 0.900000, 0.900000, 1.000000 }

const Color Ionflux::Tools::COLOR_GREY_20
 

Initial value:

 { "grey_20",
    0.800000, 0.800000, 0.800000, 1.000000 }

const Color Ionflux::Tools::COLOR_GREY_30
 

Initial value:

 { "grey_30",
    0.700000, 0.700000, 0.700000, 1.000000 }

const Color Ionflux::Tools::COLOR_GREY_40
 

Initial value:

 { "grey_40",
    0.600000, 0.600000, 0.600000, 1.000000 }

const Color Ionflux::Tools::COLOR_GREY_50
 

Initial value:

 { "grey_50",
    0.500000, 0.500000, 0.500000, 1.000000 }

const Color Ionflux::Tools::COLOR_GREY_60
 

Initial value:

 { "grey_60",
    0.400000, 0.400000, 0.400000, 1.000000 }

const Color Ionflux::Tools::COLOR_GREY_70
 

Initial value:

 { "grey_70",
    0.300000, 0.300000, 0.300000, 1.000000 }

const Color Ionflux::Tools::COLOR_GREY_80
 

Initial value:

 { "grey_80",
    0.200000, 0.200000, 0.200000, 1.000000 }

const Color Ionflux::Tools::COLOR_GREY_90
 

Initial value:

 { "grey_90",
    0.100000, 0.100000, 0.100000, 1.000000 }

const Color Ionflux::Tools::COLOR_HONEYDEW
 

Initial value:

 { "honeydew",
    0.941176, 1.000000, 0.941176, 1.000000 }

const Color Ionflux::Tools::COLOR_HOTPINK
 

Initial value:

 { "hotpink",
    1.000000, 0.411765, 0.705882, 1.000000 }

const Color Ionflux::Tools::COLOR_INDIANRED
 

Initial value:

 { "indianred",
    0.803922, 0.360784, 0.360784, 1.000000 }

const Color Ionflux::Tools::COLOR_INDIGO
 

Initial value:

 { "indigo",
    0.294118, 0.000000, 0.509804, 1.000000 }

const Color Ionflux::Tools::COLOR_IVORY
 

Initial value:

 { "ivory",
    1.000000, 1.000000, 0.941176, 1.000000 }

const Color Ionflux::Tools::COLOR_KHAKI
 

Initial value:

 { "khaki",
    0.941176, 0.901961, 0.549020, 1.000000 }

const Color Ionflux::Tools::COLOR_LAVENDER
 

Initial value:

 { "lavender",
    0.901961, 0.901961, 0.980392, 1.000000 }

const Color Ionflux::Tools::COLOR_LAVENDERBLUSH
 

Initial value:

 { "lavenderblush",
    1.000000, 0.941176, 0.960784, 1.000000 }

const Color Ionflux::Tools::COLOR_LAWNGREEN
 

Initial value:

 { "lawngreen",
    0.486275, 0.988235, 0.000000, 1.000000 }

const Color Ionflux::Tools::COLOR_LEMONCHIFFON
 

Initial value:

 { "lemonchiffon",
    1.000000, 0.980392, 0.803922, 1.000000 }

const Color Ionflux::Tools::COLOR_LIGHTBLUE
 

Initial value:

 { "lightblue",
    0.678431, 0.847059, 0.901961, 1.000000 }

const Color Ionflux::Tools::COLOR_LIGHTCORAL
 

Initial value:

 { "lightcoral",
    0.941176, 0.501961, 0.501961, 1.000000 }

const Color Ionflux::Tools::COLOR_LIGHTCYAN
 

Initial value:

 { "lightcyan",
    0.878431, 1.000000, 1.000000, 1.000000 }

const Color Ionflux::Tools::COLOR_LIGHTGOLDENRODYELLOW
 

Initial value:

 { "lightgoldenrodyellow",
    0.980392, 0.980392, 0.823529, 1.000000 }

const Color Ionflux::Tools::COLOR_LIGHTGRAY
 

Initial value:

 { "lightgray",
    0.827451, 0.827451, 0.827451, 1.000000 }

const Color Ionflux::Tools::COLOR_LIGHTGREEN
 

Initial value:

 { "lightgreen",
    0.564706, 0.933333, 0.564706, 1.000000 }

const Color Ionflux::Tools::COLOR_LIGHTGREY
 

Initial value:

 { "lightgrey",
    0.827451, 0.827451, 0.827451, 1.000000 }

const Color Ionflux::Tools::COLOR_LIGHTPINK
 

Initial value:

 { "lightpink",
    1.000000, 0.713725, 0.756863, 1.000000 }

const Color Ionflux::Tools::COLOR_LIGHTSALMON
 

Initial value:

 { "lightsalmon",
    1.000000, 0.627451, 0.478431, 1.000000 }

const Color Ionflux::Tools::COLOR_LIGHTSEAGREEN
 

Initial value:

 { "lightseagreen",
    0.125490, 0.698039, 0.666667, 1.000000 }

const Color Ionflux::Tools::COLOR_LIGHTSKYBLUE
 

Initial value:

 { "lightskyblue",
    0.529412, 0.807843, 0.980392, 1.000000 }

const Color Ionflux::Tools::COLOR_LIGHTSLATEGRAY
 

Initial value:

 { "lightslategray",
    0.466667, 0.533333, 0.600000, 1.000000 }

const Color Ionflux::Tools::COLOR_LIGHTSLATEGREY
 

Initial value:

 { "lightslategrey",
    0.466667, 0.533333, 0.600000, 1.000000 }

const Color Ionflux::Tools::COLOR_LIGHTSTEELBLUE
 

Initial value:

 { "lightsteelblue",
    0.690196, 0.768627, 0.870588, 1.000000 }

const Color Ionflux::Tools::COLOR_LIGHTYELLOW
 

Initial value:

 { "lightyellow",
    1.000000, 1.000000, 0.878431, 1.000000 }

const Color Ionflux::Tools::COLOR_LIME
 

Initial value:

 { "lime",
    0.000000, 1.000000, 0.000000, 1.000000 }

const Color Ionflux::Tools::COLOR_LIMEGREEN
 

Initial value:

 { "limegreen",
    0.196078, 0.803922, 0.196078, 1.000000 }

const Color Ionflux::Tools::COLOR_LINEN
 

Initial value:

 { "linen",
    0.980392, 0.941176, 0.901961, 1.000000 }

const Color Ionflux::Tools::COLOR_MAGENTA
 

Initial value:

 { "magenta",
    1.000000, 0.000000, 1.000000, 1.000000 }

const Color Ionflux::Tools::COLOR_MAROON
 

Initial value:

 { "maroon",
    0.501961, 0.000000, 0.000000, 1.000000 }

const Color Ionflux::Tools::COLOR_MEDIUMAQUAMARINE
 

Initial value:

 { "mediumaquamarine",
    0.400000, 0.803922, 0.666667, 1.000000 }

const Color Ionflux::Tools::COLOR_MEDIUMBLUE
 

Initial value:

 { "mediumblue",
    0.000000, 0.000000, 0.803922, 1.000000 }

const Color Ionflux::Tools::COLOR_MEDIUMORCHID
 

Initial value:

 { "mediumorchid",
    0.729412, 0.333333, 0.827451, 1.000000 }

const Color Ionflux::Tools::COLOR_MEDIUMPURPLE
 

Initial value:

 { "mediumpurple",
    0.576471, 0.439216, 0.858824, 1.000000 }

const Color Ionflux::Tools::COLOR_MEDIUMSEAGREEN
 

Initial value:

 { "mediumseagreen",
    0.235294, 0.701961, 0.443137, 1.000000 }

const Color Ionflux::Tools::COLOR_MEDIUMSLATEBLUE
 

Initial value:

 { "mediumslateblue",
    0.482353, 0.407843, 0.933333, 1.000000 }

const Color Ionflux::Tools::COLOR_MEDIUMSPRINGGREEN
 

Initial value:

 { "mediumspringgreen",
    0.000000, 0.980392, 0.603922, 1.000000 }

const Color Ionflux::Tools::COLOR_MEDIUMTURQUOISE
 

Initial value:

 { "mediumturquoise",
    0.282353, 0.819608, 0.800000, 1.000000 }

const Color Ionflux::Tools::COLOR_MEDIUMVIOLETRED
 

Initial value:

 { "mediumvioletred",
    0.780392, 0.082353, 0.521569, 1.000000 }

const Color Ionflux::Tools::COLOR_MIDNIGHTBLUE
 

Initial value:

 { "midnightblue",
    0.098039, 0.098039, 0.439216, 1.000000 }

const Color Ionflux::Tools::COLOR_MINTCREAM
 

Initial value:

 { "mintcream",
    0.960784, 1.000000, 0.980392, 1.000000 }

const Color Ionflux::Tools::COLOR_MISTYROSE
 

Initial value:

 { "mistyrose",
    1.000000, 0.894118, 0.882353, 1.000000 }

const Color Ionflux::Tools::COLOR_MOCCASIN
 

Initial value:

 { "moccasin",
    1.000000, 0.894118, 0.709804, 1.000000 }

const Color Ionflux::Tools::COLOR_NAVAJOWHITE
 

Initial value:

 { "navajowhite",
    1.000000, 0.870588, 0.678431, 1.000000 }

const Color Ionflux::Tools::COLOR_NAVY
 

Initial value:

 { "navy",
    0.000000, 0.000000, 0.501961, 1.000000 }

const Color Ionflux::Tools::COLOR_NONE
 

Initial value:

 { "<none>",
    0.000000, 0.000000, 0.000000, 0.000000 }
Basic colors defined by the Ionflux Tools.

const Color Ionflux::Tools::COLOR_OLDLACE
 

Initial value:

 { "oldlace",
    0.992157, 0.960784, 0.901961, 1.000000 }

const Color Ionflux::Tools::COLOR_OLIVE
 

Initial value:

 { "olive",
    0.501961, 0.501961, 0.000000, 1.000000 }

const Color Ionflux::Tools::COLOR_OLIVEDRAB
 

Initial value:

 { "olivedrab",
    0.419608, 0.556863, 0.137255, 1.000000 }

const Color Ionflux::Tools::COLOR_ORANGE
 

Initial value:

 { "orange",
    1.000000, 0.647059, 0.000000, 1.000000 }

const Color Ionflux::Tools::COLOR_ORANGERED
 

Initial value:

 { "orangered",
    1.000000, 0.270588, 0.000000, 1.000000 }

const Color Ionflux::Tools::COLOR_ORCHID
 

Initial value:

 { "orchid",
    0.854902, 0.439216, 0.839216, 1.000000 }

const Color Ionflux::Tools::COLOR_PALEGOLDENROD
 

Initial value:

 { "palegoldenrod",
    0.933333, 0.909804, 0.666667, 1.000000 }

const Color Ionflux::Tools::COLOR_PALEGREEN
 

Initial value:

 { "palegreen",
    0.596078, 0.984314, 0.596078, 1.000000 }

const Color Ionflux::Tools::COLOR_PALETURQUOISE
 

Initial value:

 { "paleturquoise",
    0.686275, 0.933333, 0.933333, 1.000000 }

const Color Ionflux::Tools::COLOR_PALEVIOLETRED
 

Initial value:

 { "palevioletred",
    0.858824, 0.439216, 0.576471, 1.000000 }

const Color Ionflux::Tools::COLOR_PAPAYAWHIP
 

Initial value:

 { "papayawhip",
    1.000000, 0.937255, 0.835294, 1.000000 }

const Color Ionflux::Tools::COLOR_PEACHPUFF
 

Initial value:

 { "peachpuff",
    1.000000, 0.854902, 0.725490, 1.000000 }

const Color Ionflux::Tools::COLOR_PERU
 

Initial value:

 { "peru",
    0.803922, 0.521569, 0.247059, 1.000000 }

const Color Ionflux::Tools::COLOR_PINK
 

Initial value:

 { "pink",
    1.000000, 0.752941, 0.796078, 1.000000 }

const Color Ionflux::Tools::COLOR_PLUM
 

Initial value:

 { "plum",
    0.866667, 0.627451, 0.866667, 1.000000 }

const Color Ionflux::Tools::COLOR_POWDERBLUE
 

Initial value:

 { "powderblue",
    0.690196, 0.878431, 0.901961, 1.000000 }

const Color Ionflux::Tools::COLOR_PURPLE
 

Initial value:

 { "purple",
    0.501961, 0.000000, 0.501961, 1.000000 }

const Color Ionflux::Tools::COLOR_RED
 

Initial value:

 { "red",
    1.000000, 0.000000, 0.000000, 1.000000 }

const Color Ionflux::Tools::COLOR_ROSYBROWN
 

Initial value:

 { "rosybrown",
    0.737255, 0.560784, 0.560784, 1.000000 }

const Color Ionflux::Tools::COLOR_ROYALBLUE
 

Initial value:

 { "royalblue",
    0.254902, 0.411765, 0.882353, 1.000000 }

const Color Ionflux::Tools::COLOR_SADDLEBROWN
 

Initial value:

 { "saddlebrown",
    0.545098, 0.270588, 0.074510, 1.000000 }

const Color Ionflux::Tools::COLOR_SALMON
 

Initial value:

 { "salmon",
    0.980392, 0.501961, 0.447059, 1.000000 }

const Color Ionflux::Tools::COLOR_SANDYBROWN
 

Initial value:

 { "sandybrown",
    0.956863, 0.643137, 0.376471, 1.000000 }

const Color Ionflux::Tools::COLOR_SEAGREEN
 

Initial value:

 { "seagreen",
    0.180392, 0.545098, 0.341176, 1.000000 }

const Color Ionflux::Tools::COLOR_SEASHELL
 

Initial value:

 { "seashell",
    1.000000, 0.960784, 0.933333, 1.000000 }

const Color Ionflux::Tools::COLOR_SIENNA
 

Initial value:

 { "sienna",
    0.627451, 0.321569, 0.176471, 1.000000 }

const Color Ionflux::Tools::COLOR_SILVER
 

Initial value:

 { "silver",
    0.752941, 0.752941, 0.752941, 1.000000 }

const Color Ionflux::Tools::COLOR_SKYBLUE
 

Initial value:

 { "skyblue",
    0.529412, 0.807843, 0.921569, 1.000000 }

const Color Ionflux::Tools::COLOR_SLATEBLUE
 

Initial value:

 { "slateblue",
    0.415686, 0.352941, 0.803922, 1.000000 }

const Color Ionflux::Tools::COLOR_SLATEGRAY
 

Initial value:

 { "slategray",
    0.439216, 0.501961, 0.564706, 1.000000 }

const Color Ionflux::Tools::COLOR_SLATEGREY
 

Initial value:

 { "slategrey",
    0.439216, 0.501961, 0.564706, 1.000000 }

const Color Ionflux::Tools::COLOR_SNOW
 

Initial value:

 { "snow",
    1.000000, 0.980392, 0.980392, 1.000000 }

const Color Ionflux::Tools::COLOR_SPRINGGREEN
 

Initial value:

 { "springgreen",
    0.000000, 1.000000, 0.498039, 1.000000 }

const Color Ionflux::Tools::COLOR_STEELBLUE
 

Initial value:

 { "steelblue",
    0.274510, 0.509804, 0.705882, 1.000000 }

const Color Ionflux::Tools::COLOR_TAN
 

Initial value:

 { "tan",
    0.823529, 0.705882, 0.549020, 1.000000 }

const Color Ionflux::Tools::COLOR_TEAL
 

Initial value:

 { "teal",
    0.000000, 0.501961, 0.501961, 1.000000 }

const Color Ionflux::Tools::COLOR_THISTLE
 

Initial value:

 { "thistle",
    0.847059, 0.749020, 0.847059, 1.000000 }

const Color Ionflux::Tools::COLOR_TOMATO
 

Initial value:

 { "tomato",
    1.000000, 0.388235, 0.278431, 1.000000 }

const Color Ionflux::Tools::COLOR_TURQUOISE
 

Initial value:

 { "turquoise",
    0.250980, 0.878431, 0.815686, 1.000000 }

const Color Ionflux::Tools::COLOR_VIOLET
 

Initial value:

 { "violet",
    0.933333, 0.509804, 0.933333, 1.000000 }

const Color Ionflux::Tools::COLOR_WHEAT
 

Initial value:

 { "wheat",
    0.960784, 0.870588, 0.701961, 1.000000 }

const Color Ionflux::Tools::COLOR_WHITE
 

Initial value:

 { "white",
    1.000000, 1.000000, 1.000000, 1.000000 }

const Color Ionflux::Tools::COLOR_WHITESMOKE
 

Initial value:

 { "whitesmoke",
    0.960784, 0.960784, 0.960784, 1.000000 }

const Color Ionflux::Tools::COLOR_YELLOW
 

Initial value:

 { "yellow",
    1.000000, 1.000000, 0.000000, 1.000000 }

const Color Ionflux::Tools::COLOR_YELLOWGREEN
 

Initial value:

 { "yellowgreen",
    0.603922, 0.803922, 0.196078, 1.000000 }

const int Ionflux::Tools::COMPRESS_BUFFER_SIZE = 1024
 

Default size for compression (and decompression) buffers.

const int Ionflux::Tools::DIR_BUFFER_SIZE = 1024
 

Default size for directory name buffers.

const int Ionflux::Tools::DIR_BUFFER_SIZE_MAX = 65536
 

Maximum size for directory name buffers.

const char Ionflux::Tools::DIR_SEPARATOR = '/'
 

Directory separator.

const std::string Ionflux::Tools::MODULE_NAME = "Ionflux Tools"
 

Module name.

const std::string Ionflux::Tools::MODULE_VERSION = "0.2.3"
 

Module version.

const int Ionflux::Tools::READ_BUFFER_SIZE = 1024
 

Default size for read buffers.


Generated on Tue Mar 14 21:07:14 2006 for Ionflux Tools Class Library (iftools) by  doxygen 1.4.6