TuttleOFX  1
tuttle::common Namespace Reference

Namespaces

namespace  details

Data Structures

class  Color
class  Formatter

Functions

boost::filesystem::path applicationFilepath (const std::string &argv0, const boost::filesystem::path &currentPath)
boost::filesystem::path canonicalApplicationFilepath (const std::string &argv0, const boost::filesystem::path &currentPath=boost::filesystem::current_path())
boost::filesystem::path applicationFolder (const std::string &argv0, const boost::filesystem::path &currentPath=boost::filesystem::current_path())
boost::filesystem::path canonicalApplicationFolder (const std::string &argv0, const boost::filesystem::path &currentPath=boost::filesystem::current_path())
int logLevel_stringToInt (const std::string &level)

Function Documentation

boost::filesystem::path tuttle::common::applicationFilepath ( const std::string &  argv0,
const boost::filesystem::path &  currentPath 
)

Returns the absolute path to the application executable.

On Mac OS X this will point to the directory actually containing the executable, which may be inside of an application bundle (if the application is bundled).

Warning:
On Linux, this function will try to get the path from the {/proc} file system. If that fails, it assumes that {argv[0]} contains the absolute file name of the executable. The function also assumes that the current directory has not been changed by the application.

In Symbian this function will return the application private directory, not the path to executable itself, as those are always in {/sys/bin}. If the application is in a read only drive, i.e. ROM, then the private path on the system drive will be returned.

Todo:
on windows check which is the first local file or file in PATH...

Definition at line 56 of file applicationPath.cpp.

References DIRLIST_SEP_CHARS, and DIRSEP.

Referenced by applicationFolder(), and canonicalApplicationFilepath().

boost::filesystem::path tuttle::common::applicationFolder ( const std::string &  argv0,
const boost::filesystem::path &  currentPath = boost::filesystem::current_path() 
) [inline]

Definition at line 20 of file applicationPath.hpp.

References applicationFilepath().

Here is the call graph for this function:

boost::filesystem::path tuttle::common::canonicalApplicationFilepath ( const std::string &  argv0,
const boost::filesystem::path &  currentPath = boost::filesystem::current_path() 
) [inline]

Definition at line 14 of file applicationPath.hpp.

References applicationFilepath().

Referenced by canonicalApplicationFolder().

Here is the call graph for this function:

boost::filesystem::path tuttle::common::canonicalApplicationFolder ( const std::string &  argv0,
const boost::filesystem::path &  currentPath = boost::filesystem::current_path() 
) [inline]

Definition at line 26 of file applicationPath.hpp.

References canonicalApplicationFilepath().

Here is the call graph for this function:

int tuttle::common::logLevel_stringToInt ( const std::string &  level)

Definition at line 80 of file Formatter.cpp.

References tuttle::quotes(), and TUTTLE_LOG_WARNING.

Referenced by tuttle::common::Formatter::setLogLevel_string().

Here is the call graph for this function: