- removed ecore_config wrapper as it seems to be removed from C API

- disabled esmartxx (not sure what to do with it in future...)


SVN revision: 47716
This commit is contained in:
Andreas Volz 2010-04-02 22:30:01 +00:00
parent 986be1d938
commit abe86b6e7f
15 changed files with 6 additions and 218 deletions

View File

@ -6,7 +6,6 @@ PKG="eflxx
eetxx
edjexx
ecorexx
esmartxx
emotionxx
elementaryxx
eflxx_examples"

View File

@ -25,7 +25,7 @@ AM_PROG_LIBTOOL
PKG_CHECK_MODULES(EFL, eflxx evasxx ecore ecore-x ecore-evas ecore-config ecore-data)
PKG_CHECK_MODULES(EFL, eflxx evasxx ecore ecore-x ecore-evas)
AC_OUTPUT([
Makefile
include/Makefile

View File

@ -6,8 +6,6 @@
/* EFL */
#include <Evas.h>
#include <Ecore_Config.h>
#include <Ecore_Data.h>
#include <Ecore_Ipc.h>
#include <Ecore_Con.h>
#include <Ecore_Evas.h>
@ -31,7 +29,6 @@ namespace Ecorexx {
class EvasWindow;
class Application;
class Callback;
class Config;
class Timer;
class Callback
@ -76,9 +73,6 @@ public:
void setFont( const EvasFont& );
void setFixedFont( const EvasFont& );*/
/* Configuration */
Config* getConfig();
private:
const std::string _binary;
std::string _name;
@ -86,7 +80,6 @@ private:
EvasWindow* _mainWindow;
//EvasFont* _font;
//EvasFont* _fixedFont;
Config* _config;
private:
Application();

View File

@ -1,49 +0,0 @@
#ifndef ECORE_CONFIG_H
#define ECORE_CONFIG_H
/* STD */
#include <iostream>
/**
* C++ Wrapper for the Enlightenment Core Configuration Library (Ecore_Config)
*
* @author Michael 'Mickey' Lauer <mickey@Vanille.de>
*/
namespace Ecorexx {
//===============================================================================================
// Config
//===============================================================================================
class Config
{
/**
* @class: Config ecoreconfig.h
* A simple persistent Key=Value configuration database.
* @author: Michael 'Mickey' Lauer <mickey@Vanille.de>
**/
public:
Config( const std::string& name );
~Config();
/* group handling */
void setGroup( const std::string& );
std::string getGroup() const;
/* read / write */
void setValue( const std::string &key, const bool value);
bool getBool( const std::string &key, const bool value);
void setValue( const std::string &key, const int value);
int getInt( const std::string &key, const int value);
void setValue( const std::string &key, const std::string& value);
std::string getString( const std::string &key, const std::string& value);
void setValue( const std::string &key, const float value);
float getFloat( const std::string &key, const float value);
private:
std::string _group;
};
}
#endif

View File

@ -9,7 +9,6 @@
#include "Animator.h"
#include "Application.h"
#include "Config.h"
#include "EvasWindow.h"
#include "Timer.h"
#include "XWindow.h"

View File

@ -1,7 +1,6 @@
libecorexx_HEADERS = \
Application.h\
Config.h \
EvasWindow.h \
XWindow.h \
Animator.h \

View File

@ -7,7 +7,6 @@
#include <eflxx/System.h>
#include <eflxx/DebugInternal.h>
#include "../include/ecorexx/Application.h"
#include "../include/ecorexx/Config.h"
#include "../include/ecorexx/Timer.h"
/* STD */
@ -36,7 +35,7 @@ Application* Application::_instance = 0;
//===============================================================================================
Application::Application( int argc, const char **argv, const string& name )
: Eflxx::Trackable( "Application" ), _binary( argv[0] ), _name( name ), _config( 0 )
: Eflxx::Trackable( "Application" ), _binary( argv[0] ), _name( name )
{
if ( Application::_instance )
{
@ -135,10 +134,4 @@ void Application::setFixedFont( const EvasFont& font )
_fixedFont = new EvasFont( font );
}*/
Config* Application::getConfig()
{
if ( !_config ) _config = new Config( _binary );
return _config;
}
} // end namespace Ecorexx

View File

@ -1,86 +0,0 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
/* EFL++ */
#include <eflxx/System.h>
#include <eflxx/DebugInternal.h>
#include <eflxx/Common.h>
#include "../include/ecorexx/Config.h"
/* EFL */
#include <Ecore_Config.h>
#include <iostream>
using namespace std;
namespace Ecorexx {
//===============================================================================================
// Config
//===============================================================================================
Config::Config( const string& name )
:_group( "default/" )
{
ecore_config_init( const_cast<char*>( name.c_str() ) );
ecore_config_load();
}
void Config::setGroup( const string &group )
{
_group = group;
}
string Config::getGroup() const
{
return _group;
}
void Config::setValue( const string &key, const bool value )
{
ecore_config_boolean_set( key.c_str (), value );
}
bool Config::getBool( const string &key, const bool defaultValue )
{
ecore_config_boolean_default( key.c_str (), defaultValue );
return ecore_config_boolean_get( key.c_str () );
}
void Config::setValue( const string &key, const int value )
{
ecore_config_int_set( key.c_str (), value );
}
int Config::getInt( const string &key, const int defaultValue )
{
ecore_config_int_default( key.c_str (), defaultValue );
return ecore_config_int_get( key.c_str () );
}
void Config::setValue( const string &key, const string& value )
{
ecore_config_string_set( key.c_str (), const_cast<char*>( value.c_str () ) );
}
string Config::getString( const string &key, const string& defaultValue )
{
ecore_config_string_default( key.c_str (), const_cast<char*>( defaultValue.c_str() ) );
return ecore_config_string_get( key.c_str () );
}
void Config::setValue( const string &key, const float value )
{
ecore_config_float_set( key.c_str (), value );
}
float Config::getFloat( const string &key, const float defaultValue )
{
ecore_config_float_default( key.c_str (), defaultValue );
return ecore_config_float_get( key.c_str () );
}
Config::~Config()
{
ecore_config_save();
ecore_config_shutdown();
}
}

View File

@ -17,7 +17,6 @@ lib_LTLIBRARIES = \
libecorexx_la_SOURCES = \
Application.cpp\
Config.cpp \
EvasWindow.cpp \
XWindow.cpp \
Animator.cpp \

View File

@ -97,9 +97,9 @@ AC_DEFINE_UNQUOTED(SYSTEM_PIXMAPS_DIR, "${packageprefix}/${systempixmapsdir}",""
AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}","")
PKG_CHECK_MODULES(ESMARTXX_CONTAINER, esmartxx_container)
PKG_CHECK_MODULES(ESMARTXX_GROUP, esmartxx_group)
PKG_CHECK_MODULES(ESMARTXX_TEXTENTRY, esmartxx_textentry)
#PKG_CHECK_MODULES(ESMARTXX_CONTAINER, esmartxx_container)
#PKG_CHECK_MODULES(ESMARTXX_GROUP, esmartxx_group)
#PKG_CHECK_MODULES(ESMARTXX_TEXTENTRY, esmartxx_textentry)
PKG_CHECK_MODULES(EDJEXX, edjexx)
PKG_CHECK_MODULES(EFL, eflxx)
PKG_CHECK_MODULES(ECOREXX, ecorexx)
@ -119,7 +119,6 @@ src/ecorexx/Makefile
src/ecorexx/3dstars/Makefile
src/ecorexx/calibrate/Makefile
src/ecorexx/callbacks/Makefile
src/ecorexx/config/Makefile
src/ecorexx/list/Makefile
src/ecorexx/paint/Makefile
src/ecorexx/simple/Makefile
@ -128,10 +127,6 @@ src/ecorexx/timers/Makefile
src/ecorexx/x/Makefile
src/edjexx/Makefile
src/edjexx/simple/Makefile
src/esmartxx/Makefile
src/esmartxx/container/Makefile
src/esmartxx/group/Makefile
src/esmartxx/textentry/Makefile
src/eetxx/Makefile
src/eetxx/simple_write_read/Makefile
src/emotionxx/Makefile

View File

@ -14,7 +14,6 @@ AM_CFLAGS =\
SUBDIRS = \
common\
edjexx \
esmartxx \
ecorexx \
eetxx \
emotionxx \

View File

@ -1 +1 @@
SUBDIRS = 3dstars calibrate callbacks config paint simple stars timers list x
SUBDIRS = 3dstars calibrate callbacks paint simple stars timers list x

View File

@ -1,5 +0,0 @@
Makefile
Makefile.in
.deps
.libs
eflpp_ecore_config

View File

@ -1,19 +0,0 @@
## Process this file with automake to produce Makefile.in
INCLUDES =
AM_CXXFLAGS =\
-Wall
bin_PROGRAMS = ecorexx_example_config
ecorexx_example_config_SOURCES = \
main.cpp
ecorexx_example_config_LDADD = \
$(ECOREXX_LIBS)
AM_CPPFLAGS = \
$(ECOREXX_CFLAGS)

View File

@ -1,29 +0,0 @@
#include <ecorexx/Ecorexx.h>
using namespace Eflxx;
#include <iostream>
using namespace std;
int main( int argc, const char **argv )
{
// using the EcoreConfigClass directly
Ecorexx::Config c( "test" );
c.setValue( "aString", string( "foo" ) );
c.setValue( "anInt", 42 );
c.setValue( "aBool", true );
cout << "the string is = " << c.getString( "aString", "defaultString" ) << endl;
cout << "the integer is = " << c.getInt( "anInt", 100 ) << endl;
cout << "the boolean is = " << c.getBool( "aBool", false ) << endl;
cout << "something not there is = " << c.getString( "not here", "not here" ) << endl;
// using the application ecore config class
Ecorexx::Application app( argc, argv, "This is my Application" );
int runcount = app.getConfig()->getInt( "runcount", 0 );
cout << "this application runs for the " << ++runcount << "th time" << endl;
app.getConfig()->setValue( "runcount", runcount );
return 0;
}