The purpose of this class is to provide a way to order the search path of files. More...
#include <ilog/pathlist.h>
Public Member Functions | |
IlPathList () | |
Initializes a new empty IlPathList object. More... | |
IlPathList (const IlString &pathList) | |
Initializes a new IlPathList object from a list of paths. More... | |
void | addInList (const IlPathList &pathList) |
Adds a path list to the end of the list list. More... | |
void | addInList (const IlPathName &path) |
Adds a path to the end of the list list. More... | |
void | addInList (const IlString &pathList) |
Adds a path list to the end of the list list. More... | |
void | addInPostList (const IlPathList &pathList) |
Adds a path list to the end of the list postList. More... | |
void | addInPostList (const IlPathName &path) |
Adds a path to the end of the list postList. More... | |
void | addInPostList (const IlString &pathList) |
Adds a path list to the end of the list postList. More... | |
void | addInPrevList (const IlPathList &pathList) |
Adds a path list to the end of the list prevList. More... | |
void | addInPrevList (const IlPathName &path) |
Adds a path to the end of the list prevList. More... | |
void | addInPrevList (const IlString &pathList) |
Adds a path list to the end of the list prevList. More... | |
IlBoolean | findInPath (const IlPathName &relative, IlPathName &result, IlBoolean verbose=IlFalse) const |
Searches for an existing file in the search path. More... | |
IlString | getListString () const |
Returns a representation of the list list. More... | |
IlString | getPostListString () const |
Returns a representation of the list postList. More... | |
IlString | getPrevListString () const |
Returns a representation of the list prevList. More... | |
IlString | getString () const |
Returns a representation of the entire search path. More... | |
void | insertInList (const IlPathList &pathList) |
Inserts a path list at the beginning of the list list. More... | |
void | insertInList (const IlPathName &path) |
Inserts a path at the beginning of the list list. More... | |
void | insertInList (const IlString &pathList) |
Inserts a path list at the beginning of the list list. More... | |
void | insertInPostList (const IlPathList &pathList) |
Inserts a path list at the beginning of the list postList. More... | |
void | insertInPostList (const IlPathName &path) |
Inserts a path at the beginning of the list postList. More... | |
void | insertInPostList (const IlString &pathList) |
Inserts a path list at the beginning of the list postList. More... | |
void | insertInPrevList (const IlPathList &pathList) |
Inserts a path list at the beginning of the list prevList. More... | |
void | insertInPrevList (const IlPathName &path) |
Inserts a path at the beginning of the list prevList. More... | |
void | insertInPrevList (const IlString &pathList) |
Inserts a path list at the beginning of the list prevList. More... | |
void | removeFromList (const IlPathName &path) |
Removes a path from the list list. More... | |
void | removeFromList (const IlString &pathList) |
Removes a list of paths from the list list. More... | |
void | removeFromPostList (const IlPathName &path) |
Removes a path from the list postList. More... | |
void | removeFromPostList (const IlString &pathList) |
Removes a list of paths from the list postList. More... | |
void | removeFromPrevList (const IlPathName &path) |
Removes a path from the list prevList. More... | |
void | removeFromPrevList (const IlString &pathList) |
Removes a list of paths from the list prevList. More... | |
void | setList (const IlPathList &pathList) |
Replaces the list list with a path list. More... | |
void | setList (const IlPathName &path) |
Replaces the list list with a single path. More... | |
void | setList (const IlString &pathList) |
Replaces the list list with a path list. More... | |
void | setPostList (const IlPathList &pathList) |
Replaces the list postList with a path list. More... | |
void | setPostList (const IlPathName &path) |
Replaces the list postList with a single path. More... | |
void | setPostList (const IlString &pathList) |
Replaces the list postList with a path list. More... | |
void | setPrevList (const IlPathList &pathList) |
Replaces the list prevList with a path list. More... | |
void | setPrevList (const IlPathName &path) |
Replaces the list prevList with a single path. More... | |
void | setPrevList (const IlString &pathList) |
Replaces the list prevList with a path list. More... | |
void | unique () |
Removes the duplicated paths. | |
The purpose of this class is to provide a way to order the search path of files.
Library: ilog
This class has three sub-lists of path names that we will call: prevList, list, and postList.
The search for a relative path name is done according to the order given above: the actual search path is the concatenation of prevList, list, and postList, in this order.
The search is stopped as soon as a file that matches is found.
IlPathName
. IlPathList::IlPathList | ( | ) |
Initializes a new empty IlPathList
object.
IlPathList(const IlString&)
. IlPathList::IlPathList | ( | const IlString & | pathList | ) |
Initializes a new IlPathList
object from a list of paths.
The string defines a list of path name separated by a :
on Unix and a ;
on Windows. These path names are stored in list. The lists prevList and postList are empty.
pathList | A list of paths to initialize this object. |
IlPathList()
. void IlPathList::addInList | ( | const IlPathList & | pathList | ) |
Adds a path list to the end of the list list.
pathList | The list of paths that are added. |
void IlPathList::addInList | ( | const IlPathName & | path | ) |
Adds a path to the end of the list list.
path | The path that is added. |
void IlPathList::addInList | ( | const IlString & | pathList | ) |
Adds a path list to the end of the list list.
This string defines a list of path names separated by a :
on Unix and a ;
on Windows.
pathList | The list of paths that are added. |
void IlPathList::addInPostList | ( | const IlPathList & | pathList | ) |
Adds a path list to the end of the list postList.
pathList | The list of paths that are added. |
void IlPathList::addInPostList | ( | const IlPathName & | path | ) |
Adds a path to the end of the list postList.
path | The path that is added. |
void IlPathList::addInPostList | ( | const IlString & | pathList | ) |
Adds a path list to the end of the list postList.
This string defines a list of path names separated by a :
on Unix and a ;
on Windows.
pathList | The list of paths that are added. |
void IlPathList::addInPrevList | ( | const IlPathList & | pathList | ) |
Adds a path list to the end of the list prevList.
pathList | The list of paths that are added. |
void IlPathList::addInPrevList | ( | const IlPathName & | path | ) |
Adds a path to the end of the list prevList.
path | The path that is added. |
void IlPathList::addInPrevList | ( | const IlString & | pathList | ) |
Adds a path list to the end of the list prevList.
This string defines a list of path names separated by a :
on Unix and a ;
on Windows.
pathList | The list of paths that are added. |
IlBoolean IlPathList::findInPath | ( | const IlPathName & | relative, |
IlPathName & | result, | ||
IlBoolean | verbose = IlFalse |
||
) | const |
Searches for an existing file in the search path.
The search is done by concatenating the path name relative to each path names of prevList, list, and postList (in this order). As soon as a file is found, this function return IlTrue and sets result to the corresponding value. If no file is found, this function returns IlFalse, and result is not modified.
relative | A const reference to an IlPathName object. |
result | A reference to an IlPathName object. |
verbose | An IlBoolean . The default value is IlFalse . If set to IlTrue , messages that indicate what files are found where are sent to std::cout . |
IlString IlPathList::getListString | ( | ) | const |
Returns a representation of the list list.
The path names are separated by a :
on Unix and a ;
on Windows.
getPrevListString()
, getString()
, getPostListString()
. IlString IlPathList::getPostListString | ( | ) | const |
Returns a representation of the list postList.
The path names are separated by a :
on Unix and a ;
on Windows.
getString()
, getPrevListString()
, getListString()
. IlString IlPathList::getPrevListString | ( | ) | const |
Returns a representation of the list prevList.
The path names are separated by a :
on Unix and a ;
on Windows.
getString()
, getListString()
, getPostListString()
. IlString IlPathList::getString | ( | ) | const |
Returns a representation of the entire search path.
The string contains all the path names in the order defined by the lists, separated by a :
on Unix and a ;
on Windows.
void IlPathList::insertInList | ( | const IlPathList & | pathList | ) |
Inserts a path list at the beginning of the list list.
pathList | The list of paths that are inserted. |
void IlPathList::insertInList | ( | const IlPathName & | path | ) |
Inserts a path at the beginning of the list list.
path | The path to be inserted. |
void IlPathList::insertInList | ( | const IlString & | pathList | ) |
Inserts a path list at the beginning of the list list.
This string defines a list of path names separated by a :
on Unix and a ;
on Windows.
pathList | The list of paths that are inserted. |
void IlPathList::insertInPostList | ( | const IlPathList & | pathList | ) |
Inserts a path list at the beginning of the list postList.
pathList | The list of paths that are inserted. |
void IlPathList::insertInPostList | ( | const IlPathName & | path | ) |
Inserts a path at the beginning of the list postList.
path | The path to be inserted. |
void IlPathList::insertInPostList | ( | const IlString & | pathList | ) |
Inserts a path list at the beginning of the list postList.
This string defines a list of path names separated by a :
on Unix and a ;
on Windows.
pathList | The list of paths that are inserted. |
void IlPathList::insertInPrevList | ( | const IlPathList & | pathList | ) |
Inserts a path list at the beginning of the list prevList.
pathList | The list of paths that are inserted. |
void IlPathList::insertInPrevList | ( | const IlPathName & | path | ) |
Inserts a path at the beginning of the list prevList.
path | The path to be inserted. |
void IlPathList::insertInPrevList | ( | const IlString & | pathList | ) |
Inserts a path list at the beginning of the list prevList.
This string defines a list of path names separated by a :
on Unix and a ;
on Windows.
pathList | The list of paths that are inserted. |
void IlPathList::removeFromList | ( | const IlPathName & | path | ) |
Removes a path from the list list.
path | The path to be removed. |
void IlPathList::removeFromList | ( | const IlString & | pathList | ) |
Removes a list of paths from the list list.
This string defines a list of path names separated by a :
on Unix and a ;
on Windows.
pathList | The list of paths to be removed. |
void IlPathList::removeFromPostList | ( | const IlPathName & | path | ) |
Removes a path from the list postList.
path | The path to be removed. |
void IlPathList::removeFromPostList | ( | const IlString & | pathList | ) |
Removes a list of paths from the list postList.
This string defines a list of path names separated by a :
on Unix and a ;
on Windows.
pathList | The list of paths to be removed. |
void IlPathList::removeFromPrevList | ( | const IlPathName & | path | ) |
Removes a path from the list prevList.
path | The path to be removed. |
void IlPathList::removeFromPrevList | ( | const IlString & | pathList | ) |
Removes a list of paths from the list prevList.
This string defines a list of path names separated by a :
on Unix and a ;
on Windows.
pathList | The list of paths to be removed. |
void IlPathList::setList | ( | const IlPathList & | pathList | ) |
Replaces the list list with a path list.
pathList | The list of paths that replaces the list path list. |
void IlPathList::setList | ( | const IlPathName & | path | ) |
Replaces the list list with a single path.
path | The path that replaces the list path list. |
void IlPathList::setList | ( | const IlString & | pathList | ) |
Replaces the list list with a path list.
This string defines a list of path names separated by a :
on Unix and a ;
on Windows.
pathList | The list of paths that replaces the list path list. |
void IlPathList::setPostList | ( | const IlPathList & | pathList | ) |
Replaces the list postList with a path list.
pathList | The list of paths that replaces the postList path list. |
void IlPathList::setPostList | ( | const IlPathName & | path | ) |
Replaces the list postList with a single path.
path | The path that replaces the postList path list. |
void IlPathList::setPostList | ( | const IlString & | pathList | ) |
Replaces the list postList with a path list.
This string defines a list of path names separated by a :
on Unix and a ;
on Windows.
pathList | The list of paths that replaces the postList path list. |
void IlPathList::setPrevList | ( | const IlPathList & | pathList | ) |
Replaces the list prevList with a path list.
pathList | The list of paths that replaces the prevList path list. |
void IlPathList::setPrevList | ( | const IlPathName & | path | ) |
Replaces the list prevList with a single path.
path | The path that replaces the prevList path list. |
void IlPathList::setPrevList | ( | const IlString & | pathList | ) |
Replaces the list prevList with a path list.
This string defines a list of path names separated by a :
on Unix and a ;
on Windows.
pathList | The list of paths that replaces the prevList path list. |