Ceylan Namespace Reference

This part of the Ceylan namespace gathers some convenient string manipulation facilities to be widely used. More...


Namespaces

namespace  Features
 Optional features can be requested and used, if available.
namespace  Log
namespace  Maths
 Contains all maths-related operations and constants.
namespace  Middleware
 Gathers all client/server constructs.
namespace  MVC
namespace  Network
 Basic network management, which is an optional Ceylan feature.
namespace  System
 General system calls and properties.
namespace  URI
 Allows to handle Uniform Resource Identifiers.
namespace  XML
 Gathers all XML-related operations, including parsing.

Classes

class  BasicResourceManager
 Manages basically a set of Resource instances: the basic Resource manager can store and afterwards retrieve resources on behalf of the caller, which will be able to associate a key, whose type is user-defined, to each resource. More...
class  CountedPointer
class  Exception
 This Exception class should be the mother of all exceptions raised by the Ceylan library. More...
class  Functor
class  Holder
class  LibtoolVersion
 Describes a Libtool interface version, with respects the form: (current version). More...
class  LocalizationException
 Exception raised in case of localization issues. More...
class  LocalizationSettings
 Describes the localization settings, notably for a given application. More...
class  RegExp
class  ResourceException
 Exception to be raised when a Resource encounters an abnormal situation. More...
class  Resource
 Void interface that has to be implemented by all Resources, so that they can be cached by a Resource manager. More...
class  ResourceManagerException
 Exception to be raised when a Resource manager encounters an abnormal situation. More...
class  ResourceManager
 Manages a set of Resource instances: the Resource manager can store and afterwards retrieve resources on behalf of the caller, which will associate a key, whose type is user-defined, to each resource. More...
class  SingletonException
 Exception raised by the Singleton class. More...
class  Singleton
 This helper class ensures that one and only one instance of a particular class exists, so that this instance is necessarily shared by all its users. More...
class  SmartResource
 Smart Resources are advanced resources, able to determine their size and clone themselves at will, for example so that they can be cached by a SmartResourceManager. More...
class  SmartResourceManager
 Manages a set of SmartResource instances: the smart Resource manager can behave like a basic Resource manager, if the 'NeverDrop' policy is used, or it can provide other advanced policies. More...
class  StringUtilsException
 Exception raised by string utils services. More...
class  TestException
 This Exception subclass is to be used only for test results. More...
class  TextBuffer
 Stores a sequence of texts, and allows to access the overall text according to various ways, either text-by-text or line-by-line. More...
class  Timestamp
 The purpose of this class is to record specific times, in order to be able to date events and compare their order, at least on a local computer. More...
class  TreeException
 Exception to be raised when a Tree operation failed. More...
class  TreeVisitor
 Tree-dedicated visitor. More...
class  TreeHeightAwareVisitor
 Tree-dedicated visitor, which may use the distance from the current node to the real root of the tree. More...
class  Tree
struct  Uint64
 This is really just a hack to prevent the compiler from complaining:. More...
class  UnicodeString
 Encapsulates a Unicode string to facilitate its management. More...
class  UtilsException
 Exception raised by common utils services. More...
class  CommandLineParseException
 Exception raised wheneve the parsing of a command line failed, for exemple when a given option requires more arguments than available in the command line. More...
class  VersionException
class  Version
 Describes a version, with respect to the form: (major version). More...
class  CallableEventSource
 Specialized event source which can be interrogated notably by specialized listeners, CallerEventListener, so that an event is propagated according to the pace chosen by the listener rather than by the one of the source. More...
class  CallerEventListener
 This specialized event listener does not provide any more method than basic event listeners do. More...
class  ClonableException
 Exception to be raised whenever cloning fails. More...
class  Clonable
 Interface that every object which can be cloned should implement. More...
class  Controller
 Controller of the Model-View-Controller (MVC) design pattern. More...
class  Countable
 This very simple class allows instance counting for all objects that inherit from it. More...
class  Displayable
 Interface that every object which can be displayed should implement. More...
class  EventException
 Exception to be raised when the event system encounters an abnormal situation. More...
class  Event
 Encapsulates the concept of high-level events. More...
class  EventListener
 Interface which should be implemented by all objects that are able to listen to events from at least one source. More...
class  EventSource
 Interface which should be implemented for all objects that should be able to send events to listeners. More...
class  Hashable
 Interface that every object able to compute a hash value should implement, to ease hashtable handling. More...
class  Identifier
 Mother class of all identifiers. More...
class  IdentifierNotAvailableException
 Exception to be raised when no identifier is available. More...
class  IdentifierOwner
 Interface that every object owning an identifier should implement. More...
class  InputDevice
 Input devices are sending informations to controllers so that they can animate the MVC framework. More...
class  LoadableException
 Exception to be raised whenever a loadable operation fails. More...
class  Loadable
 Interface that every object which can be loaded dynamically from file should implement. More...
class  LoadableWithContent
 Loadable template, useful to have a way of retrieving the loaded content directly according to its specific type. More...
class  LocatableException
 Exception to raise when Locatables are in trouble. More...
class  ReferentialChangedEvent
 Events used by a Locatable to notify its Locatable children that its referential changed. More...
class  Locatable
 Objects that should be locatable in space should inherit from this class. More...
class  Locatable2D
 Objects that should be locatable in a 2D-space should inherit from this class. More...
class  Lockable
 Interface which should be implemented for all objects that are able to be locked. More...
class  Measurable
 Interface which should be implemented for all objects whose size can be dynamically evaluated (at runtime). More...
class  MVCEvent
 Specialized event exchanged through Model-View-Controller (MVC) framework. More...
class  Model
 Model of the Model-View-Controller (MVC) design pattern. More...
class  Object
 This abstract mother class, root of the whole Ceylan object's hierarchy, plays a very similar role to java.lang.Object, namely describing the basic services every Ceylan object should be able to provide. More...
class  SerializationException
 This exception is raised when a serialization-related operation failed. More...
class  Serializable
 Interface that every object which can be serialized should implement. More...
class  TextDisplayable
 Interface that every Displayable able to show a textual representation of itself should implement. More...
class  TextIdentifier
 Text-only identifiers. More...
class  View
 View of the Model-View-Controller (MVC) design pattern. More...
class  VisitException
 Exception to be raised when a visit operation failed. More...
class  Visitable
 A Visitable instance is made to be subclassed. More...
class  Visitor
 A Visitor is a class designed to be subclassed. More...
class  ModuleException
 Raised whenever a module-related operation failed. More...
class  Module
 This module class provides basic services so that modules can be handled in an automatic, safe and easy way. More...
class  PluginException
 Raised whenever a plugin-related operation failed. More...
class  Plugin
 Plugin encapsulation for Dynamic Shared Object (DSO) management. More...

Typedefs

typedef Ceylan::Uint32 ReferenceCount
 The reference count type.
typedef Ceylan::Uint16 LocaleCode
typedef Ceylan::Uint32 ResourceID
 Resources can be designated based on a resource identifier.
typedef Ceylan::Uint8 Latin1Char
 Describes a character encoded in Latin-1 (ISO 8859-1 character set).
typedef std::string::size_type StringSize
 Datatype able to store all std::string sizes, could be as well Ceylan::Uint32 should size_type depend on the platform.
typedef Ceylan::Uint32 Height
 The height of a node, measured from its root.
typedef signed char Sint8
 Signed 8-bit int (signed char, GLbyte).
typedef unsigned char Uint8
 Unsigned 8-bit int (unsigned char, GLubyte, GLboolean).
typedef char Byte
 char, signed char, and unsigned char are different types.
typedef signed short Sint16
 Signed 16-bit int (signed short, GLshort).
typedef unsigned short Uint16
 Unsigned 16-bit int (unsigned short, GLushort).
typedef signed int Sint32
 Signed 32-bit int (signed int, GLint, GLsizei).
typedef unsigned int Uint32
 Unsigned 32-bit int (unsigned int, GLuint, GLenum, GLbitfield).
typedef signed long SignedLongInteger
 Variable able to store very large signed integer values.
typedef unsigned long UnsignedLongInteger
 Variable able to store very large positive integer values.
typedef struct Ceylan::Uint64 Sint64
typedef float Float32
 Now, floating point numbers.
typedef double Float64
 64-bit doubles a.k.a.
typedef long double LongFloat
 Variable able to store very large (signed) floating-point values.
typedef Ceylan::Uint16 Count
 80-bit long double are non standard.
typedef std::list
< Ceylan::Uint16 >::size_type 
ListSize
 Variable able to store element for list.
typedef Ceylan::Uint32 Flags
 Flags, fields of 32 bits.
typedef Ceylan::Uint16 Unicode
 Describes a 16-bit UNICODE value.
typedef Ceylan::Sint16 ExitCode
typedef Ceylan::Sint32 KeyChar
 Corresponds to a read character.
typedef Ceylan::Uint8 WeakHashCode
 Definition of a weak hash code.
typedef Ceylan::Uint32 StrongHashCode
 Definition of a strong hash code.

Enumerations

enum  VerbosityLevels { low, medium, high }
 Verbosity levels, used for instance by toString methods. More...

Functions

CEYLAN_DLL std::string toString (const void *pointer)
 Returns a user-friendly representation of a pointer.
CEYLAN_DLL std::string toString (bool value)
 Returns a user-friendly textual representation of a bool ("true" or "false").
CEYLAN_DLL std::string toString (Ceylan::Sint8 value, bool bitField=false)
 Converts the numerical value to a string.
CEYLAN_DLL std::string toString (Ceylan::Uint8 value, bool bitField=false)
 Converts the numerical value to a string.
CEYLAN_DLL std::string toString (Ceylan::Sint16 value, bool bitField=false)
 Converts the numerical value to a string.
CEYLAN_DLL std::string toString (Ceylan::Uint16 value, bool bitField=false)
 Converts the numerical value to a string.
CEYLAN_DLL std::string toString (Ceylan::Sint32 value, bool bitField=false)
 Converts the numerical value to a string.
CEYLAN_DLL std::string toString (Ceylan::Uint32 value, bool bitField=false)
 Converts the numerical value to a string.
CEYLAN_DLL std::string toString (Ceylan::UnsignedLongInteger value, bool bitField=false)
 Converts the numerical value to a string.
CEYLAN_DLL std::string toString (Ceylan::SignedLongInteger value, bool bitField=false)
 Converts the numerical value to a string.
CEYLAN_DLL std::string toHexString (Ceylan::UnsignedLongInteger value, bool prefix=true, Ceylan::Uint8 minDigits=1)
 Converts the numerical value to a string with the value in hexadecimal format.
CEYLAN_DLL std::string toString (Ceylan::Float32 value, Ceylan::Uint8 precision=Ceylan::DigitOutputPrecision)
 Converts the numerical value to a string, with specified precision, in fixed (not scientific) notation.
CEYLAN_DLL std::string toString (Ceylan::Float64 value, Ceylan::Uint8 precision=Ceylan::DigitOutputPrecision)
 Converts the numerical value to a string, with specified precision, in fixed (not scientific) notation.
CEYLAN_DLL std::string toString (Ceylan::LongFloat value, Ceylan::Uint8 precision=Ceylan::DigitOutputPrecision)
 Converts the numerical value to a string, with specified precision, in fixed (not scientific) notation.
CEYLAN_DLL std::string toString (Ceylan::VerbosityLevels level)
 Converts a verbosity level into a string.
CEYLAN_DLL std::string toString (const std::list< Ceylan::Uint32 > &intList)
CEYLAN_DLL std::string toString (const std::list< const void * > &pointerList)
CEYLAN_DLL std::string toNumericalString (Uint8 number)
CEYLAN_DLL std::string toString (char character)
CEYLAN_DLL int stringToUnsignedLong (const std::string &numericalString)
 This section focuses on conversion from standard strings to various numerical types.
CEYLAN_DLL void * stringToAddress (const std::string &addressString)
 Converts, if possible, a string containing a pointer into that pointer.
CEYLAN_DLL std::string formatStringList (const std::list< std::string > &stringList, bool surroundByTicks=false)
 Formats the specified list of strings, according to the specified format.
CEYLAN_DLL std::string formatStringMap (const std::map< std::string, std::string > &stringMap, bool surroundByTicks=false)
 Formats the specified map whose keys and values are strings, according to the specified format.
CEYLAN_DLL void display (const std::string &message)
 Displays the specified message to the user, on his console, if any.
CEYLAN_DLL void displayError (const std::string &errorMessage)
 Displays the specified error message to the user, on his console, if any.
CEYLAN_DLL StringSize countChars (const std::string &aString, char targetChar)
 Counts how many characters targetChar can be found in aString.
CEYLAN_DLL std::string reverse (const std::string &source)
 Returns the reversed source string, as read from right to left.
CEYLAN_DLL char * getNonConstCharFrom (const std::string &source)
CEYLAN_DLL StringSize substituteInString (std::string &targetString, const std::string &toBeReplaced, const std::string &replacement)
 Substitutes, in string targetString, the string toBeReplaced with the string replacement.
CEYLAN_DLL std::string substituteIn (const std::string &sourceString, const std::string &toBeReplaced, const std::string &replacement)
 Returns a new string, corresponding to the source string in which the substring toBeReplaced is replaced by the substring replacement.
CEYLAN_DLL bool isLetter (char targetChar)
 Returns whether specified character is a letter, i.e.
CEYLAN_DLL bool isFigure (char targetChar)
 Returns whether specified character is a figure, i.e.
CEYLAN_DLL bool isAlphanumeric (char targetChar)
 Returns whether specified character is a letter or a figure, i.e.
CEYLAN_DLL bool isPunctuation (char targetChar)
 Returns whether specified character is a punctuation character, i.e.
CEYLAN_DLL bool isWhitespace (char targetChar)
 Returns whether specified character is a whitespace character, i.e.
CEYLAN_DLL std::string toUppercase (const std::string &text)
 Returns specified text with all the letters translated to uppercase, other characters being left untouched.
CEYLAN_DLL std::string encodeToHTML (const std::string &message)
 Encodes the specified string by converting it into a valid HTML text, replacing special characters such as '<', '>' or '&' by their corresponding HTML codes.
CEYLAN_DLL std::string encodeToPhonetic (const std::string &message)
 Encodes the specified string in 'phonetic alphabet', also known as 'police letter alphabet' or 'analogy international code', which converts letters such as 'a', 'b', 'c' to respectively 'alpha', 'bravo', 'charlie' etc.
CEYLAN_DLL std::string encodeToROT13 (const std::string &message)
 Encodes the specified string in 'rot13', a very simple substitution cipher.
CEYLAN_DLL std::string demangleSymbol (const std::string &symbol)
 Demangles a C++ symbol so that it becomes human-readable.
CEYLAN_DLL std::list< std::string > split (const std::string &stringToSplit, char splittingChar)
CEYLAN_DLL std::string join (const std::list< std::string > &toJoin, const std::string &joiningString)
CEYLAN_DLL std::list< std::string > splitIntoWords (const std::string &sentenceToSplit)
 Splits the specified sentence into a list of words.
CEYLAN_DLL std::list< std::string > splitIntoParagraphs (const std::string &textToSplit)
 Splits the specified text into a list of paragraphs.
template<typename T >
std::string toString (const std::list< T > &targetList)
 Returns a string describing the specified list.
template<typename T >
void stringToObject (const std::string &source, T &object)
 String to object (deserialization).
 CEYLAN_COMPILE_TIME_ASSERT (uint8, sizeof(Uint8)==1)
 CEYLAN_COMPILE_TIME_ASSERT (sint8, sizeof(Sint8)==1)
 CEYLAN_COMPILE_TIME_ASSERT (uint16, sizeof(Uint16)==2)
 CEYLAN_COMPILE_TIME_ASSERT (sint16, sizeof(Sint16)==2)
 CEYLAN_COMPILE_TIME_ASSERT (uint32, sizeof(Uint32)==4)
 CEYLAN_COMPILE_TIME_ASSERT (sint32, sizeof(Sint32)==4)
 CEYLAN_COMPILE_TIME_ASSERT (float32, sizeof(Float32)==4)
 CEYLAN_COMPILE_TIME_ASSERT (uint64, sizeof(Uint64)==8)
 CEYLAN_COMPILE_TIME_ASSERT (sint64, sizeof(Sint64)==8)
 CEYLAN_COMPILE_TIME_ASSERT (float64, sizeof(Float64)==8)
CEYLAN_DLL const
Ceylan::LibtoolVersion
GetVersion ()
 Returns the version of the Ceylan library currently linked.
Ceylan::Uint16 swapBytes (Ceylan::Uint16 arg)
 Swaps the two bytes of the specified 16 bit argument.
CEYLAN_DLL void parseCommandLineOptions (std::string &readExecutableName, std::list< std::string > &readOptions, Ceylan::Uint16 argumentCount, char **argumentVector)
 Parses arguments given to an executable (argc, argv) and translates it into an executable name and a set of option words, stored in specified list of strings.
CEYLAN_DLL void emergencyShutdown (const std::string &message) __attribute__((noreturn))
 Stops immediatly the program, without performing any cleanup.
CEYLAN_DLL bool keyboardHit ()
 Tells whether a key has been hit, and consequently is waiting to be read.
CEYLAN_DLL KeyChar getChar ()
 Returns a new key being hit.
CEYLAN_DLL KeyChar waitForKey (const std::string &message=DefaultWaitForKeyMessage)
 Waits for a key to be pressed.
template<class T , class Element >
void split (const T &toSplit, const Element &delimiter, std::list< T > &result)
 Template function splitting a container according to a delimiter.
template<class T , class Predicate >
void split_if (const T &toSplit, Predicate &predicate, std::list< T > &result)
CEYLAN_DLL void checkpoint (const std::string &message="")
 Prints in standard output a checkpoint message, with a checkpoint count incremented at each call, starting from 1.
CEYLAN_DLL void breakpoint (const std::string &message="")
 Prints in standard output a breakpoint message, with a breakpoint count incremented at each call, starting from 1, and then waits for the user to press a key.
void byteswap (Ceylan::Uint64 &toSwap)
 Swaps the bytes of specified 64-bit number according to the conventions of a change of endianness.

Variables

CEYLAN_DLL const std::string actualCeylanHeaderLibtoolVersion = "0.7.0"
 This is the libtool version of the Ceylan headers, as defined in the configure step.
CEYLAN_DLL const Ceylan::Uint16 DigitOutputPrecision = 40
 This section focuses on conversion from various numerical types to standard strings.
CEYLAN_DLL const std::string HexDigits = "0123456789ABCDEF"
 The hexadecimal digits: 0123456789ABCDEF.
CEYLAN_DLL const std::string BatchTestOption = "--batch"
 This is the name of the option which is to be passed to tests run from the command line, so that they run in batch mode.
CEYLAN_DLL Ceylan::Sint8 Sint8Min = numeric_limits<Ceylan::Sint8>::min()
CEYLAN_DLL Ceylan::Sint8 Sint8Max = numeric_limits<Ceylan::Sint8>::max()
CEYLAN_DLL Ceylan::Uint8 Uint8Min = numeric_limits<Ceylan::Uint8>::min()
CEYLAN_DLL Ceylan::Uint8 Uint8Max = numeric_limits<Ceylan::Uint8>::max()
CEYLAN_DLL Ceylan::Byte ByteMin = numeric_limits<Ceylan::Byte>::min()
CEYLAN_DLL Ceylan::Byte ByteMax = numeric_limits<Ceylan::Byte>::max()
CEYLAN_DLL Ceylan::Sint16 Sint16Min = numeric_limits<Ceylan::Sint16>::min()
CEYLAN_DLL Ceylan::Sint16 Sint16Max = numeric_limits<Ceylan::Sint16>::max()
CEYLAN_DLL Ceylan::Uint16 Uint16Min = numeric_limits<Ceylan::Uint16>::min()
CEYLAN_DLL Ceylan::Uint16 Uint16Max = numeric_limits<Ceylan::Uint16>::max()
CEYLAN_DLL Ceylan::Sint32 Sint32Min = numeric_limits<Ceylan::Sint32>::min()
CEYLAN_DLL Ceylan::Sint32 Sint32Max = numeric_limits<Ceylan::Sint32>::max()
CEYLAN_DLL Ceylan::Uint32 Uint32Min = numeric_limits<Ceylan::Uint32>::min()
CEYLAN_DLL Ceylan::Uint32 Uint32Max = numeric_limits<Ceylan::Uint32>::max()
CEYLAN_DLL
Ceylan::SignedLongInteger 
SignedLongIntegerMin = numeric_limits<Ceylan::SignedLongInteger>::min()
CEYLAN_DLL
Ceylan::SignedLongInteger 
SignedLongIntegerMax = numeric_limits<Ceylan::SignedLongInteger>::max()
CEYLAN_DLL
Ceylan::UnsignedLongInteger 
UnsignedLongIntegerMin = numeric_limits<Ceylan::UnsignedLongInteger>::min()
CEYLAN_DLL
Ceylan::UnsignedLongInteger 
UnsignedLongIntegerMax = numeric_limits<Ceylan::UnsignedLongInteger>::max()
CEYLAN_DLL Ceylan::Float32 Float32Min = -numeric_limits<Ceylan::Float32>::max()
CEYLAN_DLL Ceylan::Float32 Float32Max = numeric_limits<Ceylan::Float32>::max()
CEYLAN_DLL Ceylan::Float64 Float64Min = -numeric_limits<Ceylan::Float64>::max()
CEYLAN_DLL Ceylan::Float64 Float64Max = numeric_limits<Ceylan::Float64>::max()
CEYLAN_DLL Ceylan::LongFloat LongFloatMin = -numeric_limits<Ceylan::LongFloat>::max()
CEYLAN_DLL Ceylan::LongFloat LongFloatMax = numeric_limits<Ceylan::LongFloat>::max()
CEYLAN_DLL const ExitCode ExitSuccess = 0
 Return value to be used on success.
CEYLAN_DLL const ExitCode ExitFailure = 1
 Return value to be used on failure (any non zero value could be used).
CEYLAN_DLL const ExitCode ExitDebugFailure = 10
 Return value to be used on debug assertion failure.
CEYLAN_DLL const std::string DefaultWaitForKeyMessage
 Default string to display when waiting for a key to be hit.


Detailed Description

This part of the Ceylan namespace gathers some convenient string manipulation facilities to be widely used.

Fallback file implementation, always included to avoid dependency on a config.h-style header.

UNIX-style POSIX reliable signal management.

This part of the Ceylan namespace gathers some convenient conventions to be widely used.

This part of the Ceylan namespace gathers very limited Unicode generic facilities, including UTF-8s.

Cross-platform definition of the main Ceylan common basic data types.

The system default locale is the one being used.

See also:
CeylanOperators.h for operators appending numerical values to strings.
These basic data types depend on the platform Ceylan will run on: an unsigned short on a platform may be internally the same as an unsigned int on another platform, it has to be known at compile time.

These informations may come from:

Note:
The signal feature must be available to successfully manage signals.
See also:
Features::areSignalsSupported
include <iosfwd> cannot be used since we need real (not forward) declarations.


Typedef Documentation

typedef char Ceylan::Byte

char, signed char, and unsigned char are different types.

Hence if:

signed char * u ; char * v = 0 ;

then u = v ;

or

u = static_cast<signed char *>( v ) ;

will trigger a compiler error, invalid conversion or static_cast from type `char*' to type `signed char*'

Hence we defined Ceylan::Byte to trace the fact we are using internally char (returned for example by the c_str() method of std::string) without knowing whether it is signed or not, hence without being able to specify Ceylan::Uint8 or Ceylan::Sint8.

At least under 32-bit GNU/Linux, Ceylan::Byte is like a signed char.

Definition at line 164 of file CeylanTypes.h.

80-bit long double are non standard.

Ranges from -3.4*10^-4932 to 3.4*10^4932 (both included).

Mantissa is coded 64 in bits, exponent in 15 bits, sign in 1 bit.

Precision is at least 17 digits after the decimal point. 96-bit long double are non standard. Variable able to store element counts, such as the number of CD-ROM drives attached to a system, for example.

Definition at line 501 of file CeylanTypes.h.

Definition at line 188 of file CeylanUtils.h.

Flags, fields of 32 bits.

Definition at line 519 of file CeylanTypes.h.

typedef float Ceylan::Float32

Now, floating point numbers.

Note:
They should be named, checked and compared not only according to their size in memory, but also according to the precision of their mantissa, etc. 32-bit floats (GLfloat, GLclampf).
Ranges from -3.4*10^-38 to 3.4*10^38 (both included).

Mantissa is coded in 23 bits, exponent in 8 bits, sign in 1 bit.

Precision is at least 6 digits after the decimal point.

Definition at line 395 of file CeylanTypes.h.

typedef double Ceylan::Float64

64-bit doubles a.k.a.

long floats (GLdouble, GLclampd).

Ranges from -1.7*10^-308 to 1.7*10^308 (both included).

Mantissa is coded in 52 bits, exponent in 11 bits, sign in 1 bit.

Precision is at least 15 digits after the decimal point.

Definition at line 411 of file CeylanTypes.h.

The height of a node, measured from its root.

Definition at line 116 of file CeylanTree.h.

Corresponds to a read character.

Definition at line 266 of file CeylanUtils.h.

Describes a character encoded in Latin-1 (ISO 8859-1 character set).

Definition at line 86 of file CeylanStringUtils.h.

typedef std::list<Ceylan::Uint16>::size_type Ceylan::ListSize

Variable able to store element for list.

Using 'CeylanUint16' just because a datatype has to be specified, hopefully the size does not depend on the listed type.

See also:
CeylanStringUtils.h for StringSize

Definition at line 514 of file CeylanTypes.h.

Definition at line 55 of file CeylanLocale.h.

typedef long double Ceylan::LongFloat

Variable able to store very large (signed) floating-point values.

Actual Min/Max ranges depend on the platform.

See also:
testCeylanBasicDatatypes.cc
At least under 32-bit GNU/Linux, Ceylan::LongFloat uses 12 bytes.

Definition at line 445 of file CeylanTypes.h.

The reference count type.

Definition at line 97 of file CeylanCountedPointer.h.

Resources can be designated based on a resource identifier.

Definition at line 58 of file CeylanResource.h.

typedef signed long Ceylan::SignedLongInteger

Variable able to store very large signed integer values.

Actual Min/Max ranges depend on the platform.

See also:
testCeylanBasicDatatypes.cc
At least under 32-bit GNU/Linux, Ceylan::SignedLongInteger uses 4 bytes.

Definition at line 249 of file CeylanTypes.h.

typedef signed short Ceylan::Sint16

Signed 16-bit int (signed short, GLshort).

Ranges from -32 768 to 32 767 (both included).

Could be as well, if inttypes.h was used: typedef int16_t Sint16 ;

Definition at line 179 of file CeylanTypes.h.

typedef signed int Ceylan::Sint32

Signed 32-bit int (signed int, GLint, GLsizei).

Ranges from -2 147 483 648 to 2 147 483 647 (both included).

Could be as well, if inttypes.h was used: typedef int32_t Sint32 ;

Definition at line 210 of file CeylanTypes.h.

typedef signed char Ceylan::Sint8

Signed 8-bit int (signed char, GLbyte).

Ranges from -128 to 127 (both included).

Could be as well, if inttypes.h was used: typedef int8_t Sint8 ;

Definition at line 116 of file CeylanTypes.h.

typedef std::string::size_type Ceylan::StringSize

Datatype able to store all std::string sizes, could be as well Ceylan::Uint32 should size_type depend on the platform.

Definition at line 95 of file CeylanStringUtils.h.

Definition of a strong hash code.

This hash code is described as strong since it can take 2^32 different values.

It is especially useful in order to compare for equality two objects, since the probability they have the same hash code should be low.

Definition at line 65 of file CeylanHashable.h.

typedef unsigned short Ceylan::Uint16

Unsigned 16-bit int (unsigned short, GLushort).

Ranges from 0 to 65 535 (both included).

Could be as well, if inttypes.h was used: typedef uint16_t Uint16 ;

Definition at line 194 of file CeylanTypes.h.

typedef unsigned int Ceylan::Uint32

Unsigned 32-bit int (unsigned int, GLuint, GLenum, GLbitfield).

Ranges from 0 to 4 294 967 295 (both included).

Could be as well, if inttypes.h was used: typedef uint32_t Uint32 ;

Definition at line 231 of file CeylanTypes.h.

typedef unsigned char Ceylan::Uint8

Unsigned 8-bit int (unsigned char, GLubyte, GLboolean).

Ranges from 0 to 255 (both included).

Could be as well, if inttypes.h was used: typedef uint8_t Uint8 ;

Definition at line 131 of file CeylanTypes.h.

Describes a 16-bit UNICODE value.

Definition at line 50 of file CeylanUnicode.h.

typedef unsigned long Ceylan::UnsignedLongInteger

Variable able to store very large positive integer values.

Actual Min/Max ranges depend on the platform.

See also:
testCeylanBasicDatatypes.cc
At least under 32-bit GNU/Linux, Ceylan::UnsignedLongIntegerMin uses 4 bytes.

Definition at line 267 of file CeylanTypes.h.

Definition of a weak hash code.

This hash code is described as weak since it can take only 256 different values.

It is especially useful for hash tables that could not have thousands of buckets.

Definition at line 51 of file CeylanHashable.h.


Enumeration Type Documentation

Verbosity levels, used for instance by toString methods.

Enumerator:
low 
medium 
high 

Definition at line 37 of file CeylanDisplayable.h.


Function Documentation

void Ceylan::breakpoint ( const std::string &  message = ""  ) 

Prints in standard output a breakpoint message, with a breakpoint count incremented at each call, starting from 1, and then waits for the user to press a key.

Note:
Might be useful for light debugging.

Definition at line 498 of file CeylanUtils.cc.

References display(), toString(), and waitForKey().

void Ceylan::byteswap ( Ceylan::Uint64 toSwap  )  [inline]

Swaps the bytes of specified 64-bit number according to the conventions of a change of endianness.

Note:
This function is declared both for Ceylan::Uint64 and for Ceylan::Sint64.

Definition at line 138 of file CeylanEndianness.h.

References ceylan_bswap_32, ceylan_bswap_64, Ceylan::Uint64::hi, and Ceylan::Uint64::lo.

Referenced by Ceylan::System::InputStream::readFloat64(), and Ceylan::System::OutputStream::writeFloat64().

Ceylan::CEYLAN_COMPILE_TIME_ASSERT ( float64  ,
sizeof(Float64)  = =8 
)

Ceylan::CEYLAN_COMPILE_TIME_ASSERT ( sint64  ,
sizeof(Sint64)  = =8 
)

Ceylan::CEYLAN_COMPILE_TIME_ASSERT ( uint64  ,
sizeof(Uint64)  = =8 
)

Ceylan::CEYLAN_COMPILE_TIME_ASSERT ( float32  ,
sizeof(Float32)  = =4 
)

Ceylan::CEYLAN_COMPILE_TIME_ASSERT ( sint32  ,
sizeof(Sint32)  = =4 
)

Ceylan::CEYLAN_COMPILE_TIME_ASSERT ( uint32  ,
sizeof(Uint32)  = =4 
)

Ceylan::CEYLAN_COMPILE_TIME_ASSERT ( sint16  ,
sizeof(Sint16)  = =2 
)

Ceylan::CEYLAN_COMPILE_TIME_ASSERT ( uint16  ,
sizeof(Uint16)  = =2 
)

Ceylan::CEYLAN_COMPILE_TIME_ASSERT ( sint8  ,
sizeof(Sint8)  = =1 
)

Ceylan::CEYLAN_COMPILE_TIME_ASSERT ( uint8  ,
sizeof(Uint8)  = =1 
)

void Ceylan::checkpoint ( const std::string &  message = ""  ) 

Prints in standard output a checkpoint message, with a checkpoint count incremented at each call, starting from 1.

Note:
Might be useful for light debugging.

Definition at line 480 of file CeylanUtils.cc.

References display(), and toString().

StringSize Ceylan::countChars ( const std::string &  aString,
char  targetChar 
)

Counts how many characters targetChar can be found in aString.

Definition at line 90 of file CeylanStringUtils.cc.

Referenced by Ceylan::Log::ObjectIdentifier::generateFromChannelName(), Ceylan::Network::getFQDNFromDNSEntry(), and Ceylan::Network::getMostPreciseLocalHostName().

string Ceylan::demangleSymbol ( const std::string &  symbol  ) 

Demangles a C++ symbol so that it becomes human-readable.

Example: 'N3One3Two11ExampleFourE' should be converted in 'OneTwo::ExampleFour'.

Note:
This function operates only on symbols mangled by g++, version 3.x or higher. The mangling can be changed is newer g++ versions.

Definition at line 465 of file CeylanStringUtils.cc.

References DISPLAY_DEBUG_DEMANGLE, stringToUnsignedLong(), and toString().

Referenced by Ceylan::Log::LogAggregator::demangle().

void Ceylan::display ( const std::string &  message  ) 

Displays the specified message to the user, on his console, if any.

Note:
On some platforms (ex: the Nintendo DS), the console must have been initialized beforehand.
See also:
System::Console::Initialize
Exceptions:
StringUtilsException if the operation is not available on this platform.

Definition at line 857 of file CeylanStringUtils.cc.

Referenced by breakpoint(), checkpoint(), displayError(), waitForKey(), and Ceylan::Log::LogAggregatorConsole::~LogAggregatorConsole().

void Ceylan::displayError ( const std::string &  errorMessage  ) 

Displays the specified error message to the user, on his console, if any.

Exceptions:
StringUtilsException if the operation is not available on this platform.

Definition at line 884 of file CeylanStringUtils.cc.

References display().

void Ceylan::emergencyShutdown ( const std::string &  message  ) 

Stops immediatly the program, without performing any cleanup.

Note:
Call me when run-time abnormal behaviours occurs, such as state incoherence, that shows that some code is faulty.

That kind of function is useful, since raising a special exception would oblige declaring it everywhere where runtime checks are performed, even if that kind of checking is often done only in debug mode.

Definition at line 188 of file CeylanUtils.cc.

References ExitFailure, Ceylan::Log::LogPlug::fatal(), Ceylan::Log::LogPlug::IsFatalLogSourceAvailable(), and Ceylan::Log::LogPlug::StopService().

Referenced by Ceylan::SmartResourceManager< Key >::applyPolicy(), Ceylan::IdentifierOwner::deleteIdentifier(), Ceylan::SmartResourceManager< Key >::getClone(), Ceylan::Locatable::getGlobalReferential(), getNonConstCharFrom(), GetVersion(), Ceylan::Log::LogHolder::LogHolder(), Ceylan::Locatable2D::updateFromFather(), and Ceylan::Countable::~Countable().

string Ceylan::encodeToHTML ( const std::string &  message  ) 

Encodes the specified string by converting it into a valid HTML text, replacing special characters such as '<', '>' or '&' by their corresponding HTML codes.

Definition at line 321 of file CeylanStringUtils.cc.

Referenced by Ceylan::Log::LogAggregatorHTML::aggregate(), Ceylan::XML::XMLParser::handleNextElement(), Ceylan::XML::XMLMarkup::toString(), Ceylan::Log::LogAggregatorHTML::WriteChannelFooter(), and Ceylan::Log::LogAggregatorHTML::WriteChannelHeader().

string Ceylan::encodeToPhonetic ( const std::string &  message  ) 

Encodes the specified string in 'phonetic alphabet', also known as 'police letter alphabet' or 'analogy international code', which converts letters such as 'a', 'b', 'c' to respectively 'alpha', 'bravo', 'charlie' etc.

Non alphabetic characters (not in a-z, A-Z) are left untouched. Uppercase and lowercase letters have respectively their translated word in uppercase and lowercase.

Definition at line 366 of file CeylanStringUtils.cc.

References generalUtils::false, toUppercase(), and generalUtils::true.

string Ceylan::encodeToROT13 ( const std::string &  message  ) 

Encodes the specified string in 'rot13', a very simple substitution cipher.

See also:
http://en.wikipedia.org/wiki/ROT13
Non alphabetic characters (not in a-z, A-Z) are left untouched.

Note:
ROT13 is its own inverse, that some function can be used for decoding as well.

Definition at line 429 of file CeylanStringUtils.cc.

std::string Ceylan::formatStringList ( const std::list< std::string > &  stringList,
bool  surroundByTicks = false 
)

Formats the specified list of strings, according to the specified format.

Text output format is determined from overall settings: the list will be output with HTML tags, or use raw formatting, accordingly.

Parameters:
stringList the list of strings to format.
surroundByTicks tells whether each entry of the list should be surrounded by ticks on output.
Note:
if the STL was smarter, it would have allowed arguments whose type is std::list<std::string> in std::list<const std::string>. However no parameter of type 'const std::list<const std::string> &' can be used, since std::list elements have to be able to be assigned, hence 'stdlist<const X>' cannot be used.

Definition at line 762 of file CeylanStringUtils.cc.

References Ceylan::TextDisplayable::GetOutputFormat(), and Ceylan::TextDisplayable::html.

Referenced by Ceylan::Features::describeAvailableFeatures(), Ceylan::Maths::Random::RandomGeneratorFromPDF::displayProbabilities(), Ceylan::Tree< Content >::toString(), Ceylan::System::Thread::toString(), Ceylan::TextDisplayable::ToString(), Ceylan::TextBuffer::toString(), Ceylan::SmartResourceManager< Key >::toString(), Ceylan::Log::ObjectChannel::toString(), Ceylan::Network::HostDNSEntry::toString(), Ceylan::Network::MultiplexedServerStreamSocket::toString(), Ceylan::Network::MultiplexedProtocolBasedStreamServer::toString(), Ceylan::Module::toString(), Ceylan::Log::LogPlug::ToString(), Ceylan::Log::LogMessage::toString(), Ceylan::Log::LogChannel::toString(), Ceylan::LocalizationSettings::toString(), Ceylan::MVC::MultipleViewGenericModel< ActualView >::toString(), Ceylan::MVC::MultipleViewModel::toString(), Ceylan::System::FileLocator::toString(), Ceylan::EventSource::toString(), Ceylan::BasicResourceManager< Key >::toString(), and Ceylan::Version::Version().

std::string Ceylan::formatStringMap ( const std::map< std::string, std::string > &  stringMap,
bool  surroundByTicks = false 
)

Formats the specified map whose keys and values are strings, according to the specified format.

Text output format is determined from overall settings: the map will be output with HTML tags, or use raw formatting, accordingly.

Parameters:
stringMap the map of strings to format.
surroundByTicks tells whether each entry of the list should be surrounded by ticks on output.
Note:
if the STL was smarter, it would have allowed both const and non-const arguments.

Definition at line 807 of file CeylanStringUtils.cc.

References Ceylan::TextDisplayable::GetOutputFormat(), and Ceylan::TextDisplayable::html.

Referenced by Ceylan::XML::XMLParser::InterpretXMLDeclaration().

KeyChar Ceylan::getChar (  ) 

Returns a new key being hit.

Waits, if necessary, until this occurs.

On the Nintendo DS ARM9, returns the key state.

Exceptions:
UtilsException if the operation is not available or could not be performed correctly.

Definition at line 318 of file CeylanUtils.cc.

References Ceylan::System::atomicSleep(), dataUtils::c, and Ceylan::System::InitializeInterrupts().

Referenced by Ceylan::System::Console::goInteractive(), and waitForKey().

char * Ceylan::getNonConstCharFrom ( const std::string &  source  ) 

Definition at line 131 of file CeylanStringUtils.cc.

References emergencyShutdown().

const Ceylan::LibtoolVersion & Ceylan::GetVersion (  ) 

Returns the version of the Ceylan library currently linked.

Definition at line 136 of file CeylanUtils.cc.

References CEYLAN_LIBTOOL_VERSION, dataUtils::e, emergencyShutdown(), and Ceylan::Exception::toString().

Referenced by Ceylan::Log::LogPlug::CreateBasicPlug().

bool Ceylan::isAlphanumeric ( char  targetChar  ) 

Returns whether specified character is a letter or a figure, i.e.

is in [a-z], [A-Z] or [0-9].

Parameters:
targetChar the character to test.
Returns:
true iff targetChar is a letter or a figure.

Definition at line 267 of file CeylanStringUtils.cc.

References generalUtils::false, and generalUtils::true.

bool Ceylan::isFigure ( char  targetChar  ) 

Returns whether specified character is a figure, i.e.

is in [0-9].

Parameters:
targetChar the character to test.
Returns:
true iff targetChar is a figure.

Definition at line 255 of file CeylanStringUtils.cc.

References generalUtils::false, and generalUtils::true.

bool Ceylan::isLetter ( char  targetChar  ) 

Returns whether specified character is a letter, i.e.

is in [a-z] or [A-Z].

Parameters:
targetChar the character to test.
Returns:
true iff targetChar is a letter.

Definition at line 243 of file CeylanStringUtils.cc.

References generalUtils::false, and generalUtils::true.

Referenced by Ceylan::XML::XMLParser::InterpretLowerThanSequence(), Ceylan::System::StandardFileSystemManager::isAbsolutePath(), and Ceylan::XML::XMLParser::ParseAttributeSequence().

bool Ceylan::isPunctuation ( char  targetChar  ) 

Returns whether specified character is a punctuation character, i.e.

is not a letter, not a figure, not a whitespace.

Parameters:
targetChar the character to test.
Returns:
true iff targetChar is a punctuation character.

Definition at line 279 of file CeylanStringUtils.cc.

References generalUtils::false, and generalUtils::true.

bool Ceylan::isWhitespace ( char  targetChar  ) 

Returns whether specified character is a whitespace character, i.e.

is in [0x09;0x0D;0x20].

Parameters:
targetChar the character to test.
Returns:
true iff targetChar is a whitespace character.

Definition at line 291 of file CeylanStringUtils.cc.

References generalUtils::false, and generalUtils::true.

Referenced by Ceylan::XML::XMLParser::handleNextElement(), Ceylan::XML::XMLParser::ParseAttributeSequence(), and Ceylan::System::InputStream::skipWhitespaces().

string Ceylan::join ( const std::list< std::string > &  toJoin,
const std::string &  joiningString 
)

Definition at line 638 of file CeylanStringUtils.cc.

Referenced by toString().

bool Ceylan::keyboardHit (  ) 

Tells whether a key has been hit, and consequently is waiting to be read.

All key presses are taken into account, no only the new transitions from released to pressed.

Exceptions:
UtilsException if the operation is not available or could not be performed correctly.
Note:
For the Nintendo DS, the libdns scanKeys function is supposed to be called regularly outside of this function (ex: once per main loop).

Definition at line 211 of file CeylanUtils.cc.

References dataUtils::c, and Ceylan::System::InitializeInterrupts().

Referenced by waitForKey().

void Ceylan::parseCommandLineOptions ( std::string &  readExecutableName,
std::list< std::string > &  readOptions,
Ceylan::Uint16  argumentCount,
char **  argumentVector 
)

Parses arguments given to an executable (argc, argv) and translates it into an executable name and a set of option words, stored in specified list of strings.

Arguments are easier to take into account this way.

Parameters:
readExecutableName the string where this function will store the executable name.
readOptions the list of strings where this function will store the options, one word by string, in the same order as they were in the command line.
argumentCount the number of arguments (argc).
argumentVector the array of option strings (char ** argv).
See also:
testCeylanCommandLineOptions.cc

Definition at line 174 of file CeylanUtils.cc.

std::string Ceylan::reverse ( const std::string &  source  ) 

Returns the reversed source string, as read from right to left.

Example: "Ceylan" becomes "nalyeC"

Definition at line 107 of file CeylanStringUtils.cc.

Referenced by toHexString(), and toString().

template<class T , class Element >
void Ceylan::split ( const T &  toSplit,
const Element &  delimiter,
std::list< T > &  result 
) [inline]

Template function splitting a container according to a delimiter.

This function takes a container (e.g. a string), a delimiter (e.g. a char), and appends to the list of containers the ones that result from splitting the first container.

Its obvious use is for splitting strings, but the function has been made a template in order to be able to: 1. split strings using any kind of char 2. split anything else (list of events, for example)

The function may be extended by allowing a container to be used as the delimiter (e.g. using a word as a delimiter).

Parameters:
toSplit container to be split.
delimiter delimiter between the slices.
result list of containers to which will be appended the results of the split.
Author:
Marc Petit.

Definition at line 425 of file CeylanUtils.h.

References generalUtils::temp.

list< string > Ceylan::split ( const std::string &  stringToSplit,
char  splittingChar 
)

template<class T , class Predicate >
void Ceylan::split_if ( const T &  toSplit,
Predicate &  predicate,
std::list< T > &  result 
) [inline]

Definition at line 494 of file CeylanUtils.h.

References generalUtils::temp.

std::list< string > Ceylan::splitIntoParagraphs ( const std::string &  textToSplit  ) 

Splits the specified text into a list of paragraphs.

Paragraphs are found based on the '
' character which acts as a paragraph separator.

Parameters:
textToSplit the text to split into paragraphs.
Returns:
a list of paragraphs. Paragraphs may be empty (two separators in a row).

Definition at line 753 of file CeylanStringUtils.cc.

References split().

Referenced by Ceylan::TextBuffer::createAdvancedGridFrom().

std::list< string > Ceylan::splitIntoWords ( const std::string &  sentenceToSplit  ) 

Splits the specified sentence into a list of words.

Words are found based on the space (' ') character, which acts as a separator. However n>1 spaces in a row (ex: 'abc def', n=3) should result in a word made of

  • if n=2, 0 space (empty word, '')
  • if n>2, (n-2) spaces ( n=3: ['abc', ' ', 'def' ] instead of ['abc', '', '', 'def']).

Parameters:
sentenceToSplit the sentence to split into words.
Returns:
a list of paragraphs. Paragraphs may be empty (two separators in a row).

Definition at line 666 of file CeylanStringUtils.cc.

References split(), and substituteInString().

Referenced by Ceylan::TextBuffer::createAdvancedGridFrom().

void * Ceylan::stringToAddress ( const std::string &  addressString  ) 

Converts, if possible, a string containing a pointer into that pointer.

Definition at line 1381 of file CeylanOperators.cc.

Referenced by Ceylan::Log::ObjectIdentifier::generateFromChannelName().

template<typename T >
void Ceylan::stringToObject ( const std::string &  source,
T &  object 
) [inline]

String to object (deserialization).

Note:
No CEYLAN_DLL for templates.

Definition at line 521 of file CeylanStringUtils.h.

int Ceylan::stringToUnsignedLong ( const std::string &  numericalString  ) 

This section focuses on conversion from standard strings to various numerical types.

Converts, if possible, a string containing an integer number into that number.

Definition at line 1359 of file CeylanOperators.cc.

Referenced by demangleSymbol(), Ceylan::Log::ObjectIdentifier::generateFromChannelName(), and Ceylan::Version::Version().

string Ceylan::substituteIn ( const std::string &  sourceString,
const std::string &  toBeReplaced,
const std::string &  replacement 
)

Returns a new string, corresponding to the source string in which the substring toBeReplaced is replaced by the substring replacement.

Returns:
the new string.

Definition at line 229 of file CeylanStringUtils.cc.

References substituteInString().

StringSize Ceylan::substituteInString ( std::string &  targetString,
const std::string &  toBeReplaced,
const std::string &  replacement 
)

Substitutes, in string targetString, the string toBeReplaced with the string replacement.

Returns:
the number of substitutions performed.

Definition at line 179 of file CeylanStringUtils.cc.

Referenced by Ceylan::Log::LogAggregatorHTML::aggregate(), splitIntoWords(), substituteIn(), Ceylan::Log::LogAggregatorHTML::WriteChannelFooter(), and Ceylan::Log::LogAggregatorHTML::WriteChannelHeader().

Ceylan::Uint16 Ceylan::swapBytes ( Ceylan::Uint16  arg  )  [inline]

Swaps the two bytes of the specified 16 bit argument.

See also:
SDL (SDL_endian.h) for assembly-optimized versions.

Definition at line 100 of file CeylanUtils.h.

Referenced by Ceylan::UnicodeString::copy().

string Ceylan::toHexString ( Ceylan::UnsignedLongInteger  value,
bool  prefix = true,
Ceylan::Uint8  minDigits = 1 
)

Converts the numerical value to a string with the value in hexadecimal format.

Parameters:
value the value to convert in hexadecimal.
prefix tells whether the hexadecimal prefix ("0x") should be added.
minDigits tells which minimal number of digits should be put in the returned string (prefix not included). Leading zeroes are added to reach that number.

Definition at line 1134 of file CeylanOperators.cc.

References HexDigits, and reverse().

string Ceylan::toNumericalString ( Uint8  number  ) 

template<typename T >
std::string Ceylan::toString ( const std::list< T > &  targetList  )  [inline]

Returns a string describing the specified list.

Definition at line 499 of file CeylanStringUtils.h.

References join(), and toString().

string Ceylan::toString ( char  character  ) 

Definition at line 1346 of file CeylanOperators.cc.

std::string Ceylan::toString ( const std::list< const void * > &  pointerList  ) 

Definition at line 1303 of file CeylanOperators.cc.

References join(), and toString().

std::string Ceylan::toString ( const std::list< Ceylan::Uint32 > &  intList  ) 

Definition at line 1288 of file CeylanOperators.cc.

References join(), and toString().

string Ceylan::toString ( Ceylan::VerbosityLevels  level  ) 

Converts a verbosity level into a string.

See also:
Displayable

Definition at line 1258 of file CeylanOperators.cc.

References high, low, and medium.

string Ceylan::toString ( Ceylan::LongFloat  value,
Ceylan::Uint8  precision = Ceylan::DigitOutputPrecision 
)

Converts the numerical value to a string, with specified precision, in fixed (not scientific) notation.

Parameters:
value the value to convert to text.
precision the requested precision, i.e. the number of digits that is to be displayed after the dot.
Exceptions:
Exception if the conversion failed.
See also:
CeylanTypes.h to understand why Ceylan::Float80 is not defined anymore.

Definition at line 1230 of file CeylanOperators.cc.

string Ceylan::toString ( Ceylan::Float64  value,
Ceylan::Uint8  precision = Ceylan::DigitOutputPrecision 
)

Converts the numerical value to a string, with specified precision, in fixed (not scientific) notation.

Parameters:
value the value to convert to text.
precision the requested precision, i.e. the number of digits that is to be displayed after the dot.
Exceptions:
Exception if the conversion failed.

Definition at line 1197 of file CeylanOperators.cc.

string Ceylan::toString ( Ceylan::Float32  value,
Ceylan::Uint8  precision = Ceylan::DigitOutputPrecision 
)

Converts the numerical value to a string, with specified precision, in fixed (not scientific) notation.

Parameters:
value the value to convert to text.
precision the requested precision, i.e. the number of digits that is to be displayed after the dot.
Exceptions:
Exception if the conversion failed.

Definition at line 1168 of file CeylanOperators.cc.

string Ceylan::toString ( Ceylan::SignedLongInteger  value,
bool  bitField = false 
)

Converts the numerical value to a string.

Parameters:
bitField if true, returns a binary representation of the specified value prefixed by '0b'.

Definition at line 1081 of file CeylanOperators.cc.

References DigitOutputPrecision, reverse(), and toString().

string Ceylan::toString ( Ceylan::UnsignedLongInteger  value,
bool  bitField = false 
)

Converts the numerical value to a string.

Parameters:
bitField if true, returns a binary representation of the specified value prefixed by '0b'.

Definition at line 1036 of file CeylanOperators.cc.

References DigitOutputPrecision, reverse(), and toString().

string Ceylan::toString ( Ceylan::Uint32  value,
bool  bitField = false 
)

Converts the numerical value to a string.

Parameters:
bitField if true, returns a binary representation of the specified value, prefixed by '0b'.

Definition at line 1004 of file CeylanOperators.cc.

References DigitOutputPrecision, and toString().

string Ceylan::toString ( Ceylan::Sint32  value,
bool  bitField = false 
)

Converts the numerical value to a string.

Parameters:
bitField if true, returns a binary representation of the specified value, prefixed by '0b'.

Definition at line 972 of file CeylanOperators.cc.

References DigitOutputPrecision, and toString().

string Ceylan::toString ( Ceylan::Uint16  value,
bool  bitField = false 
)

Converts the numerical value to a string.

Parameters:
bitField if true, returns a binary representation of the specified value, prefixed by '0b'.

Definition at line 940 of file CeylanOperators.cc.

References DigitOutputPrecision, and toString().

string Ceylan::toString ( Ceylan::Sint16  value,
bool  bitField = false 
)

Converts the numerical value to a string.

Parameters:
bitField if true, returns a binary representation of the specified value, prefixed by '0b'.

Definition at line 908 of file CeylanOperators.cc.

References DigitOutputPrecision, and toString().

string Ceylan::toString ( Ceylan::Uint8  value,
bool  bitField = false 
)

Converts the numerical value to a string.

Parameters:
bitField if true, returns a binary representation of the specified value, prefixed by '0b'.

Definition at line 876 of file CeylanOperators.cc.

References DigitOutputPrecision, and toString().

string Ceylan::toString ( Ceylan::Sint8  value,
bool  bitField = false 
)

Converts the numerical value to a string.

Parameters:
bitField if true, returns a binary representation of the specified value, prefixed by '0b'.

Definition at line 843 of file CeylanOperators.cc.

References DigitOutputPrecision, and toString().

string Ceylan::toString ( bool  value  ) 

Returns a user-friendly textual representation of a bool ("true" or "false").

Definition at line 827 of file CeylanOperators.cc.

string Ceylan::toString ( const void *  pointer  ) 

Returns a user-friendly representation of a pointer.

Definition at line 800 of file CeylanOperators.cc.

References DigitOutputPrecision.

Referenced by Ceylan::System::FIFO::activate(), Ceylan::Log::LogChannel::addMessage(), Ceylan::Log::LogAggregatorHTML::aggregate(), Ceylan::Network::AnonymousStreamSocket::AnonymousStreamSocket(), Ceylan::System::basicSleep(), breakpoint(), Ceylan::System::CacheProtectedDelete(), Ceylan::LibtoolVersion::checkConsistency(), checkpoint(), Ceylan::System::Stream::Close(), Ceylan::Network::ClientStreamSocket::connect(), Ceylan::Countable::Countable(), Ceylan::Log::LogPlug::CreateBasicPlug(), Ceylan::Network::StreamSocket::createSocket(), demangleSymbol(), Ceylan::Maths::Random::RandomGeneratorFromPDF::displayProbabilities(), Ceylan::System::StandardFileSystemManager::Duplicate(), Ceylan::System::durationToString(), Ceylan::System::FDRead(), Ceylan::System::FDWrite(), Ceylan::System::FIFO::FIFO(), Ceylan::Log::ObjectIdentifier::generateFromChannelName(), Ceylan::System::getAccuracyOfPreciseTime(), Ceylan::Network::HostDNSEntry::getAddresses(), Ceylan::Locatable2D::getCenter(), Ceylan::System::getDurationBetween(), Ceylan::Plugin::getFunctionSymbol(), Ceylan::LocalizationSettings::GetLocaleNameFromCode(), Ceylan::Network::getLocalHostName(), Ceylan::Log::LogAggregator::getMessageVerbosityLevel(), Ceylan::View::getModel(), Ceylan::Maths::Random::RandomGeneratorFromPDF::getNewValue(), Ceylan::Log::LogAggregator::getOverallVerbosityLevel(), Ceylan::System::getSchedulingGranularity(), Ceylan::Singleton::GetSingleton(), Ceylan::XML::XMLParser::handleNextElement(), Ceylan::Network::interpretSocketError(), Ceylan::XML::XMLParser::InterpretXMLDeclaration(), Ceylan::Network::IPAddressvFour::IPAddressvFour(), Ceylan::System::Process::kill(), Ceylan::XML::XMLParser::loadFromFile(), Ceylan::Log::LogChannel::LogChannel(), Ceylan::Log::LogMessage::LogMessage(), Ceylan::Log::ObjectChannel::ObjectChannel(), Ceylan::XML::XMLParser::ParseAttributeSequence(), Ceylan::Network::ServerStreamSocket::prepareToAccept(), Ceylan::Maths::Random::RandomGenerator::RandomGenerator(), Ceylan::System::MemoryStream::read(), Ceylan::System::File::readExactLength(), Ceylan::System::InputStream::readString(), Ceylan::Middleware::Marshaller::retrieveData(), Ceylan::Network::ServerStreamSocket::run(), Ceylan::Network::MultiplexedServerStreamSocket::run(), Ceylan::System::InputStream::Select(), Ceylan::Log::LogSource::sendToChannel(), Ceylan::Network::StreamSocket::setBlocking(), Ceylan::LocalizationSettings::setCurrentLocale(), Ceylan::Network::StreamSocket::setNagleAlgorithmTo(), Ceylan::System::Thread::setRunning(), Ceylan::System::InputStream::setSelected(), Ceylan::Singleton::Singleton(), Ceylan::System::Thread::Sleep(), Ceylan::System::smartSleep(), Ceylan::System::smartSleepUntil(), Ceylan::Maths::Sqrt(), Ceylan::SmartResourceManager< Key >::toString(), toString(), Ceylan::Log::ObjectChannel::toString(), Ceylan::Maths::Linear::Matrix3::toString(), Ceylan::Maths::Linear::Matrix2::toString(), Ceylan::Maths::Linear::HomogeneousMatrix3::toString(), Ceylan::Countable::ToString(), Ceylan::BasicResourceManager< Key >::toString(), Ceylan::Version::Version(), Ceylan::System::Thread::Thread::Waiter::wait(), Ceylan::System::MemoryStream::write(), Ceylan::Log::LogAggregatorHTML::write(), Ceylan::System::OutputStream::writeString(), Ceylan::Countable::~Countable(), Ceylan::EventListener::~EventListener(), Ceylan::EventSource::~EventSource(), Ceylan::Log::LogAggregator::~LogAggregator(), Ceylan::Log::LogChannel::~LogChannel(), Ceylan::Log::LogMessage::~LogMessage(), Ceylan::Log::ObjectChannel::~ObjectChannel(), and Ceylan::Singleton::~Singleton().

string Ceylan::toUppercase ( const std::string &  text  ) 

Returns specified text with all the letters translated to uppercase, other characters being left untouched.

Definition at line 303 of file CeylanStringUtils.cc.

Referenced by encodeToPhonetic().

KeyChar Ceylan::waitForKey ( const std::string &  message = DefaultWaitForKeyMessage  ) 

Waits for a key to be pressed.

Parameters:
the sentence to display once before waiting. Just specify "" for no message.
Returns:
the hit key as getChar read it.
Note:
One should not use for example: "Hit key is: " + waitForKey() since waitForKey returns a numerical value. Instead, use: "Hit key is: " + toString( waitForKey() )
Exceptions:
UtilsException if the operation failed or in not supported on this platform.

Definition at line 415 of file CeylanUtils.cc.

References Ceylan::System::areSubSecondSleepsAvailable(), atomicSleep(), display(), dataUtils::e, generalUtils::false, getChar(), keyboardHit(), Ceylan::Exception::toString(), and generalUtils::true.

Referenced by breakpoint().


Variable Documentation

const std::string Ceylan::actualCeylanHeaderLibtoolVersion = "0.7.0"

This is the libtool version of the Ceylan headers, as defined in the configure step.

Allows to detect run-time mismatches between the Ceylan headers a program or a library was compiled with, and the actual Ceylan library it is then linked to.

Definition at line 48 of file CeylanHeaderVersion.h.

const std::string Ceylan::BatchTestOption = "--batch"

This is the name of the option which is to be passed to tests run from the command line, so that they run in batch mode.

They should therefore be non-interactive.

Note:
Stress tests might be very long for a user to wait for them.
See also:
playTests.sh

Definition at line 86 of file CeylanStringUtils.cc.

Ceylan::Byte Ceylan::ByteMax = numeric_limits<Ceylan::Byte>::max()

Definition at line 57 of file CeylanTypes.cc.

Ceylan::Byte Ceylan::ByteMin = numeric_limits<Ceylan::Byte>::min()

Definition at line 54 of file CeylanTypes.cc.

Default string to display when waiting for a key to be hit.

Ex: "Press any key to continue".

This section focuses on conversion from various numerical types to standard strings.

Determines the maximum number of digits that shall be output on string insertion operations to express floating-point values, counting both the digits before and after the decimal point.

Note:
40, the actual value, seems to be largely enough, even for Ceylan::Float64.

Definition at line 48 of file CeylanOperators.cc.

Referenced by operator+(), toNumericalString(), Ceylan::Maths::Linear::Vector3::toString(), Ceylan::Maths::Linear::Vector2::toString(), Ceylan::Maths::Linear::Tripoint::toString(), toString(), Ceylan::Maths::Linear::Matrix3::toString(), Ceylan::Maths::Linear::Matrix2::toString(), Ceylan::Maths::Linear::HomogeneousMatrix3::toString(), and Ceylan::Maths::Linear::Bipoint::toString().

Return value to be used on debug assertion failure.

It is returned only by "#if CEYLAN_DEBUG"-enclosed sections.

This value should never been actually returned, since it would mean a real basic assumption was unexpectedly not met.

Definition at line 118 of file CeylanUtils.cc.

Return value to be used on failure (any non zero value could be used).

Definition at line 117 of file CeylanUtils.cc.

Referenced by emergencyShutdown(), and Ceylan::Log::LogHolder::~LogHolder().

Return value to be used on success.

Definition at line 116 of file CeylanUtils.cc.

Definition at line 127 of file CeylanTypes.cc.

Definition at line 124 of file CeylanTypes.cc.

Definition at line 135 of file CeylanTypes.cc.

Definition at line 132 of file CeylanTypes.cc.

const std::string Ceylan::HexDigits = "0123456789ABCDEF"

The hexadecimal digits: 0123456789ABCDEF.

Definition at line 50 of file CeylanOperators.cc.

Referenced by toHexString().

Definition at line 145 of file CeylanTypes.cc.

Definition at line 141 of file CeylanTypes.cc.

Definition at line 99 of file CeylanTypes.cc.

Definition at line 95 of file CeylanTypes.cc.

Definition at line 66 of file CeylanTypes.cc.

Definition at line 63 of file CeylanTypes.cc.

Definition at line 81 of file CeylanTypes.cc.

Definition at line 78 of file CeylanTypes.cc.

Ceylan::Sint8 Ceylan::Sint8Max = numeric_limits<Ceylan::Sint8>::max()

Definition at line 41 of file CeylanTypes.cc.

Ceylan::Sint8 Ceylan::Sint8Min = numeric_limits<Ceylan::Sint8>::min()

Definition at line 38 of file CeylanTypes.cc.

Definition at line 73 of file CeylanTypes.cc.

Referenced by Ceylan::System::OutputStream::writeString().

Definition at line 70 of file CeylanTypes.cc.

Definition at line 88 of file CeylanTypes.cc.

Definition at line 85 of file CeylanTypes.cc.

Ceylan::Uint8 Ceylan::Uint8Max = numeric_limits<Ceylan::Uint8>::max()

Definition at line 49 of file CeylanTypes.cc.

Ceylan::Uint8 Ceylan::Uint8Min = numeric_limits<Ceylan::Uint8>::min()

Definition at line 46 of file CeylanTypes.cc.

Definition at line 109 of file CeylanTypes.cc.

Definition at line 105 of file CeylanTypes.cc.


Generated on Thu Jun 4 20:40:05 2009 for Ceylan by  doxygen 1.5.8