Rosetta 3.3
Public Member Functions | Friends
utility::file::FileName Class Reference

File name class supporting Windows and UN*X/Linux format names. More...

#include <FileName.hh>

Collaboration diagram for utility::file::FileName:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 FileName ()
 Default constructor.
 FileName (std::string const &name_string)
 String constructor.
 FileName (std::string const &name_string, PathName const &use_path)
 Uses filename from string but path and vol from PathName.
 FileName (std::vector< FileName > const &file_names)
 FileName vector constructor.
 ~FileName ()
 Destructor.
FileNameoperator= (std::string const &name_string)
 String assignment.
 operator std::string () const
 String conversion.
FileNameoperator() (FileName const &name)
 Functor copy assignment.
FileNameoperator() (std::string const &name_string)
 Functor string assignment.
FileNamevol (std::string const &vol_a)
 Volume assignment.
FileNamevolume (std::string const &vol_a)
 Volume assignment.
FileNamepath (std::string const &path_a)
 Path assignment.
FileNamebase (std::string const &base_a)
 Base assignment.
FileNameext (std::string const &ext_a)
 Extension assignment.
FileNameextension (std::string const &ext_a)
 Extension assignment.
FileNameversion (std::string const &ver_a)
 Version assignment.
FileNamever (std::string const &ver_a)
 Version assignment.
FileNameto_local_name ()
 Change to local name (without volume or path)
FileNameto_bare_name ()
 Change to bare name (without volume or path or version)
FileNameerase ()
 Erase the file name.
FileNameclear ()
 Clear the file name.
bool empty () const
 Empty?
bool absolute () const
 Absolute path?
bool relative () const
 Relative path?
std::string const & vol () const
 Volume.
std::string const & volume () const
 Volume.
std::string const & path () const
 Path.
std::string const & base () const
 Base.
std::string const & ext () const
 Extension.
std::string extension () const
 Extension with separator.
std::string const & ver () const
 Version.
std::string version () const
 Version with separator.
std::string name () const
 File name string.
std::string operator() () const
 Functor.
std::string local_name () const
 Local name (without volume or path)
std::string bare_name () const
 Bare name (without volume or path or version)

Friends

bool operator== (FileName const &name1, FileName const &name2)
 FileName == FileName.
bool operator!= (FileName const &name1, FileName const &name2)
 FileName != FileName.
bool operator< (FileName const &name1, FileName const &name2)
 FileName < FileName.
bool operator<= (FileName const &name1, FileName const &name2)
 FileName <= FileName.
bool operator>= (FileName const &name1, FileName const &name2)
 FileName >= FileName.
bool operator> (FileName const &name1, FileName const &name2)
 FileName > FileName.
std::istream & operator>> (std::istream &stream, FileName &name)
 Input from stream.
std::ostream & operator<< (std::ostream &stream, FileName const &name)
 Output to stream.

Detailed Description

File name class supporting Windows and UN*X/Linux format names.


Constructor & Destructor Documentation

utility::file::FileName::FileName ( ) [inline]

Default constructor.

utility::file::FileName::FileName ( std::string const &  name_string) [inline]

String constructor.

utility::file::FileName::FileName ( std::string const &  name_string,
PathName const &  use_path 
) [inline]

Uses filename from string but path and vol from PathName.

References utility::file::PathName::path(), path(), utility::file::PathName::vol(), and vol().

utility::file::FileName::FileName ( std::vector< FileName > const &  file_names) [inline]

FileName vector constructor.

References begin, and erase().

utility::file::FileName::~FileName ( ) [inline]

Destructor.


Member Function Documentation

bool utility::file::FileName::absolute ( ) const

Absolute path?

References platform::file::PATH_SEPARATOR().

std::string utility::file::FileName::bare_name ( ) const [inline]

Bare name (without volume or path or version)

References extension().

FileName& utility::file::FileName::base ( std::string const &  base_a) [inline]

Base assignment.

Referenced by AnchorFinderMover::apply(), utility::filename(), and main().

std::string const& utility::file::FileName::base ( ) const [inline]

Base.

FileName& utility::file::FileName::clear ( ) [inline]

Clear the file name.

bool utility::file::FileName::empty ( ) const [inline]

Empty?

FileName& utility::file::FileName::erase ( ) [inline]

Erase the file name.

Referenced by FileName().

FileName& utility::file::FileName::ext ( std::string const &  ext_a) [inline]

Extension assignment.

std::string const& utility::file::FileName::ext ( ) const [inline]

Extension.

FileName& utility::file::FileName::extension ( std::string const &  ext_a) [inline]

Extension assignment.

Referenced by utility::filename().

std::string utility::file::FileName::extension ( ) const [inline]

Extension with separator.

Referenced by bare_name(), local_name(), and name().

std::string utility::file::FileName::local_name ( ) const [inline]

Local name (without volume or path)

References extension(), and version().

std::string utility::file::FileName::name ( ) const [inline]
utility::file::FileName::operator std::string ( ) const [inline]

String conversion.

References name().

std::string utility::file::FileName::operator() ( ) const [inline]

Functor.

References name().

FileName& utility::file::FileName::operator() ( std::string const &  name_string) [inline]

Functor string assignment.

FileName& utility::file::FileName::operator() ( FileName const &  name) [inline]

Functor copy assignment.

References operator=().

FileName& utility::file::FileName::operator= ( std::string const &  name_string) [inline]

String assignment.

Referenced by operator()().

FileName & utility::file::FileName::path ( std::string const &  path_a)

Path assignment.

References platform::file::PATH_SEPARATOR().

Referenced by utility::pathname().

std::string const& utility::file::FileName::path ( ) const [inline]

Path.

Referenced by FileName().

bool utility::file::FileName::relative ( ) const

Relative path?

References platform::file::PATH_SEPARATOR().

FileName& utility::file::FileName::to_bare_name ( ) [inline]

Change to bare name (without volume or path or version)

FileName& utility::file::FileName::to_local_name ( ) [inline]

Change to local name (without volume or path)

std::string const& utility::file::FileName::ver ( ) const [inline]

Version.

FileName& utility::file::FileName::ver ( std::string const &  ver_a) [inline]

Version assignment.

std::string utility::file::FileName::version ( ) const [inline]

Version with separator.

Referenced by local_name(), and name().

FileName& utility::file::FileName::version ( std::string const &  ver_a) [inline]

Version assignment.

FileName & utility::file::FileName::vol ( std::string const &  vol_a)

Volume assignment.

References platform::file::VOLUME_USED().

std::string const& utility::file::FileName::vol ( ) const [inline]

Volume.

Referenced by FileName(), and volume().

std::string const& utility::file::FileName::volume ( ) const [inline]

Volume.

FileName& utility::file::FileName::volume ( std::string const &  vol_a) [inline]

Volume assignment.

References vol().


Friends And Related Function Documentation

bool operator!= ( FileName const &  name1,
FileName const &  name2 
) [friend]
bool operator< ( FileName const &  name1,
FileName const &  name2 
) [friend]
std::ostream& operator<< ( std::ostream &  stream,
FileName const &  name 
) [friend]

Output to stream.

bool operator<= ( FileName const &  name1,
FileName const &  name2 
) [friend]
bool operator== ( FileName const &  name1,
FileName const &  name2 
) [friend]
bool operator> ( FileName const &  name1,
FileName const &  name2 
) [friend]
bool operator>= ( FileName const &  name1,
FileName const &  name2 
) [friend]
std::istream& operator>> ( std::istream &  stream,
FileName name 
) [friend]

Input from stream.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines