csPathsList Class Reference
[Utilities]
Class to manage a list of paths.
More...
#include <csutil/syspath.h>
Classes | |
| struct | Entry |
| This structure contains information about a plugin path. More... | |
Public Member Functions | |
| void | AddUnique (const csPathsList &list, bool overrideRecursive=true) |
| Add entries of another path list that aren't already in this list. | |
| size_t | AddUnique (const Entry &path, bool overrideRecursive=true) |
| Add a path, but only if it isn't in the list already. | |
| size_t | AddUnique (const char *path, bool scanRecursive=false, const char *type=0, bool overrideRecursive=true) |
| Add a path, but only if it isn't in the list already. | |
| void | AddUniqueExpanded (const csPathsList &list, bool overrideRecursive=true) |
| Add a path, but only if it isn't in the list already. | |
| size_t | AddUniqueExpanded (const Entry &path, bool overrideRecursive=true) |
| Add a path, but only if it isn't in the list already. | |
| size_t | AddUniqueExpanded (const char *path, bool scanRecursive=false, const char *type=0, bool overrideRecursive=true) |
| Add a path, but only if it isn't in the list already. | |
| csPathsList (const char *const pathList[], bool expand=false) | |
| Construct from a list of single paths. | |
| csPathsList (const char *pathList, bool expand=false) | |
| Construct from a list of paths separated by CS_PATH_DELIMITER. | |
| csPathsList (csPathsList const &o) | |
| Copy constructor. | |
| csPathsList () | |
| Constructor. | |
| void | DeleteIndex (size_t index) |
| Remove an entry from the list. | |
| csPathsList & | operator= (csPathsList const &o) |
| Assignment operator. | |
| ~csPathsList () | |
| Destructor. | |
| size_t | GetSize () const |
| Return number of contained paths. | |
| size_t | Length () const |
| Return number of contained paths. | |
| Entry & | operator[] (size_t n) |
| Retrieve the n'th path record. | |
| Entry const & | operator[] (size_t n) const |
| Retrieve the n'th path record. | |
| csPathsList | operator*= (const char *right) |
| Create a list of paths where all paths are those on the left side concatenated with those on the right (of course with a CS_PATH_SEPARATOR ensured to be in between). | |
| csPathsList | operator*= (const Entry &right) |
| Create a list of paths where all paths are those on the left side concatenated with those on the right (of course with a CS_PATH_SEPARATOR ensured to be in between). | |
| csPathsList | operator*= (const csPathsList &right) |
| Create a list of paths where all paths are those on the left side concatenated with those on the right (of course with a CS_PATH_SEPARATOR ensured to be in between). | |
| csPathsList | operator* (const csPathsList &left, const char *right) |
| Create a list of paths where all paths are those on the left side concatenated with those on the right (of course with a CS_PATH_SEPARATOR ensured to be in between). | |
| csPathsList | operator* (const csPathsList &left, const Entry &right) |
| Create a list of paths where all paths are those on the left side concatenated with those on the right (of course with a CS_PATH_SEPARATOR ensured to be in between). | |
| csPathsList | operator* (const char *left, const csPathsList &right) |
| Create a list of paths where all paths are those on the left side concatenated with those on the right (of course with a CS_PATH_SEPARATOR ensured to be in between). | |
| csPathsList | operator* (const Entry &left, const csPathsList &right) |
| Create a list of paths where all paths are those on the left side concatenated with those on the right (of course with a CS_PATH_SEPARATOR ensured to be in between). | |
| csPathsList | operator* (const csPathsList &left, const csPathsList &right) |
| Create a list of paths where all paths are those on the left side concatenated with those on the right (of course with a CS_PATH_SEPARATOR ensured to be in between). | |
Detailed Description
Class to manage a list of paths.
- Remarks:
- Entries are ensured to not have a terminating path separator.
Empty entries ("") are allowed.
Definition at line 62 of file syspath.h.
Constructor & Destructor Documentation
| csPathsList::csPathsList | ( | csPathsList const & | o | ) | [inline] |
| csPathsList::csPathsList | ( | const char * | pathList, | |
| bool | expand = false | |||
| ) |
Construct from a list of paths separated by CS_PATH_DELIMITER.
| csPathsList::csPathsList | ( | const char *const | pathList[], | |
| bool | expand = false | |||
| ) |
Construct from a list of single paths.
The list must be terminated by a 0 entry.
Member Function Documentation
| void csPathsList::AddUnique | ( | const csPathsList & | list, | |
| bool | overrideRecursive = true | |||
| ) | [inline] |
| size_t csPathsList::AddUnique | ( | const Entry & | path, | |
| bool | overrideRecursive = true | |||
| ) |
Add a path, but only if it isn't in the list already.
- Parameters:
-
path Path to add to the list. overrideRecursive If the path is already in the list, just set the 'scan recursive' flag.
- Returns:
- Index of path in the list.
- Remarks:
- Uses csPathsIdentical() to compare paths.
| size_t csPathsList::AddUnique | ( | const char * | path, | |
| bool | scanRecursive = false, |
|||
| const char * | type = 0, |
|||
| bool | overrideRecursive = true | |||
| ) |
Add a path, but only if it isn't in the list already.
- Parameters:
-
path Path to add to the list. scanRecursive Mark the path to be scanned recursively. type An arbitrary string assigning a type to the directory (i.e. "app", "crystal", etc.). overrideRecursive If the path is already in the list, just set the 'scan recursive' flag.
- Returns:
- Index of path in the list.
- Remarks:
- Uses csPathsIdentical() to compare paths.
| void csPathsList::AddUniqueExpanded | ( | const csPathsList & | list, | |
| bool | overrideRecursive = true | |||
| ) | [inline] |
| size_t csPathsList::AddUniqueExpanded | ( | const Entry & | path, | |
| bool | overrideRecursive = true | |||
| ) |
Add a path, but only if it isn't in the list already.
Add a path, but only if it isn't in the list already.
- Parameters:
-
path Path to add to the list. overrideRecursive If the path is already in the list, just set the 'scan recursive' flag.
- Returns:
- Index of path in the list.
- Remarks:
- Uses csPathsIdentical() to compare paths.
- Remarks:
- Saves full native paths and uses csExpandPath() for this.
| size_t csPathsList::AddUniqueExpanded | ( | const char * | path, | |
| bool | scanRecursive = false, |
|||
| const char * | type = 0, |
|||
| bool | overrideRecursive = true | |||
| ) |
Add a path, but only if it isn't in the list already.
Add a path, but only if it isn't in the list already.
- Parameters:
-
path Path to add to the list. scanRecursive Mark the path to be scanned recursively. type An arbitrary string assigning a type to the directory (i.e. "app", "crystal", etc.). overrideRecursive If the path is already in the list, just set the 'scan recursive' flag.
- Returns:
- Index of path in the list.
- Remarks:
- Uses csPathsIdentical() to compare paths.
- Remarks:
- Saves full native paths and uses csExpandPath() for this.
| void csPathsList::DeleteIndex | ( | size_t | index | ) | [inline] |
| size_t csPathsList::GetSize | ( | ) | const [inline] |
| size_t csPathsList::Length | ( | ) | const [inline] |
| csPathsList csPathsList::operator*= | ( | const char * | right | ) | [inline] |
| csPathsList csPathsList::operator*= | ( | const Entry & | right | ) | [inline] |
| csPathsList csPathsList::operator*= | ( | const csPathsList & | right | ) | [inline] |
| csPathsList& csPathsList::operator= | ( | csPathsList const & | o | ) | [inline] |
| Entry& csPathsList::operator[] | ( | size_t | n | ) | [inline] |
| Entry const& csPathsList::operator[] | ( | size_t | n | ) | const [inline] |
Friends And Related Function Documentation
| csPathsList operator* | ( | const csPathsList & | left, | |
| const char * | right | |||
| ) | [friend] |
| csPathsList operator* | ( | const csPathsList & | left, | |
| const Entry & | right | |||
| ) | [friend] |
| csPathsList operator* | ( | const char * | left, | |
| const csPathsList & | right | |||
| ) | [friend] |
| csPathsList operator* | ( | const Entry & | left, | |
| const csPathsList & | right | |||
| ) | [friend] |
| csPathsList operator* | ( | const csPathsList & | left, | |
| const csPathsList & | right | |||
| ) | [friend] |
Create a list of paths where all paths are those on the left side concatenated with those on the right (of course with a CS_PATH_SEPARATOR ensured to be in between).
The documentation for this class was generated from the following file:
- csutil/syspath.h
Generated for Crystal Space 1.4.0 by doxygen 1.5.8
