Utilities
Classes | |
class | csAnsiParser |
Helper to parse a string for ANSI codes. More... | |
class | csUnicodeTransform |
Contains functions to convert between several UTF encodings. More... | |
struct | csPluginPath |
This structure contains information about a plugin path. More... | |
class | csPluginPaths |
Class to manage a list of plugin paths. More... | |
struct | csWtoC |
Helper class to convert widechar* to char*(UTF-8) strings for use as function parameters. More... | |
struct | csCtoW |
Helper class to convert (UTF-8)widechar* to char* strings for use as function parameters. More... | |
struct | iConfigFile |
Configuration file interface. More... | |
struct | iConfigIterator |
Iterator which allows sequential access to configuration information contained in an iConfigFile object. More... | |
struct | iConfigManager |
The configuration manager is used to make a number of iConfigFile object appear like a single object. More... | |
struct | iCommandLineParser |
A utility class that makes it easier to parse the command line. More... | |
struct | csVariant |
Variant, means that type of contained data is set at runtime. More... | |
struct | csOptionDescription |
Configuration option description. More... | |
struct | iConfig |
Interface to a configurator object. More... | |
struct | iDataBuffer |
The iDataBuffer interface can be used to exchange buffers with abstract data between plugins. More... | |
struct | iDebugHelper |
Some object that wants to implement unit testing, debugging and/or benchmarking can implement this interface. More... | |
struct | iDocumentAttributeIterator |
An iterator over iDocumentNode attributes. More... | |
struct | iDocumentAttribute |
An attribute for an iDocumentNode. More... | |
struct | iDocumentNodeIterator |
An iterator over iDocumentNode. More... | |
struct | iDocumentNode |
Representation of a node in a document. More... | |
struct | iDocument |
Representation of a document containing a hierarchical structure of nodes. More... | |
struct | iDocumentSystem |
An iDocument factory. More... | |
struct | iObject |
This interface is an SCF interface for encapsulating csObject. More... | |
struct | iObjectIterator |
This is an iterator for child objects of a csObject. More... | |
struct | iString |
This is a SCF-compatible interface for csString. More... | |
struct | iStringArray |
This is an SCF-compatible interface for csStringArray. More... | |
struct | iStringSet |
The string set is a list of strings, all with different content. More... | |
struct | iReporterListener |
Implement this interface if you're interested in hearing about new messages on the reporter. More... | |
struct | iReporterIterator |
An iterator to iterate over all messages in the reporter. More... | |
struct | iReporter |
This is the interface for the error/message reporter plugin. More... | |
class | csReporterHelper |
Helper class for csReport(). More... | |
Token list helper macros | |
The macros here provide an easy way to automatically build a token list useful for e.g. parsers. The list of tokens have to be declared in an external file, with each token the argument to a 'CS_TOKEN_LIST_TOKEN()' invocation. The name of the file (full path!) has to be put in a macro named CS_TOKEN_ITEM_FILE. Optionally, the name of the function to initialize the token table can be set via CS_INIT_TOKEN_TABLE_NAME; the default is 'InitTokenTable'. In addition to invoking the initialization function to populate the string hash, an enumeration is also created. Elements of the enumeration are named XMLTOKEN_FOO (where 'FOO' represents the argument to CS_TOKEN_LIST_TOKEN()). If you prefer a prefix other than 'XMLTOKEN_', define CS_TOKEN_LIST_TOKEN_PREFIX with the prefix of your choice. As a convenience, in addition to entries for each CS_TOKEN_LIST_TOKEN invocation, a final item is added to the enumeration with the name provided by CS_TOKEN_LIST_TOKEN_LAST. If you do not #define this macro, then the name XMLTOKEN_TOKEN_COUNT is given to the last item in the enumeration. This value will equate to the count of items in the enumeration (not including this automatically added item). Note that the client defines CS_TOKEN_ITEM_FILE, CS_INIT_TOKEN_TABLE_NAME, CS_TOKEN_LIST_TOKEN_PREFIX, and CS_TOKEN_LIST_TOKEN_LAST, and they will not be undefined by this file; hence, if you want to build multiple token lists, you may redefine those macros and include <cstool/tokenlist.h> again. Example (from a real-world use): fire.tok: CS_TOKEN_LIST_TOKEN(PALETTE) ... class csFireLoader { csStringHash tokens; #define CS_TOKEN_ITEM_FILE "plugins/proctex/standard/fire.tok" #include "cstool/tokenlist.h" ... }; fire.cpp: csFireLoader::csFireLoader(iBase *p) { InitTokenTable (tokens); // ... } csPtr<iBase> csFireLoader::Parse (iDocumentNode* node, iLoaderContext* ldr_context, iBase* context) { // ... csStringID id = tokens.Request (child->GetValue ()); switch (id) { case XMLTOKEN_PALETTE: // ... break; } // ... } | |
#define | CS_TOKEN_LIST_TOKEN_PREFIX_DEFAULT |
#define | CS_TOKEN_LIST_TOKEN_PREFIX XMLTOKEN_ |
Prefix for the generated enumeration value. | |
#define | CS_TOKEN_LIST_TOKEN_LAST_DEFAULT |
#define | CS_TOKEN_LIST_TOKEN_LAST TOKEN_COUNT |
Name for the "token count" enumeration value. | |
#define | CS_TOKEN_LIST_PASTE(X, Y) CS_TOKEN_LIST_PASTE1(X,Y) |
#define | CS_TOKEN_LIST_PASTE1(X, Y) X ## Y |
#define | CS_TOKEN_LIST_TOKEN(X) CS_TOKEN_LIST_PASTE(CS_TOKEN_LIST_TOKEN_PREFIX,X), |
A token list entry. | |
#define | CS_TOKEN_LIST_TOKEN(X) |
A token list entry. | |
#define | CS_TOKEN_LIST_TOKEN_FINAL(X) CS_TOKEN_LIST_PASTE(CS_TOKEN_LIST_TOKEN_PREFIX,X) |
#define | CS_INIT_TOKEN_TABLE_NAME_DEFAULT |
#define | CS_INIT_TOKEN_TABLE_NAME InitTokenTable |
Name of the token table initialization method. | |
enum | |
void | CS_INIT_TOKEN_TABLE_NAME (csStringHash &t) |
Specific sized types | |
These types should be used ONLY when you need a variable of an explicit number of bits.
For all other cases, you should use normal char, short, int, long, etc., types since they are treated as "natural" types and will generally have better performance characteristics than the explicitly-sized types. Use the explicitly-sized types sparingly. | |
#define | CONST_INT64(x) INT64_C(x) |
Specify a 64 bit integer constant. | |
#define | CONST_UINT64(x) UINT64_C(x) |
Specify 64 bit unsigned integer constant. | |
typedef unsigned char | uint8 |
unsigned 8-bit integer (0..255) | |
typedef char | int8 |
signed 8-bit integer (-128..127) | |
typedef unsigned short | uint16 |
unsigned 16-bit integer (0..65 535) | |
typedef short | int16 |
signed 16-bit integer (-32 768..32 767) | |
typedef unsigned int | uint32 |
unsigned 32-bit integer (0..4 294 967 295) | |
typedef int | int32 |
signed 32-bit integer (-2 147 483 648..2 147 483 647) | |
typedef unsigned long long | uint64 |
unsigned 64-bit integer | |
typedef long long | int64 |
signed 64-bit integer | |
Other types | |
typedef int | intptr_t |
Integer at least as wide as a pointer. | |
typedef unsigned int | uintptr_t |
Unsigned integer at least as wide as a pointer. | |
typedef int | ptrdiff_t |
Difference of 2 pointers. | |
typedef int64 | intmax_t |
Greatest-width integer. | |
typedef uint64 | uintmax_t |
Greatest-width unsigned integer. | |
typedef long long | longlong |
Type to pass to cs_snprintf() as an argument to the "%lld" format specifier. | |
typedef unsigned long long | ulonglong |
Type to pass to cs_snprintf() as an argument to the "%llu" format specifier. | |
typedef unsigned int | csTicks |
A time value measured in milliseconds (1/1000 of a second). | |
typedef unsigned int | uint |
Shortcut for default unsigned int. | |
Special character codes | |
#define | CS_UC_CHAR_REPLACER 0xFFFD |
Replacer char. | |
#define | CS_UC_INVALID 0xFFFF |
Invalid char. | |
#define | CS_UC_BOM 0xFFFE |
Byte-order mark. | |
#define | CS_UC_LAST_CHAR 0x10FFFF |
Highest valid Unicode codepoint. | |
#define | CS_UC_IS_SURROGATE(C) (((C) & 0xFFFFF800) == 0x0000D800) |
Check whether a code is in the "high" or "low surrogate" range. | |
#define | CS_UC_IS_HIGH_SURROGATE(C) (((C) & 0xFFFFFC00) == 0x0000DC00) |
Check whether a code is in the "high surrogate" range. | |
#define | CS_UC_IS_LOW_SURROGATE(C) (((C) & 0xFFFFFC00) == 0x0000D800) |
Check whether a code is in the "low surrogate" range. | |
#define | CS_UC_IS_NONCHARACTER(C) |
Test whether a code point is a Unicode noncharacter. | |
#define | CS_UC_CHAR_HIGH_SURROGATE_FIRST 0xD800 |
First char in the "high surrogate" range. | |
#define | CS_UC_CHAR_HIGH_SURROGATE_LAST 0xDBFF |
Last char in the "high surrogate" range. | |
#define | CS_UC_CHAR_LOW_SURROGATE_FIRST 0xDC00 |
First char in the "low surrogate" range. | |
#define | CS_UC_CHAR_LOW_SURROGATE_LAST 0xDFFF |
Last char in the "low surrogate" range. | |
iDebugHelper implementation support flags | |
#define | CS_DBGHELP_UNITTEST 1 |
supports UnitTest(). | |
#define | CS_DBGHELP_BENCHMARK 2 |
supports Benchmark(). | |
#define | CS_DBGHELP_TXTDUMP 4 |
supports non graphical Dump(). | |
#define | CS_DBGHELP_GFXDUMP 8 |
supports graphical Dump(). | |
#define | CS_DBGHELP_STATETEST 16 |
supports StateTest(). | |
Document changeabilty | |
#define | CS_CHANGEABLE_NEVER 0 |
The document can not be changed, CreateRoot() is not supported. | |
#define | CS_CHANGEABLE_NEWROOT 1 |
The document only allows changes with a newly created root. | |
#define | CS_CHANGEABLE_YES 2 |
The document can be changed. | |
iReporter severity levels | |
#define | CS_REPORTER_SEVERITY_BUG 0 |
BUG severity level. | |
#define | CS_REPORTER_SEVERITY_ERROR 1 |
ERROR severity level. | |
#define | CS_REPORTER_SEVERITY_WARNING 2 |
WARNING severity level. | |
#define | CS_REPORTER_SEVERITY_NOTIFY 3 |
NOTIFY severity level. | |
#define | CS_REPORTER_SEVERITY_DEBUG 4 |
DEBUG severity level. | |
Low-level shared library support | |
csLibraryHandle | csLoadLibrary (char const *iName) |
Load a shared library and return a library handle, which is used later to query and unload the library. | |
void * | csGetLibrarySymbol (csLibraryHandle Handle, char const *iName) |
Return a pointer to a symbol within given shared library. | |
bool | csUnloadLibrary (csLibraryHandle Handle) |
Unload a shared library given its handle. | |
void | csPrintLibraryError (char const *iModule) |
Print out the latest dynamic loader error. | |
void | csSetLoadLibraryVerbose (bool) |
Control whether dynamic library loading messages are verbose or terse. | |
bool | csGetLoadLibraryVerbose () |
Query if failed dynamic library loads generate verbose messages. | |
csRef< iStringArray > | csScanPluginDir (const char *dir, csRef< iStringArray > &plugins, bool recursive=true) |
Scan a given directory for plugins and return a list of the plugin native file names and their respective metadata. | |
csRef< iStringArray > | csScanPluginDirs (csPluginPaths *dirs, csRef< iStringArray > &plugins) |
Scan some given directories for plugins. | |
csRef< iString > | csGetPluginMetadata (const char *fullPath, csRef< iDocument > &metadata) |
Retrive a plugin's metadata. | |
Floating point conversions. | |
The following routines are used for converting floating-point numbers into 16-bit shorts and back.
This is useful for low-precision data. They use the 1.4.12 format. The range of numbers that can be represented in this format is from 2^-8 to 2^7. The precision for numbers near to 2^-8 (0.00390625) is near 0.000001, for numbers near 2^7 (128) is near 0.03. | |
short | csFloatToShort (float f) |
Convert a float to a cross-platform 16-bit format (no endianess adjustments!). | |
float | csShortToFloat (short s) |
Convert a 16-bit cross-platform float to native format (no endianess adjustments!). | |
System functions | |
bool | csDefaultRunLoop (iObjectRegistry *) |
Implements a default run-loop for stand-alone applications. | |
bool | csPlatformStartup (iObjectRegistry *) |
Platform-specific startup. | |
bool | csPlatformShutdown (iObjectRegistry *) |
Platform-specific shutdown. | |
int | csPrintf (const char *str,...) |
CS version of printf. | |
int | csPrintfV (const char *str, va_list arg) |
CS version of vprintf. | |
int | csFPutErr (const char *str) |
CS version of fputs (<str>, stderr). | |
int | csPrintfErr (const char *str,...) |
CS version of fprintf (stderr, str, ...). | |
int | csPrintfErrV (const char *str, va_list arg) |
CS version of vfprintf (stderr, str, ...). | |
csTicks | csGetTicks () |
Get the current tick count. | |
void | csSleep (int) |
This function will freeze your application for given number of 1/1000 seconds. | |
csString | csGetUsername () |
Get the username of the account running the program. | |
csPtr< iConfigFile > | csGetPlatformConfig (const char *key) |
Get a platform-specific per-user config object. | |
csString | csGetPlatformConfigPath (const char *key) |
Get a platform-specific path to store per-user configuration data. | |
Helpers to deal with native paths | |
csRef< iStringArray > | csFindSystemRoots () |
Get the list of root directories. | |
csString | csGetConfigPath () |
Get the installation path. | |
csPluginPaths * | csGetPluginPaths (const char *argv0) |
Get a list of directories where plugins are installed. | |
char * | csExpandPath (const char *path) |
Expand a native path relative to the current directory. | |
csString | csGetAppPath (const char *argv0) |
Return the absolute path of the executable. | |
csString | csGetAppDir (const char *argv0) |
Return the directory in which the application executable resides. | |
csString | csGetResourceDir (const char *argv0) |
Return the directory in which the application's resources reside. | |
bool | csPathsIdentical (const char *path1, const char *path2) |
Check whether two native paths actually point to the same location. | |
Defines | |
#define | CS_UC_MAX_UTF8_ENCODED 6 |
An Unicode character encoded as UTF8 is at max encoded to this length. | |
#define | CS_UC_MAX_UTF16_ENCODED 2 |
An Unicode character encoded as UTF16 is at max encoded to this length. | |
#define | CS_UC_MAX_UTF32_ENCODED 1 |
An Unicode character encoded as UTF32 is at max encoded to this length. | |
#define | CS_UC_MAX_MAPPED 3 |
A mapping (uppercase, lowercase, fold) for a Unicode character is at max this long. | |
#define | CS_GET_CHILD_OBJECT(object, Interface) |
You can use this macro to get a child object from a csObject. | |
#define | CS_GET_NAMED_CHILD_OBJECT(object, Interface, name) |
You can use this macro to get a child object with the given name and interface from a csObject. | |
#define | CS_GET_FIRST_NAMED_CHILD_OBJECT(object, Interface, name) |
This is the same as CS_GET_CHILD_OBJECT, but stops at the first object with the given name, even if it does not implement the requested interface. | |
#define | csReport csReporterHelper::Report |
Helper macro to use a reporter easily. | |
#define | csReportV csReporterHelper::ReportV |
Helper macro to use a reporter easily. | |
Typedefs | |
typedef uint8 | utf8_char |
A single char in a UTF8 encoded string. | |
typedef uint16 | utf16_char |
A single char in a UTF16 encoded string. | |
typedef uint32 | utf32_char |
A single char in a UTF32 encoded string. | |
Enumerations | |
enum | csVariantType { CSVAR_LONG, CSVAR_BOOL, CSVAR_CMD, CSVAR_FLOAT, CSVAR_STRING } |
Types that can be contained within a variant. More... | |
enum | csDocumentNodeType { CS_NODE_DOCUMENT = 1, CS_NODE_ELEMENT, CS_NODE_COMMENT, CS_NODE_UNKNOWN, CS_NODE_TEXT, CS_NODE_DECLARATION } |
Possible node types for iDocumentNode. More... | |
Functions | |
uint64 | csBigEndianLongLong (uint64 l) |
Convert a longlong from big-endian to machine format. | |
uint32 | csBigEndianLong (uint32 l) |
Convert a long from big-endian to machine format. | |
uint16 | csBigEndianShort (uint16 s) |
Convert a short from big-endian to machine format. | |
float | csBigEndianFloat (float f) |
Convert a big-endian floating-point number to machine format. | |
uint64 | csLittleEndianLongLong (uint64 l) |
Convert a longlong from little-endian to machine format. | |
uint32 | csLittleEndianLong (uint32 l) |
Convert a long from little-endian to machine format. | |
uint16 | csLittleEndianShort (uint16 s) |
Convert a short from little-endian to machine format. | |
float | csLittleEndianFloat (float f) |
Convert a little-endian floating-point number to machine format. | |
int32 | csFloatToLong (float f) |
Convert a float to a cross-platform 32-bit format (no endianess adjustments!). | |
float | csLongToFloat (int32 l) |
Convert a 32-bit cross-platform float to native format (no endianess adjustments!). | |
int64 | csDoubleToLongLong (double d) |
Convert a double to a cross-platform 64-bit format (no endianess adjustments!). | |
double | csLongLongToDouble (int64 i) |
Convert a 64-bit cross-platform double to native format (no endianess adjustments!). | |
uint64 | csConvertEndian (uint64 l) |
Swap the bytes in a uint64 value. | |
int64 | csConvertEndian (int64 l) |
Swap the bytes in a int64 value. | |
uint32 | csConvertEndian (uint32 l) |
Swap the bytes in a uint32 value. | |
int32 | csConvertEndian (int32 l) |
Swap the bytes in a int32 value. | |
int16 | csConvertEndian (int16 s) |
Swap the bytes in a int16 value. | |
uint16 | csConvertEndian (uint16 s) |
Swap the bytes in a uint16 value. | |
float | csConvertEndian (float f) |
Swap the bytes in a float value. | |
uint16 | csGetLittleEndianShort (const void *buff) |
Read a little-endian short from address. | |
uint32 | csGetLittleEndianLong (const void *buff) |
Read a little-endian long from address. | |
float | csGetLittleEndianFloat32 (const void *buff) |
Read a little-endian 32-bit float from address. | |
float | csGetLittleEndianFloat16 (const void *buff) |
Read a little-endian 16-bit float from address. | |
void | csSetLittleEndianShort (void *buff, uint16 s) |
Set a little-endian short on a address. | |
void | csSetLittleEndianLong (void *buff, uint32 l) |
Set a little-endian long on a address. | |
void | csSetLittleEndianFloat32 (void *buff, float f) |
Set a little-endian 32-bit float on a address. | |
void | csSetLittleEndianFloat16 (void *buff, float f) |
Set a little-endian 16-bit float on a address. | |
uint16 | csGetBigEndianShort (const void *buff) |
Read a big-endian short from address. | |
uint32 | csGetBigEndianLong (const void *buff) |
Read a big-endian long from address. | |
float | csGetBigEndianFloat32 (const void *buff) |
Read a big-endian 32-bit float from address. | |
float | csGetBigEndianFloat16 (const void *buff) |
Read a big-endian 16-bit float from address. | |
void | csSetBigEndianShort (void *buff, uint16 s) |
Set a big-endian short on a address. | |
void | csSetBigEndianLong (void *buff, uint32 l) |
Set a big-endian long on a address. | |
void | csSetBigEndianFloat32 (void *buff, float f) |
Set a big-endian 32-bit float on a address. | |
void | csSetBigEndianFloat16 (void *buff, float f) |
Set a big-endian 16-bit float on a address. | |
char * | csStrNew (const char *s) |
Allocate a new char [] and copy the string into the newly allocated storage. | |
char * | csStrNew (const wchar_t *s) |
Allocate a new char [] and copy an UTF-8 version of the string into the newly allocated storage. | |
wchar_t * | csStrNewW (const wchar_t *s) |
Allocate a new widechar [] and the string into the newly allocated storage. | |
wchar_t * | csStrNewW (const char *s) |
Allocate a new widechar [] and copy the string converted from UTF-8 into the newly allocated storage. | |
int | csStrCaseCmp (char const *str1, char const *str2) |
Perform case-insensitive string comparison. | |
int | csStrNCaseCmp (char const *str1, char const *str2, size_t n) |
Perform case-insensitive string comparison of the first n characters of str1 and str2 . | |
char * | csExpandName (const char *iName) |
Expand a filename if it contains shortcuts. | |
void | csSplitPath (const char *iPathName, char *oPath, size_t iPathSize, char *oName, size_t iNameSize) |
Split a pathname into separate path and name. | |
bool | csGlobMatches (const char *fName, const char *fMask) |
Perform shell-like filename globbing (pattern matching). | |
int | csFindNearestPowerOf2 (int n) |
Finds the smallest number that is a power of two and is larger or equal to n. | |
bool | csIsPowerOf2 (int n) |
Returns true if n is a power of two. | |
int | csLog2 (int n) |
Find the log2 of 32bit argument. | |
void | csFindReplace (char *dest, const char *src, const char *search, const char *replace, int max) |
Given src and dest , which are already allocated, copy source to dest . | |
void | iReporter::ReportError (const char *msgId, const char *description,...) |
Report error. | |
void | iReporter::ReportWarning (const char *msgId, const char *description,...) |
Report warning. | |
void | iReporter::ReportNotify (const char *msgId, const char *description,...) |
Report notification. | |
void | iReporter::ReportBug (const char *msgId, const char *description,...) |
Report bug. | |
void | iReporter::ReportDebug (const char *msgId, const char *description,...) |
Report debug. | |
void | csReporterHelper::ReportV (iObjectRegistry *reg, int severity, char const *msgId, char const *description, va_list args) |
Helper function to use a reporter easily. | |
void | csReporterHelper::Report (iObjectRegistry *reg, int severity, char const *msgId, char const *description,...) |
Helper function to use a reporter easily. |
Define Documentation
|
Specify a 64 bit integer constant. Compilers differ in 64-bit wide number specification. Employ this macro to use the appropriate mechanism automatically. |
|
Specify 64 bit unsigned integer constant. Compilers differ in 64-bit wide number specification. Employ this macro to use the appropriate mechanism automatically. |
|
The document can not be changed, CreateRoot() is not supported.
Definition at line 61 of file document.h. |
|
The document only allows changes with a newly created root.
Definition at line 63 of file document.h. |
|
The document can be changed.
Definition at line 65 of file document.h. |
|
supports Benchmark().
|
|
supports graphical Dump().
|
|
supports StateTest().
|
|
supports non graphical Dump().
|
|
supports UnitTest().
|
|
Value: csPtr<Interface> ((Interface*)(object)->GetChild( \ scfInterface<Interface>::GetID(), scfInterface<Interface>::GetVersion())) The returned object will be IncRef'ed. This version requires a correctly set-up interface ID variable. |
|
Value: csPtr<Interface> ((Interface*)(object)->GetChild( \ scfInterface<Interface>::GetID(), scfInterface<Interface>::GetVersion(), \ name, true))
|
|
Value: csPtr<Interface> ((Interface*)(object)->GetChild( \ scfInterface<Interface>::GetID(), scfInterface<Interface>::GetVersion(), \ name)) The returned object will be IncRef'ed. |
|
Name of the token table initialization method. Can be overridden by the user by defining it prior to CS_TOKEN_LIST_TOKEN use. Definition at line 148 of file tokenlist.h. |
|
BUG severity level. This is the worst thing that can happen. It means that some code detected a bug in Crystal Space. Definition at line 44 of file reporter.h. Referenced by iReporter::ReportBug(), and csReporterHelper::ReportV(). |
|
DEBUG severity level. This is for debugging and it will usually generate an entry in some log. Definition at line 70 of file reporter.h. Referenced by iReporter::ReportDebug(), and csReporterHelper::ReportV(). |
|
ERROR severity level. There was an error of some kind. Usually this is an error while reading data. Definition at line 51 of file reporter.h. Referenced by csDebugImageWriter::DebugImageWrite(), iReporter::ReportError(), csApplicationFramework::ReportError(), and csReporterHelper::ReportV(). |
|
NOTIFY severity level. Just a notification message. Definition at line 63 of file reporter.h. Referenced by csApplicationFramework::ReportInfo(), iReporter::ReportNotify(), and csReporterHelper::ReportV(). |
|
WARNING severity level. There was some condition which is non fatal but is suspicious. Definition at line 57 of file reporter.h. Referenced by csReporterHelper::ReportV(), iReporter::ReportWarning(), and csApplicationFramework::ReportWarning(). |
|
Value: s = #X; s.Downcase(); \ t.Register(s, CS_TOKEN_LIST_PASTE(CS_TOKEN_LIST_TOKEN_PREFIX,X));
Definition at line 139 of file tokenlist.h. |
|
A token list entry.
Definition at line 139 of file tokenlist.h. |
|
Name for the "token count" enumeration value. Can be overridden by the user by defining it prior to CS_TOKEN_LIST_TOKEN use. Definition at line 111 of file tokenlist.h. |
|
Prefix for the generated enumeration value. Can be overridden by the user by defining it prior to CS_TOKEN_LIST_TOKEN use. Definition at line 102 of file tokenlist.h. |
|
Byte-order mark.
Definition at line 58 of file csunicode.h. |
|
First char in the "high surrogate" range.
Definition at line 75 of file csunicode.h. Referenced by csUnicodeTransform::EncodeUTF16(). |
|
Last char in the "high surrogate" range.
Definition at line 77 of file csunicode.h. |
|
First char in the "low surrogate" range.
Definition at line 79 of file csunicode.h. Referenced by csUnicodeTransform::EncodeUTF16(). |
|
Last char in the "low surrogate" range.
Definition at line 81 of file csunicode.h. |
|
Replacer char.
Definition at line 54 of file csunicode.h. |
|
Invalid char.
Definition at line 56 of file csunicode.h. |
|
Check whether a code is in the "high surrogate" range.
Definition at line 65 of file csunicode.h. Referenced by csUnicodeTransform::UTF16Decode(), csUnicodeTransform::UTF16Rewind(), and csUnicodeTransform::UTF16Skip(). |
|
Check whether a code is in the "low surrogate" range.
Definition at line 67 of file csunicode.h. Referenced by csUnicodeTransform::UTF16Decode(). |
|
Value: (((C) == CS_UC_INVALID) || ((C) == CS_UC_BOM) \ || (((C) >= 0xFDD0) && ((C) <= 0xFDEF)) \ || ((C) > CS_UC_LAST_CHAR))
Definition at line 70 of file csunicode.h. Referenced by csUnicodeTransform::EncodeUTF16(), csUnicodeTransform::EncodeUTF32(), csUnicodeTransform::EncodeUTF8(), csUnicodeTransform::UTF16Decode(), csUnicodeTransform::UTF32Decode(), and csUnicodeTransform::UTF8Decode(). |
|
Check whether a code is in the "high" or "low surrogate" range.
Definition at line 63 of file csunicode.h. Referenced by csUnicodeTransform::EncodeUTF16(), csUnicodeTransform::EncodeUTF32(), csUnicodeTransform::EncodeUTF8(), csUnicodeTransform::UTF16Decode(), csUnicodeTransform::UTF16Rewind(), csUnicodeTransform::UTF32Decode(), and csUnicodeTransform::UTF8Decode(). |
|
Highest valid Unicode codepoint.
Definition at line 60 of file csunicode.h. |
|
A mapping (uppercase, lowercase, fold) for a Unicode character is at max this long.
Definition at line 41 of file csuctransform.h. |
|
An Unicode character encoded as UTF16 is at max encoded to this length.
Definition at line 34 of file csuctransform.h. |
|
An Unicode character encoded as UTF32 is at max encoded to this length.
Definition at line 36 of file csuctransform.h. |
|
An Unicode character encoded as UTF8 is at max encoded to this length.
Definition at line 32 of file csuctransform.h. |
|
Helper macro to use a reporter easily.
Definition at line 381 of file reporter.h. |
|
Helper macro to use a reporter easily.
Definition at line 385 of file reporter.h. Referenced by csApplicationFramework::ReportError(), csApplicationFramework::ReportInfo(), and csApplicationFramework::ReportWarning(). |
Typedef Documentation
|
A time value measured in milliseconds (1/1000 of a second). Ticks do not represent wall clock time or any other Epoch-based time. Instead, ticks are useful only for measuring differences between points on a timeline, or for specifying intervals. Definition at line 187 of file cstypes.h. Referenced by csUtilDebugHelper::Benchmark(), csGeomDebugHelper::Benchmark(), csVirtualClock::GetCurrentTicks(), csApp::GetCurrentTime(), csVirtualClock::GetElapsedTicks(), csAnimationTemplate::GetLength(), csNewParticleSystem::GetTimeToLive(), csParticleSystem::GetTimeToLive(), csParticleSystem::NextFrame(), and csVirtualClock::Resume(). |
|
signed 16-bit integer (-32 768..32 767)
Definition at line 60 of file cstypes.h. Referenced by csConvertEndian(). |
|
signed 32-bit integer (-2 147 483 648..2 147 483 647)
|
|
signed 64-bit integer
Definition at line 69 of file cstypes.h. Referenced by csConvertEndian(), csDoubleToLongLong(), and csLongLongToDouble(). |
|
signed 8-bit integer (-128..127)
|
|
Greatest-width integer.
Definition at line 148 of file cstypes.h. Referenced by csPrintfFormatter< Twriter, Treader >::Format(). |
|
Integer at least as wide as a pointer.
|
|
Type to pass to cs_snprintf() as an argument to the "%lld" format specifier.
Definition at line 159 of file cstypes.h. Referenced by csPrintfFormatter< Twriter, Treader >::Format(). |
|
Difference of 2 pointers.
Definition at line 140 of file cstypes.h. Referenced by csPrintfFormatter< Twriter, Treader >::Format(). |
|
Shortcut for default unsigned int.
Definition at line 190 of file cstypes.h. Referenced by csPrintfFormatter< Twriter, Treader >::Format(), csRenderBufferHolder::GetAccessorMask(), csRenderBuffer::GetVersion(), csImageBase::HasMipmaps(), csImageCubeMapMaker::HasSubImages(), and csImageBase::HasSubImages(). |
|
unsigned 16-bit integer (0..65 535)
Definition at line 58 of file cstypes.h. Referenced by csBigEndianShort(), csConvertEndian(), csGetBigEndianFloat16(), csGetBigEndianShort(), csGetLittleEndianFloat16(), csGetLittleEndianShort(), csLittleEndianShort(), csSetBigEndianShort(), and csSetLittleEndianShort(). |
|
unsigned 32-bit integer (0..4 294 967 295)
|
|
unsigned 64-bit integer
Definition at line 67 of file cstypes.h. Referenced by csBigEndianLongLong(), csConvertEndian(), and csLittleEndianLongLong(). |
|
unsigned 8-bit integer (0..255)
|
|
Greatest-width unsigned integer.
|
|
Unsigned integer at least as wide as a pointer.
Definition at line 138 of file cstypes.h. Referenced by csPrintfFormatter< Twriter, Treader >::Format(). |
|
Type to pass to cs_snprintf() as an argument to the "%llu" format specifier.
Definition at line 163 of file cstypes.h. Referenced by csPrintfFormatter< Twriter, Treader >::Format(). |
|
A single char in a UTF16 encoded string.
Definition at line 47 of file csunicode.h. Referenced by csUnicodeTransform::Decode(), csUnicodeTransform::Encode(), csUnicodeTransform::EncodeUTF16(), csUnicodeTransform::UTF16Decode(), csUnicodeTransform::UTF16Rewind(), csUnicodeTransform::UTF16toWC(), csUnicodeTransform::UTF32toWC(), csUnicodeTransform::UTF8toWC(), csUnicodeTransform::WCtoUTF32(), and csUnicodeTransform::WCtoUTF8(). |
|
A single char in a UTF32 encoded string.
Definition at line 49 of file csunicode.h. Referenced by csUnicodeTransform::EncodeUTF16(), and csPrintfFormatter< Twriter, Treader >::Format(). |
|
A single char in a UTF8 encoded string.
Definition at line 45 of file csunicode.h. Referenced by csUnicodeTransform::EncodeUTF8(), csPrintfFormatter< Twriter, Treader >::Format(), csUnicodeTransform::UTF32to16(), csUnicodeTransform::UTF8Decode(), and csUnicodeTransform::UTF8Rewind(). |
Enumeration Type Documentation
|
Possible node types for iDocumentNode.
Definition at line 41 of file document.h. |
|
Types that can be contained within a variant.
|
Function Documentation
|
Convert a big-endian floating-point number to machine format.
Definition at line 80 of file csendian.h. |
|
Convert a long from big-endian to machine format.
Definition at line 72 of file csendian.h. Referenced by csGetBigEndianLong(), and csSetBigEndianLong(). |
|
Convert a longlong from big-endian to machine format.
Definition at line 54 of file csendian.h. References uint64. |
|
Convert a short from big-endian to machine format.
Definition at line 76 of file csendian.h. References uint16. Referenced by csGetBigEndianShort(), and csSetBigEndianShort(). |
|
Swap the bytes in a float value.
Definition at line 264 of file csendian.h. References csLittleEndianFloat(). |
|
Swap the bytes in a uint16 value.
Definition at line 260 of file csendian.h. References csLittleEndianShort(), and uint16. |
|
Swap the bytes in a int16 value.
Definition at line 256 of file csendian.h. References csLittleEndianShort(), and int16. |
|
Swap the bytes in a int32 value.
Definition at line 252 of file csendian.h. References csLittleEndianLong(). |
|
Swap the bytes in a uint32 value.
Definition at line 248 of file csendian.h. References csLittleEndianLong(). |
|
Swap the bytes in a int64 value.
Definition at line 244 of file csendian.h. References csLittleEndianLongLong(), and int64. |
|
Swap the bytes in a uint64 value.
Definition at line 240 of file csendian.h. References csLittleEndianLongLong(), and uint64. |
|
Implements a default run-loop for stand-alone applications. This function implements a run-loop for stand-alone applications which do not provide their own run-loop. You only need to call this function if your application does not otherwise implement its own run-loop. For example, an existing Microsoft Windows-based application will already have a run-loop which processes the Windows event-queue, among other tasks. Such an application should not call this function, since doing so would interrupt the existing run-loop and prevent it from running. For each iteration of the run-loop, this function increments the Crystal Space virtual clock (if it is present in the shared-object registry at the time of the call to this function) and processes the Crystal Space event queue (which must be present in the shared-object registry at the time of the call to this function). This function only returns after a csevBroadcast message has been received in the Crystal Space event queue with command code cscmdQuit. The return value of this function indicates whether or not the run-loop was actually able to run. If there was a problem starting the run-loop, then `false' is returned, otherwise `true' is returned. Referenced by csApplicationFramework::Run(). |
|
Convert a double to a cross-platform 64-bit format (no endianess adjustments!).
Definition at line 185 of file csendian.h. References int64. |
|
Expand a filename if it contains shortcuts. Currently the following macros are recognised and expanded: '.', '~', '..', 'drive:' (on DOS/Win32/OS2)The returned filename is always absolute, i.e. it always starts from root. Return a string allocated with csStrNew(). |
|
Expand a native path relative to the current directory.
Referenced by csPluginPaths::AddOnce(). |
|
Finds the smallest number that is a power of two and is larger or equal to n.
|
|
Given
But, do not copy |
|
Get the list of root directories. For instance in Unix it simply returns '/' but for Windows it may return a list of available drive letters. |
|
Convert a float to a cross-platform 32-bit format (no endianess adjustments!).
Definition at line 156 of file csendian.h. Referenced by csSetBigEndianFloat32(), and csSetLittleEndianFloat32(). |
|
Convert a float to a cross-platform 16-bit format (no endianess adjustments!).
Definition at line 217 of file csendian.h. Referenced by csSetBigEndianFloat16(), and csSetLittleEndianFloat16(). |
|
CS version of fputs (<str>, stderr). It accepts UTF-8 strings and converts it, if required, to the platforms native codepage.
|
|
Return the directory in which the application executable resides. For MacOS/X, returns the directory in which the Cocoa application wrapper resides.
|
|
Return the absolute path of the executable. For MacOS/X, returns the absolute path of the executable within the Cocoa application wrapper.
|
|
Read a big-endian 16-bit float from address.
Definition at line 355 of file csendian.h. References csGetBigEndianShort(), csShortToFloat(), and uint16. |
|
Read a big-endian 32-bit float from address.
Definition at line 351 of file csendian.h. References csGetBigEndianLong(), and csLongToFloat(). |
|
Read a big-endian long from address.
Definition at line 340 of file csendian.h. References csBigEndianLong(). Referenced by csGetBigEndianFloat32(). |
|
Read a big-endian short from address.
Definition at line 329 of file csendian.h. References csBigEndianShort(), and uint16. Referenced by csGetBigEndianFloat16(). |
|
Get the installation path. This returns the path where the system has been installed to. It has a limited use because mostly everything should be done through VFS which is installation directory - independent; but some initialization tasks still need this. May return the empty string if unable to determine the installation path. |
|
Return a pointer to a symbol within given shared library. Note that generally Crystal Space needs just one exported symbol from every shared library; the symbol is called {library}_scfInitialize. If your OS is short on features, you may implement querying of just this symbol. |
|
Read a little-endian 16-bit float from address.
Definition at line 294 of file csendian.h. References csGetLittleEndianShort(), csShortToFloat(), and uint16. |
|
Read a little-endian 32-bit float from address.
Definition at line 290 of file csendian.h. References csGetLittleEndianLong(), and csLongToFloat(). |
|
Read a little-endian long from address.
Definition at line 279 of file csendian.h. References csLittleEndianLong(). Referenced by csGetLittleEndianFloat32(). |
|
Read a little-endian short from address.
Definition at line 268 of file csendian.h. References csLittleEndianShort(), and uint16. Referenced by csGetLittleEndianFloat16(). |
|
Query if failed dynamic library loads generate verbose messages.
|
|
Get a platform-specific per-user config object. The data is stored in a platform-specific manner - e.g. in "Documents and Settings\Application Data" on Windows, or $HOME on Unix.
|
|
Get a platform-specific path to store per-user configuration data. The path is in a platform-specific place - e.g. in "Documents and Settings\Application Data" on Windows, or $HOME on Unix.
|
|
Retrive a plugin's metadata.
|
|
Get a list of directories where plugins are installed.
|
|
Return the directory in which the application's resources reside. On many platforms, resources (such as plugin modules) reside in the same directory as the application itself. The default implementation returns the same value as csGetAppPath(), however platforms may want to override the default implementation if this behavior is unsuitable. For example, on MacOS/X, for GUI applications, resources reside in the "Resources" directory within the Cocoa application wrapper.
|
|
Get the current tick count. Warning! Do NOT use this function for controlling game logic speed. To do that you should use the virtual clock (iVirtualClock) which you can get from the object registry. By using the virtual clock it will be possible to control the speed of your game and also to pause it if needed. |
|
Get the username of the account running the program. Returns the username of the owner of the process running the program. If the username can not be determined, then an empty string is returned. |
|
Perform shell-like filename globbing (pattern matching).
The special token
|
|
Returns true if n is a power of two.
|
|
Convert a little-endian floating-point number to machine format.
Definition at line 125 of file csendian.h. Referenced by csConvertEndian(). |
|
Convert a long from little-endian to machine format.
Definition at line 117 of file csendian.h. Referenced by csConvertEndian(), csGetLittleEndianLong(), and csSetLittleEndianLong(). |
|
Convert a longlong from little-endian to machine format.
Definition at line 100 of file csendian.h. References uint64. Referenced by csConvertEndian(). |
|
Convert a short from little-endian to machine format.
Definition at line 121 of file csendian.h. References uint16. Referenced by csConvertEndian(), csGetLittleEndianShort(), and csSetLittleEndianShort(). |
|
Load a shared library and return a library handle, which is used later to query and unload the library. iName is the FULL path to the library. |
|
Find the log2 of 32bit argument.
|
|
Convert a 64-bit cross-platform double to native format (no endianess adjustments!).
Definition at line 197 of file csendian.h. References int64. |
|
Convert a 32-bit cross-platform float to native format (no endianess adjustments!).
Definition at line 167 of file csendian.h. Referenced by csGetBigEndianFloat32(), and csGetLittleEndianFloat32(). |
|
Check whether two native paths actually point to the same location. Use this instead of strcmp() or the like, as it may not suffice in all cases (e.g. on Windows paths names are case-insensitive, but on Unix they aren't).
Referenced by csPluginPaths::AddOnce(). |
|
Platform-specific shutdown. Some platforms on which Crystal Space runs need to perform their own shutdown processing. Typically, this function is automatically called by the higher-level csInitializer::DestroyApplication(), however if you are performing application shutdown manually, you should call it yourself. Returns `true' if shutdown processing was successful, otherwise `false'. |
|
Platform-specific startup. Some platforms on which Crystal Space runs need to perform their own startup processing. For instance, on some platforms, platform-specific "helper" objects may be placed in the shared-object registry for use by other platform-specific components. Typically, this function is automatically called by the higher-level csInitializer::CreateEnvironment(), however if you are performing application initialization manually, you should call it yourself. Returns `true' if startup initialization was successful, otherwise `false'. |
|
CS version of printf. It accepts UTF-8 strings and converts it, if required, to the platforms native codepage. Referenced by csReporterHelper::ReportV(). |
|
CS version of fprintf (stderr, str, ...). It accepts UTF-8 strings and converts it, if required, to the platforms native codepage.
|
|
CS version of vfprintf (stderr, str, ...). It accepts UTF-8 strings and converts it, if required, to the platforms native codepage.
|
|
CS version of vprintf. It accepts UTF-8 strings and converts it, if required, to the platforms native codepage. Referenced by csReporterHelper::ReportV(). |
|
Print out the latest dynamic loader error. This is not strictly required (and on some platforms its just a empty routine) but sometimes it helps to find problems. |
|
Scan a given directory for plugins and return a list of the plugin native file names and their respective metadata.
|
|
Scan some given directories for plugins.
Accepts the same parameters as csScanPluginDir(), with the exception of |
|
Set a big-endian 16-bit float on a address.
Definition at line 385 of file csendian.h. References csFloatToShort(), and csSetBigEndianShort(). |
|
Set a big-endian 32-bit float on a address.
Definition at line 381 of file csendian.h. References csFloatToLong(), and csSetBigEndianLong(). |
|
Set a big-endian long on a address.
Definition at line 370 of file csendian.h. References csBigEndianLong(). Referenced by csSetBigEndianFloat32(). |
|
Set a big-endian short on a address.
Definition at line 359 of file csendian.h. References csBigEndianShort(), and uint16. Referenced by csSetBigEndianFloat16(). |
|
Set a little-endian 16-bit float on a address.
Definition at line 324 of file csendian.h. References csFloatToShort(), and csSetLittleEndianShort(). |
|
Set a little-endian 32-bit float on a address.
Definition at line 320 of file csendian.h. References csFloatToLong(), and csSetLittleEndianLong(). |
|
Set a little-endian long on a address.
Definition at line 309 of file csendian.h. References csLittleEndianLong(). Referenced by csSetLittleEndianFloat32(). |
|
Set a little-endian short on a address.
Definition at line 298 of file csendian.h. References csLittleEndianShort(), and uint16. Referenced by csSetLittleEndianFloat16(). |
|
Control whether dynamic library loading messages are verbose or terse. When verbose, and a library fails to load, csPrintLibraryError() is invoked to emit detailed diagnostic information regarding the failure. If terse, then a simple message is emitted stating that the library failed to load and instructing the user to use the -verbose command-line option for more details. Verbose messages are enabled by default for debug builds; terse messages for optimized builds. |
|
Convert a 16-bit cross-platform float to native format (no endianess adjustments!).
Definition at line 228 of file csendian.h. Referenced by csGetBigEndianFloat16(), and csGetLittleEndianFloat16(). |
|
This function will freeze your application for given number of 1/1000 seconds. The function is very inaccurate, so don't use it for accurate timing. It may be useful when the application is idle, to explicitly release CPU for other tasks in multi-tasking operating systems. |
|
Split a pathname into separate path and name.
|
|
Perform case-insensitive string comparison.
Returns a negative number if Referenced by csStringArray::FindCaseInsensitive(). |
|
Perform case-insensitive string comparison of the first
Returns a negative number if the n-character prefix of Referenced by csString::CompareNoCase(), csReporterHelper::ReportV(), and csString::StartsWith(). |
|
Allocate a new char [] and copy an UTF-8 version of the string into the newly allocated storage.
Referenced by csPluginPaths::AddOnce(), csWtoC::csWtoC(), csImageBase::SetName(), and csVariant::SetString(). |
|
Allocate a new char [] and copy the string into the newly allocated storage. This is a handy method for copying strings, in fact it is the C++ analogue of the strdup() function from string.h (strdup() is not present on some platforms). To free the pointer the caller should call delete[]. Referenced by csPluginPaths::AddOnce(). |
|
Allocate a new widechar [] and copy the string converted from UTF-8 into the newly allocated storage.
Referenced by csCtoW::csCtoW(). |
|
Allocate a new widechar [] and the string into the newly allocated storage.
|
|
Unload a shared library given its handle. The function returns false on error. |
|
Helper function to use a reporter easily. This function will also work if no reporter is present and use stdout in that case.
Definition at line 367 of file reporter.h. References csReporterHelper::ReportV(). |
|
Report bug.
Definition at line 282 of file reporter.h. References CS_REPORTER_SEVERITY_BUG. |
|
Report debug.
Definition at line 291 of file reporter.h. References CS_REPORTER_SEVERITY_DEBUG. |
|
Report error.
Definition at line 255 of file reporter.h. References CS_REPORTER_SEVERITY_ERROR. |
|
Report notification.
Definition at line 273 of file reporter.h. References CS_REPORTER_SEVERITY_NOTIFY. |
|
Helper function to use a reporter easily. This function will also work if no reporter is present and use stdout in that case.
Definition at line 328 of file reporter.h. References CS_ANSI_BK, CS_ANSI_FI, CS_ANSI_FM, CS_ANSI_FR, CS_ANSI_FW, CS_ANSI_FY, CS_ANSI_RST, CS_REPORTER_SEVERITY_BUG, CS_REPORTER_SEVERITY_DEBUG, CS_REPORTER_SEVERITY_ERROR, CS_REPORTER_SEVERITY_NOTIFY, CS_REPORTER_SEVERITY_WARNING, csPrintf(), csPrintfV(), and csStrNCaseCmp(). Referenced by csReporterHelper::Report(). |
|
Report warning.
Definition at line 264 of file reporter.h. References CS_REPORTER_SEVERITY_WARNING. |
Generated for Crystal Space by doxygen 1.3.9.1