Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
icl_core::config::FilePath Class Reference

#include <AttributeTree.h>

Public Member Functions

icl_core::String absoluteName () const
 
icl_core::String absolutePath (const icl_core::String &filename) const
 
icl_core::String currentDir () const
 
icl_core::String extension () const
 
 FilePath (const char *filename="")
 
 FilePath (const icl_core::String &filename)
 
bool isRelativePath () const
 
icl_core::String name () const
 
icl_core::String path () const
 
 ~FilePath ()
 

Static Public Member Functions

static icl_core::String exchangeSeparators (const icl_core::String &filename)
 
static icl_core::String getEnvironment (const icl_core::String &var_name)
 
static bool isRelativePath (const icl_core::String &filename)
 
static icl_core::String normalizePath (const icl_core::String &filename)
 
static icl_core::String replaceEnvironment (const icl_core::String &filename)
 

Private Member Functions

void init (const char *filename)
 

Private Attributes

icl_core::String m_file
 
icl_core::String::size_type m_file_name_extension_split
 
icl_core::String::size_type m_file_path_name_split
 
icl_core::String m_pwd
 

Detailed Description

Definition at line 46 of file AttributeTree.h.

Constructor & Destructor Documentation

icl_core::config::FilePath::FilePath ( const char *  filename = "")
inline

Definition at line 49 of file AttributeTree.h.

icl_core::config::FilePath::FilePath ( const icl_core::String filename)
inline

Definition at line 53 of file AttributeTree.h.

icl_core::config::FilePath::~FilePath ( )
inline

Definition at line 58 of file AttributeTree.h.

Member Function Documentation

icl_core::String icl_core::config::FilePath::absoluteName ( ) const
inline

Returns the path and name of the file.

Definition at line 77 of file AttributeTree.h.

icl_core::String icl_core::config::FilePath::absolutePath ( const icl_core::String filename) const

Returns the absolute path of the file filename. Given relative filenames start from the current directory.

Definition at line 78 of file AttributeTree.cpp.

icl_core::String icl_core::config::FilePath::currentDir ( ) const
inline

Returns the absolute path of the current directory. The last character of the returned string is a '/'.

Definition at line 85 of file AttributeTree.h.

icl_core::String icl_core::config::FilePath::exchangeSeparators ( const icl_core::String filename)
static

Searches for directory separators, which are not supported by the underlying operation system and exchanges these with separators, that are supported.

  • Windows: '/' -> '\'
  • Linux: '\' -> '/'

Definition at line 243 of file AttributeTree.cpp.

icl_core::String icl_core::config::FilePath::extension ( ) const
inline

Returns the extension of the file.

Definition at line 92 of file AttributeTree.h.

icl_core::String icl_core::config::FilePath::getEnvironment ( const icl_core::String var_name)
static

Returns the value of the given environment variable var_name.

Definition at line 264 of file AttributeTree.cpp.

void icl_core::config::FilePath::init ( const char *  filename)
private

Definition at line 417 of file AttributeTree.cpp.

bool icl_core::config::FilePath::isRelativePath ( const icl_core::String filename)
static

Returns true if the filename is a relative path (It does not begin with a '/').

Definition at line 90 of file AttributeTree.cpp.

bool icl_core::config::FilePath::isRelativePath ( ) const
inline

Returns true if the objects filename is a relative path.

Definition at line 109 of file AttributeTree.h.

icl_core::String icl_core::config::FilePath::name ( ) const
inline

Returns the name of the file without path.

Definition at line 70 of file AttributeTree.h.

icl_core::String icl_core::config::FilePath::normalizePath ( const icl_core::String filename)
static

Returns the normalized path of the given filename. Normalized means: all leading "./" are removed, all "/./" are reduced to "/" and all "something/../" are reduced to "/".

Definition at line 104 of file AttributeTree.cpp.

icl_core::String icl_core::config::FilePath::path ( ) const
inline

Returns the absolute path of the file without the file name.

Definition at line 63 of file AttributeTree.h.

icl_core::String icl_core::config::FilePath::replaceEnvironment ( const icl_core::String filename)
static

Replaces environment variables in the given filename. An environment variable must have the following form: '${VARIABLE_NAME}'

Definition at line 277 of file AttributeTree.cpp.

Member Data Documentation

icl_core::String icl_core::config::FilePath::m_file
private

Definition at line 216 of file AttributeTree.h.

icl_core::String::size_type icl_core::config::FilePath::m_file_name_extension_split
private

Definition at line 218 of file AttributeTree.h.

icl_core::String::size_type icl_core::config::FilePath::m_file_path_name_split
private

Definition at line 217 of file AttributeTree.h.

icl_core::String icl_core::config::FilePath::m_pwd
private

Definition at line 215 of file AttributeTree.h.


The documentation for this class was generated from the following files:


fzi_icl_core
Author(s):
autogenerated on Mon Jun 10 2019 13:17:59