Class: TPathNameParser

Declaration: FileSystemInterface.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

TUnixPathNameParser

Purpose:

This abstract class provides protocol for parsing file system pathnames.

Instantiation:

None.

Deriving Classes:

Derived classes should implement parsers for specific host file system pathnames. All public member functions should be overridden, except for the static function GetDefaultParser and (probably) the streaming operators (because these classes generally have no data members).

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TPathNameParser::SetPathComponentArray

static void SetPathComponentArray (TPathName & pathName, TPathComponentArray * newStorage)

Interface Category:

API.

Purpose:

Installs the components of a path into a TPathName.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

The caller is responsible for freeing newStorage.

Member Function: TPathNameParser::GetPathComponentArray

static TPathComponentArray * GetPathComponentArray (const TPathName & pathName)

Interface Category:

API.

Purpose:

Returns the components of a path in an array

Calling Context:

Call this function directly.

Parameters:

Return Value:

A TPathComponentArray containing the components of the specified pathname.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

The caller must not delete the returned TPathComponentArray.

Member Function: TPathNameParser::GetDefaultParser

static const TPathNameParser & GetDefaultParser ()

Interface Category:

API.

Purpose:

Gets an instance of a derived class of this class that will parse file pathnames for the underlying host file system.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A parser for the underlying host file system.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPathNameParser::operator=

TPathNameParser & operator =(const TPathNameParser & copyMe)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called when an object is assigned to another compatible object.

Parameters:

Return Value:

A non-const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPathNameParser::TPathNameParser

  1. TPathNameParser ()
  2. TPathNameParser (const TPathNameParser & copyMe)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators and by derived classes.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPathNameParser::operator<<=

virtual TStream & operator <<= (TStream & fromWhere)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself in from.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPathNameParser::operator>>=

virtual TStream & operator >>=(TStream & toWhere) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself out to.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPathNameParser::PathNameToHostSpecific

virtual void PathNameToHostSpecific (const TPathName & anArray, THostSpecificPathName & path) const

Interface Category:

API.

Purpose:

Converts from a TPathName object to a host-specific pathname string (for example, /usr/include/sys/mode.h).

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPathNameParser::HostSpecificToPathName

virtual void HostSpecificToPathName (const THostSpecificPathName & path, TPathName & anArray) const

Interface Category:

API.

Purpose:

Converts from a host-specific path (for example, /usr/include/sys/mode.h) to a TPathName object.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws TFileSystemEntityNotAvailable for ill-formed paths (but not for well-formed paths specifying entities that do not exist; that is, the path must be well-formed but need not represent an existing on-disk entity).

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TPathNameParser::~TPathNameParser

virtual ~ TPathNameParser ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.