Filename Class Reference

Provides capability for filename manipulation. More...

#include <Filename.h>

Inheritance diagram for Filename:

Inheritance graph

List of all members.

Public Member Functions

virtual void setFullPathAndName (const std::string &pathAndName)=0
virtual std::string getFullPathAndName () const =0
virtual std::string getPath () const =0
virtual std::string getFileName () const =0
virtual std::string getTitle () const =0
virtual std::string getExtension () const =0
virtual bool isDirectory () const =0
virtual const std::string & operator= (const std::string &path)=0
virtual bool operator== (const Filename &other) const =0
virtual bool operator!= (const Filename &other) const =0
virtual operator std::string () const =0

Protected Member Functions

virtual ~Filename ()


Detailed Description

Provides capability for filename manipulation.

Filename provides a platform-independent interface for manipulating operating system file paths and names. It allows developers to avoid conditional compile directives yet still write portable code.

See also:
FileFinder

Definition at line 28 of file Filename.h.


Constructor & Destructor Documentation

virtual Filename::~Filename (  )  [protected, virtual]

This should be destroyed by calling ObjectFactory::destroyObject.

Definition at line 135 of file Filename.h.


Member Function Documentation

virtual void Filename::setFullPathAndName ( const std::string &  pathAndName  )  [pure virtual]

Set/change the full path specification (directory, title and extension, if any).

Parameters:
pathAndName A string with the file path information.

virtual std::string Filename::getFullPathAndName (  )  const [pure virtual]

Get the full path specification (directory, title and extension, if any).

Returns:
A string with the file path information.

virtual std::string Filename::getPath (  )  const [pure virtual]

Get the directory specification.The appropriate separator(s) will be used regardless of the original string, so the client need not worry about the platform portability.

Returns:
A string with the file extension.

virtual std::string Filename::getFileName (  )  const [pure virtual]

Get the file name (title and extension, if any).

Returns:
A string with the file name, absent any path information.

virtual std::string Filename::getTitle (  )  const [pure virtual]

Get the file title.

Returns:
A string with the file title.

virtual std::string Filename::getExtension (  )  const [pure virtual]

Get the extension, if any.

Returns:
A string with the file extension.

virtual bool Filename::isDirectory (  )  const [pure virtual]

Checks whether the current filename is actually a directory.

Returns:
TRUE if the filename is a directory, otherwise FALSE.

virtual const std::string& Filename::operator= ( const std::string &  path  )  [pure virtual]

Set the filename from a string.

This convenience function is equivalent to Filename::setFullPathAndName().

Parameters:
path The string path to set.
Returns:
the string passed in as an argument.

virtual bool Filename::operator== ( const Filename other  )  const [pure virtual]

Equality operator.

Checks if two Filenames have identical full path and name representations.

Parameters:
other The other Filename to compare against.
Returns:
true if the Filename objects do contain equal filenames.

virtual bool Filename::operator!= ( const Filename other  )  const [pure virtual]

Inequality operator.

Checks if two Filenames do not have identical full path and name representations.

Parameters:
other The other Filename to compare against.
Returns:
true if the Filename objects do not contain equal filenames.

virtual Filename::operator std::string (  )  const [pure virtual]

Obtain a string representation of the Filename.

This convenience function is equivalent to Filename::getFullPathAndName().

Returns:
A string representation of the Filename.


Software Development Kit - Opticks 4.9.0 Build 16218