![]() |
Public API Reference |
Assorted utility functions and classes that doesn't belong anywhere else. More...
Namespaces | |
| namespace | BitOps |
Bit operations. | |
| namespace | ResourceCache |
Mixins intended for use with GenericResourceCache<>. | |
Classes | |
| class | AtomicRefCount |
| This is a class which provides basic atomic reference-counting semantics. More... | |
| class | DemoApplication |
| Crystal Space demo application framework class. More... | |
| class | FastRefCount |
| This is a class which provides basic reference-counting semantics. More... | |
| class | FixedSizeBestChoiceLRUPolicy |
| LRU policy deciding between array LRU and pseudo-LRU based on set size. More... | |
| class | FixedSizeCache |
| Templated fixed size cache class. More... | |
| class | FixedSizeLRUPolicy |
| LRU policy using an array based fixed-size LRU. More... | |
| class | FixedSizePseudoLRUPolicy |
| LRU policy using bit-tree base pseudo-LRU. More... | |
| class | GenericResourceCache |
| Generic cache for resources. More... | |
| struct | GraphEdge |
| Represent an edge in a graph. More... | |
| struct | iCameraManager |
| A generic tool to control the motion of the camera through the keyboard and/or the mouse. More... | |
| struct | iHUDManager |
| A generic tool managing the display of a minimal text-based HUD, eg for applications implementing CS::Utility::DemoApplication or providing a user interface through the keyboard. More... | |
| class | ImportKit |
| Crystal Space Import Kit. More... | |
| class | InternalRefCount |
| This class is used to hold a reference count seperate to the normal one. More... | |
| class | PriorityQueue |
| An implementation of a priority queue. More... | |
| class | RootedHierarchicalCache |
| iHierarchicalCache providing a 'view' into a path of another cache. More... | |
| class | ScopedDelete |
Helper class to delete a pointer when exiting a scope. More... | |
| class | ScopedPointer |
| Smart pointer that deletes the contained pointer when the scope is exited. More... | |
| class | StringArray |
| An array of strings. More... | |
| class | StringHash |
| A string-to-ID hash table. More... | |
| class | StringSet |
| The string set is a collection of unique strings. More... | |
| class | VfsHierarchicalCache |
| This is a general cache that can cache data on VFS. More... | |
| class | WeakReferenced |
| This is a class which provides basic weak reference-counting semantics. More... | |
Enumerations | |
| enum | CameraMode { CAMERA_NO_MOVE = 0, CAMERA_MOVE_FREE, CAMERA_MOVE_LOOKAT, CAMERA_ROTATE } |
| Various camera modes which can be used with CS::Utility::CameraManager. More... | |
Functions | |
| csString | ftostr (float f) |
| Convert a float to a string, and attempting to keep as much precision as possible. | |
| int | setenv (char const *key, char const *value, bool overwrite) |
| Set an environment variable, much like POSIX setenv() but portably. | |
| bool | SmartChDir (iVFS *vfs, const char *path, const char *defaultFilename=0, const char **actualFilename=0) |
| "Smartly" change to the directory with some file given a path that could be: a plain file name, directory, name of a level in /lev/, or .zip file. | |
| csPtr< iFile > | SmartFileOpen (iVFS *vfs, const char *path, const char *defaultFilename=0, const char **actualFilename=0) |
| "Smartly" try to locate a file given a path that could be: a plain file name, directory, name of a level in /lev/, or .zip file. | |
| float | strtof (const char *str, const char **end=0) |
| Convert a string to float value independent of the locale. | |
| csArray< size_t > | TopologicalSort (csArray< GraphEdge > &inputGraph) |
| Do a topological sort on a graph defined by its edges. | |
| csString | EncodeBase64 (void *data, size_t size) |
| Base64-encode the given data buffer. | |
| csString | EncodeBase64 (iDataBuffer *data) |
| Base64-encode the given data buffer. | |
Assorted utility functions and classes that doesn't belong anywhere else.
Various camera modes which can be used with CS::Utility::CameraManager.
Definition at line 44 of file cameramanager.h.
| csString CS::Utility::EncodeBase64 | ( | void * | data, |
| size_t | size | ||
| ) |
Base64-encode the given data buffer.
| csString CS::Utility::EncodeBase64 | ( | iDataBuffer * | data | ) | [inline] |
| csString CS::Utility::ftostr | ( | float | f | ) |
Convert a float to a string, and attempting to keep as much precision as possible.
| f | The float value to convert. |
| int CS::Utility::setenv | ( | char const * | key, |
| char const * | value, | ||
| bool | overwrite | ||
| ) |
Set an environment variable, much like POSIX setenv() but portably.
| key | Environment variable name. |
| value | Value for environment variable. |
| overwrite | If false, set the environment variable only if it does not already have a value, else set it unconditionally. |
| bool CS::Utility::SmartChDir | ( | iVFS * | vfs, |
| const char * | path, | ||
| const char * | defaultFilename = 0, |
||
| const char ** | actualFilename = 0 |
||
| ) |
"Smartly" change to the directory with some file given a path that could be: a plain file name, directory, name of a level in /lev/, or .zip file.
path is tried to be interpreted in a number of different ways:
/lev/. Succeeds if a file named defaultFilename exists below that directory..zip file name. Succeeds if a file named defaultFilename exists in the archive.This is for example useful for tool applications which want to let the user specify paths and file locations in a variety of ways.
| vfs | The VFS interface to use to open the file. |
| path | The path that is attempted to be opened. |
| defaultFilename | Default filename, used to check whether the provided path is a directory or .zip file. |
| actualFilename | Can return the filename used to determine the directory to change to. (Note: is either defaultFilename or a pointer into path). |
| csPtr<iFile> CS::Utility::SmartFileOpen | ( | iVFS * | vfs, |
| const char * | path, | ||
| const char * | defaultFilename = 0, |
||
| const char ** | actualFilename = 0 |
||
| ) |
"Smartly" try to locate a file given a path that could be: a plain file name, directory, name of a level in /lev/, or .zip file.
path is tried to be interpreted in a number of different ways:
/lev/. Succeeds if a file named defaultFilename exists below that directory..zip file name. Succeeds if a file named defaultFilename exists in the archive.This is for example useful for tool applications which want to let the user specify paths and file locations in a variety of ways.
| vfs | The VFS interface to use to open the file. |
| path | The path that is attempted to be opened. |
| defaultFilename | Default filename, used when the provided path is a directory or .zip file. |
| actualFilename | Can return the actual filename opened. (Note: is either defaultFilename or a pointer into path). |
| float CS::Utility::strtof | ( | const char * | str, |
| const char ** | end = 0 |
||
| ) |
Convert a string to float value independent of the locale.
| str | The string to convert. |
| end | If not 0 receives pointer to the first character after the converted value. |
| csArray<size_t> CS::Utility::TopologicalSort | ( | csArray< GraphEdge > & | inputGraph | ) |
Do a topological sort on a graph defined by its edges.
Returns the vertices in a topological order.
| inputGraph | the edges defining the graph |