Static Public Member Functions

base::Global Class Reference

Global definitions. More...

#include <libppbase/base/Global.h>

List of all members.

Static Public Member Functions

static String createBaseFileName (const String &name)
 Creates a file name from the base directory and the given relative file name.
static String createVBaseFileName (const String &name)
 Creates a file name from the var base directory and the given relative file name.
static const String & getBase ()
 Gets the base directory.
static const String & getVBase ()
 Gets the var base directory.
static const char * gettext (const char *message)
 Gettext wrapper for library-internal use only.
static void setBase (const String &base)
 Sets the base directory.
static void setDomain (const String &domain)
 Sets base and var base directories from the given domain.
static void setDomainFromExecutable (const char *argv0)
 Sets base and var base directories from the domain derived from the executable file name.
static void setVBase (const String &vbase)
 Sets the var base directory.

Detailed Description

Global definitions.

Author:
Christoph Schwarz
Version:
$Id: Global.h 21 2010-09-05 04:18:17Z cschwarz1 $

Member Function Documentation

static String base::Global::createBaseFileName ( const String &  name  )  [static]

Creates a file name from the base directory and the given relative file name.

Parameters:
name the file name relative to the base directory
Returns:
the created absolute file name
static String base::Global::createVBaseFileName ( const String &  name  )  [static]

Creates a file name from the var base directory and the given relative file name.

Parameters:
name the file name relative to the var base directory
Returns:
the created absolute file name
static const String& base::Global::getBase (  )  [static]

Gets the base directory.

Returns:
the base directory
static const char* base::Global::gettext ( const char *  message  )  [static]

Gettext wrapper for library-internal use only.

Do not use this function from applications linked to this library.

Parameters:
message message to translate
Returns:
translated message

Referenced by base::FileT< size_t >::fstat(), base::FileT< size_t >::getPos(), base::FileT< size_t >::seek(), base::FileT< size_t >::seekEOF(), base::FileT< size_t >::size(), base::FileT< size_t >::stat(), and base::FileT< size_t >::truncate().

static const String& base::Global::getVBase (  )  [static]

Gets the var base directory.

Returns:
the var base directory
static void base::Global::setBase ( const String &  base  )  [static]

Sets the base directory.

Parameters:
base the new base directory
static void base::Global::setDomain ( const String &  domain  )  [static]

Sets base and var base directories from the given domain.

For UNIX Systems, base is /opt/<domain> and vbase is /var/opt/<domain>

Parameters:
domain the new domain
static void base::Global::setDomainFromExecutable ( const char *  argv0  )  [static]

Sets base and var base directories from the domain derived from the executable file name.

Parameters:
argv0 the executable file name
static void base::Global::setVBase ( const String &  vbase  )  [static]

Sets the var base directory.

Parameters:
vbase the new var base directory

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