IPathName

IPathName represents full or partial paths to file system entities.

This class allows clients to specify file system entities via path names. Constructing an IPathName object, as in:

IPathName aPathName("/home/widget/work/Foo.C", IUnixPathNameParser());

allows the client to get an IFileSystemEntity representing the file Foo.C via a call such as:

IFile anEntity(aPathName);

You may provide a "parser" for the host-specific paths that you pass in, or you may use the default parser for the system on which your program is running. A parser that works for the system on which your program is running is available from IPathName::defaultParser().


IPathName - Member Functions and Data by Group

Constructors & Destructor


[view class]
~IPathName
Destructor.
public:
virtual ~IPathName()
Delete the object.

None.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
IPathName
Construct a new IPathName object.


Overload 1
Copy constructor.
public:
IPathName(const IPathName& copyMe)
This function constructs a copy of the given object.

copyMe
The object to copy.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 2
Empty constructor.
public:
IPathName()

None.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 3
Constructor.
public:
IPathName( const IHostPathName& path, const ICompoundNameParser& aParser = defaultParser ( ) )
This function uses the specified parser to construct a path name from the text. If no parser is specified, this system's default file name parser is used.

path
The text representation of the path.

aParser The parser used to convert the text into path name components. If none is specified, the default filename parser is used.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 4
Constructor.
public:
IPathName( const IDirectory& startHere, const IHostPathName& partialPath, const ICompoundNameParser& aParser = defaultParser ( ) )
This function constructs an IPathName by appending a relative path to a directory's path. It uses the specified parser to construct a path name from the text. If no parser is specified, this system's default file name parser is used.

startHere
The directory whose path is used as the start of the constructed path.

partialPath The text representation of the partial path that is appended to the directory's path.

aParser The parser used to convert the text into path name components. If none is specified, the default filename parser is used.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 5
Constructor.
public:
IPathName(const ICompoundName& downcast)
This function downcasts the given object and then constructs a copy of it.

downcast
The object to copy.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 6
Constructor.
public:
IPathName( const IDirectory& startHere, const IPathName& partialPath )
This function constructs an IPathName by appending a relative path to a directory's path.

startHere
The directory whose path is used as the start of the constructed path.

partialPath The text representation of the partial path that is appended to the directory's path.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
operator =
Assignment operator.
public:
IPathName& operator =(const IPathName& copyMe)
Copy the given object to another IPathName object.

copyMe
The object to copy.

Return
operator= returns an IPathName object.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Static member functions


[view class]
defaultParser
Get default path name parser.
public:
static const ICompoundNameParser& defaultParser()
Get the default path name parser for this operating system.

If you have a user-supplied path, a command line argument, etc., this is the parser that you should use to parse it.

None.

Return
defaultParser returns a const ICompoundNameParser object.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Streaming


[view class]
readFromStream
Stream in.
protected:
virtual void readFromStream(IDataStream& fromwhere)
Read the object from the given data stream.

fromwhere
From where to stream the data.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
writeToStream
Stream out.
protected:
virtual void writeToStream(IDataStream& towhere) const
Write the object to the given data stream.

towhere
Where to stream the data.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IPathName - Inherited Member Functions and Data

Inherited Public Functions

ICompoundName
IMStreamable

Inherited Public Data

Inherited Protected Functions

IMStreamable

Inherited Protected Data