gxPath Class Reference

Represents a file path as a collection of path segments. More...

#include <gxPath.h>

List of all members.

Public Types

typedef std::list< std::string > segments_t
typedef segments_t::iterator iterator

Public Member Functions

 gxPath ()
virtual ~gxPath ()
void appendSegment (const char *seg)
 Append segment to this path.
iterator begin ()
 Returns an interator to the first segment in the path.
iterator end ()
 Returns an interator which points to the non-existent element just after the end of the collection.
std::string getDevice ()
 Return the device portion of the path (ex.
segments_tgetSegments ()
 Return the collection of segments.
bool isAbsolute ()
 Specifies whether this is an absolute path (true -

, c:

) or a relative path (false "a\b\c").

std::string toOSString ()
 Returns an OS compatible string representation of this path.
gxPath upToSegment (iterator segment)
 Create a new path containing all segments of this path up to but not including the segment specified by the iterator.

Static Public Member Functions

static gxPath fromOSString (const char *pathString)
 Create a new path from the given OS path string.


Detailed Description

Represents a file path as a collection of path segments.

Loosely inspired by the Eclipse Path/IPath classes.


Member Typedef Documentation

typedef segments_t::iterator gxPath::iterator
 

typedef std::list<std::string> gxPath::segments_t
 


Constructor & Destructor Documentation

gxPath::gxPath  ) 
 

virtual gxPath::~gxPath  )  [virtual]
 


Member Function Documentation

void gxPath::appendSegment const char *  seg  ) 
 

Append segment to this path.

iterator gxPath::begin  ) 
 

Returns an interator to the first segment in the path.

Works like begin in a typical STL class. Must test against the value of end to determine if caller has reached the end of the collection.

iterator gxPath::end  ) 
 

Returns an interator which points to the non-existent element just after the end of the collection.

static gxPath gxPath::fromOSString const char *  pathString  )  [static]
 

Create a new path from the given OS path string.

std::string gxPath::getDevice  ) 
 

Return the device portion of the path (ex.

"C:"). If there is no device, return ""

segments_t& gxPath::getSegments  ) 
 

Return the collection of segments.

bool gxPath::isAbsolute  ) 
 

Specifies whether this is an absolute path (true -

, c:

) or a relative path (false "a\b\c").

std::string gxPath::toOSString  ) 
 

Returns an OS compatible string representation of this path.

gxPath gxPath::upToSegment iterator  segment  ) 
 

Create a new path containing all segments of this path up to but not including the segment specified by the iterator.


The documentation for this class was generated from the following file:
Generated on Mon Nov 21 01:01:37 2005 for gxLib by  doxygen 1.4.5