Granada  1.54.0
Structured layer on top of C++ REST SDK for building server applications in C++. Granada implements sessions, server side plug-in framework, C++ OAuth 2.0 server, data storage access, server script running, server browsing.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Functions | Variables
granada::util::application Namespace Reference

Functions

const std::string & get_selfpath ()
 
const std::string GetProperty (const std::string &name)
 
static const std::string FormatDirectoryPath (const std::string &directory_path)
 

Variables

static std::string selfpath
 
static std::unique_ptr
< granada::util::file::PropertyFile
property_file_
 

Detailed Description

Utils for application.

Function Documentation

static const std::string granada::util::application::FormatDirectoryPath ( const std::string &  directory_path)
static

Homogenize a given path in the form of string to a format like: /path/to/directory Example: /my/path => will stay as it is, the / at the begining is interpreted as if we had been given a complete path. my/path => /path/to/application/directory/my/path The absence of / at the begining is interpreted as if we had been given a relative path. /my/path/ => /my/path Last / is always removed.

const std::string& granada::util::application::get_selfpath ( )

Returns the path of the application.

Returns
Path.
const std::string granada::util::application::GetProperty ( const std::string &  name)

Returns the value of a property of the application config file.

Parameters
nameName of the property to retrieve.
Returns
Value of the property.

Variable Documentation

std::unique_ptr<granada::util::file::PropertyFile> granada::util::application::property_file_
static

Application property file.

std::string granada::util::application::selfpath
static

Path of the application.