Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

base::PathName Class Reference

Inheritance diagram for base::PathName:

Inheritance graph
[legend]
Collaboration diagram for base::PathName:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PathName ()
 PathName (const String &name) throw (std::invalid_argument)
 PathName (const PathName &pn)
virtual ~PathName ()
virtual String className () const
virtual void parent ()
 !! should check for valid dir name

virtual void canonical ()
virtual String str () const
virtual PathName path () const
virtual PathName name () const
virtual String extension () const
virtual bool isRelative () const
virtual bool isAbsolute () const
virtual bool isSimple () const
virtual PathNameprepend (const String &prefix)
virtual Int size () const
virtual bool empty () const
virtual String operator[] (Int i) const
virtual String operator() (Int i) const
virtual bool operator== (const PathName &pn) const
virtual bool operator!= (const PathName &pn) const
virtual bool operator== (const String &pn) const
virtual bool operator!= (const String &pn) const
virtual PathNameoperator= (const PathName &pn)
virtual PathNameoperator+= (const PathName &pn)
virtual Objectclone () const
virtual bool isSameKindAs (const Object &) const

Static Public Member Functions

bool validName (const String &name)
bool validPath (const String &name)
 !! should check for no '/'s, only one '.', first is alpha etc.


Static Public Attributes

const char separator = '/'
const String currentDirectory
const String parentDirectory

Protected Types

typedef array< PathComponentPathComponents

Protected Attributes

bool relative
PathComponents _path

Member Typedef Documentation

typedef array<PathComponent> base::PathName::PathComponents [protected]
 

Definition at line 83 of file PathName.


Constructor & Destructor Documentation

base::PathName::PathName  ) 
 

base::PathName::PathName const String name  )  throw (std::invalid_argument)
 

base::PathName::PathName const PathName pn  ) 
 

virtual base::PathName::~PathName  )  [virtual]
 


Member Function Documentation

virtual void base::PathName::canonical  )  [virtual]
 

virtual String base::PathName::className  )  const [inline, virtual]
 

return the name of the object's class type. Must be defined by derived classes.

Implements base::Object.

Definition at line 47 of file PathName.

References base::String.

virtual Object& base::PathName::clone  )  const [virtual]
 

return a shallow copy, with Object& return type. Must be defined by derived classes.

Implements base::Cloneable.

bool base::PathName::empty  )  const [inline, virtual]
 

Definition at line 109 of file PathName.

References _path, and base::array< T >::size().

virtual String base::PathName::extension  )  const [virtual]
 

Referenced by base::File::extension(), and base::CacheFile::extension().

bool base::PathName::isAbsolute  )  const [inline, virtual]
 

Definition at line 93 of file PathName.

References relative.

bool base::PathName::isRelative  )  const [inline, virtual]
 

Definition at line 90 of file PathName.

References relative.

virtual bool base::Object::isSameKindAs const Object  )  const [inline, virtual, inherited]
 

Definition at line 47 of file Object.

bool base::PathName::isSimple  )  const [inline, virtual]
 

Definition at line 96 of file PathName.

References _path, relative, and base::array< T >::size().

virtual PathName base::PathName::name  )  const [virtual]
 

Referenced by base::VEntry::name(), and base::CacheFile::pathName().

virtual bool base::PathName::operator!= const String pn  )  const [virtual]
 

virtual bool base::PathName::operator!= const PathName pn  )  const [virtual]
 

String base::PathName::operator() Int  i  )  const [inline, virtual]
 

Definition at line 119 of file PathName.

References base::Int, operator[](), and base::String.

virtual PathName& base::PathName::operator+= const PathName pn  )  [virtual]
 

virtual PathName& base::PathName::operator= const PathName pn  )  [virtual]
 

virtual bool base::PathName::operator== const String pn  )  const [virtual]
 

virtual bool base::PathName::operator== const PathName pn  )  const [virtual]
 

String base::PathName::operator[] Int  i  )  const [inline, virtual]
 

Definition at line 112 of file PathName.

References _path, Exception, base::Int, size(), and base::String.

Referenced by operator()().

virtual void base::PathName::parent  )  [virtual]
 

!! should check for valid dir name

virtual PathName base::PathName::path  )  const [virtual]
 

Referenced by base::VEntry::path().

PathName & base::PathName::prepend const String prefix  )  [inline, virtual]
 

Definition at line 99 of file PathName.

References base::String.

Int base::PathName::size  )  const [inline, virtual]
 

Definition at line 106 of file PathName.

References _path, base::Int, and base::array< T >::size().

Referenced by operator[]().

virtual String base::PathName::str  )  const [virtual]
 

bool base::PathName::validName const String name  )  [inline, static]
 

Definition at line 53 of file PathName.

References base::String.

bool base::PathName::validPath const String name  )  [inline, static]
 

!! should check for no '/'s, only one '.', first is alpha etc.

Definition at line 54 of file PathName.

References base::String.


Member Data Documentation

PathComponents base::PathName::_path [protected]
 

Definition at line 84 of file PathName.

Referenced by empty(), isSimple(), operator[](), and size().

const String base::PathName::currentDirectory [static]
 

Definition at line 50 of file PathName.

const String base::PathName::parentDirectory [static]
 

Definition at line 51 of file PathName.

bool base::PathName::relative [protected]
 

Definition at line 82 of file PathName.

Referenced by isAbsolute(), isRelative(), and isSimple().

const char base::PathName::separator = '/' [static]
 

Definition at line 49 of file PathName.


The documentation for this class was generated from the following file:
Generated on Thu Jul 29 16:38:56 2004 for OpenSim by doxygen 1.3.6