lumiera_documentation/src/include/config-facade.h
Ichthyostega 974c670d41 fix **** in doxygen comments
to make them stand out more prominently, some entity comments
where started with a line of starts. Unfortunately, doxygen
(and javadoc) only recogise comments which are started exactly
with /**

This caused quite some comments to be ignored by doxygen.
Credits to Hendrik Boom for spotting this problem!

A workaround is to end the line of stars with *//**
2013-10-24 23:06:36 +02:00

98 lines
2.6 KiB
C++

/*
CONFIGFACADE - C++ convenience wrapper and startup of the config system
Copyright (C) Lumiera.org
2008, Hermann Vosseler <Ichthyostega@web.de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/** @file configfacade.h
** The lumiera::Config wrapper class addresses two issues.
** First, it registers startup and shutdown hooks to bring up the config system
** as early as possible. Later, on application main initialisation, the global
** config interface is opened and wrapped for convenient access from C++ code.
**
** @todo there ought to be an external Interface for the Config subsystem.
** But the full-blown Config system isn't implemented yet anyway
**
** @see config.h
** @see lumiera::AppState
** @see main.cpp
*/
#ifndef INTERFACE_CONFIGFACADE_H
#define INTERFACE_CONFIGFACADE_H
#ifdef __cplusplus /* ============== C++ Interface ================= */
#include "lib/depend.hpp"
#include "lib/symbol.hpp"
#include <string>
namespace lumiera {
using std::string;
/*****************************************************************//**
* C++ wrapper for convenient access to the Lumiera config system.
*
* @warning Config system not fully implemented yet. Thus for now
* this facade is wired with the setup.ini and will just
* fetch the values from there.
*/
class Config
{
public:
static string get (lib::Literal key);
static lib::Depend<Config> instance;
private:
Config();
~Config();
friend class lib::DependencyFactory;
};
} // namespace lumiera
#else /* =========================== C Interface ====================== */
/** retrieve the default plugin search path from the
* basic applications setup.ini
* @return a fully expanded string suitable to be fed
* to the lumiera_config_setdefault function
* @see lumiera_plugin_discover
*/
const char* lumiera_get_plugin_path_default ();
#endif
#endif