Assorted utility functions and classes that doesn't belong anywhere else. More...
Mixins intended for use with GenericResourceCache<>.
|This is a class which provides basic reference-counting semantics. More...|
|Generic cache for resources. More...|
|Represent an edge in a graph. More...|
|Crystal Space Import Kit. More...|
|This class is used to hold a reference count seperate to the normal one. More...|
|An implementation of a priority queue. More...|
|Helper class to |
|This is a class which provides basic weak reference-counting semantics. More...|
|int||setenv (char const *key, char const *value, bool overwrite)|
|Set an environment variable, much like POSIX setenv() but portably. |
|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. |
Assorted utility functions and classes that doesn't belong anywhere else.
|int CS::Utility::setenv||(||char const *||key,|
|char const *||value,|
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.
- 0 upon success, else -1 and errno is set with failure reason.
|csPtr<iFile> CS::Utility::SmartFileOpen||(||iVFS *||vfs,|
|const char *||path,|
|const char *|| defaultFilename =
|const char **|| actualFilename = |
"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.
Try to open a file given a path that could be any of a VFS path, a plain file name or directory in the real file system, name of a level in /lev/, or .zip file.
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.
- The file if opening succeeded.
|float CS::Utility::strtof||(||const char *||str,|
|const char **|| end = |
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.
Do a topological sort on a graph defined by its edges.
Returns the vertices in a topological order.
- If the graph is in fact cyclic the returned array will not contain all nodes.
inputGraph the edges defining the graph
Generated for Crystal Space 1.4.1 by doxygen 1.7.1