From abe86b6e7fcf8b70c4b26fb8ac0c7ea285c54759 Mon Sep 17 00:00:00 2001 From: Andreas Volz Date: Fri, 2 Apr 2010 22:30:01 +0000 Subject: [PATCH] - 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 --- compile.sh | 1 - ecorexx/configure.ac | 2 +- ecorexx/include/ecorexx/Application.h | 7 -- ecorexx/include/ecorexx/Config.h | 49 ----------- ecorexx/include/ecorexx/Ecorexx.h | 1 - ecorexx/include/ecorexx/Makefile.am | 1 - ecorexx/src/Application.cpp | 9 +- ecorexx/src/Config.cpp | 86 ------------------- ecorexx/src/Makefile.am | 1 - eflxx_examples/configure.ac | 11 +-- eflxx_examples/src/Makefile.am | 1 - eflxx_examples/src/ecorexx/Makefile.am | 2 +- eflxx_examples/src/ecorexx/config/.cvsignore | 5 -- eflxx_examples/src/ecorexx/config/Makefile.am | 19 ---- eflxx_examples/src/ecorexx/config/main.cpp | 29 ------- 15 files changed, 6 insertions(+), 218 deletions(-) delete mode 100644 ecorexx/include/ecorexx/Config.h delete mode 100644 ecorexx/src/Config.cpp delete mode 100644 eflxx_examples/src/ecorexx/config/.cvsignore delete mode 100644 eflxx_examples/src/ecorexx/config/Makefile.am delete mode 100644 eflxx_examples/src/ecorexx/config/main.cpp diff --git a/compile.sh b/compile.sh index ed34f70..e878838 100755 --- a/compile.sh +++ b/compile.sh @@ -6,7 +6,6 @@ PKG="eflxx eetxx edjexx ecorexx - esmartxx emotionxx elementaryxx eflxx_examples" diff --git a/ecorexx/configure.ac b/ecorexx/configure.ac index 8247366..3a8036c 100644 --- a/ecorexx/configure.ac +++ b/ecorexx/configure.ac @@ -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 diff --git a/ecorexx/include/ecorexx/Application.h b/ecorexx/include/ecorexx/Application.h index 295fb8e..0ef6252 100644 --- a/ecorexx/include/ecorexx/Application.h +++ b/ecorexx/include/ecorexx/Application.h @@ -6,8 +6,6 @@ /* EFL */ #include -#include -#include #include #include #include @@ -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(); diff --git a/ecorexx/include/ecorexx/Config.h b/ecorexx/include/ecorexx/Config.h deleted file mode 100644 index 4084cf0..0000000 --- a/ecorexx/include/ecorexx/Config.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef ECORE_CONFIG_H -#define ECORE_CONFIG_H - -/* STD */ -#include - -/** - * C++ Wrapper for the Enlightenment Core Configuration Library (Ecore_Config) - * - * @author Michael 'Mickey' Lauer - */ - -namespace Ecorexx { - -//=============================================================================================== -// Config -//=============================================================================================== - -class Config -{ - /** - * @class: Config ecoreconfig.h - * A simple persistent Key=Value configuration database. - * @author: Michael 'Mickey' Lauer - **/ -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 diff --git a/ecorexx/include/ecorexx/Ecorexx.h b/ecorexx/include/ecorexx/Ecorexx.h index 3ff98fd..4b168cf 100644 --- a/ecorexx/include/ecorexx/Ecorexx.h +++ b/ecorexx/include/ecorexx/Ecorexx.h @@ -9,7 +9,6 @@ #include "Animator.h" #include "Application.h" -#include "Config.h" #include "EvasWindow.h" #include "Timer.h" #include "XWindow.h" diff --git a/ecorexx/include/ecorexx/Makefile.am b/ecorexx/include/ecorexx/Makefile.am index 2d4b607..5e2ba2d 100644 --- a/ecorexx/include/ecorexx/Makefile.am +++ b/ecorexx/include/ecorexx/Makefile.am @@ -1,7 +1,6 @@ libecorexx_HEADERS = \ Application.h\ - Config.h \ EvasWindow.h \ XWindow.h \ Animator.h \ diff --git a/ecorexx/src/Application.cpp b/ecorexx/src/Application.cpp index 0651dd1..c26a078 100644 --- a/ecorexx/src/Application.cpp +++ b/ecorexx/src/Application.cpp @@ -7,7 +7,6 @@ #include #include #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 diff --git a/ecorexx/src/Config.cpp b/ecorexx/src/Config.cpp deleted file mode 100644 index 741c172..0000000 --- a/ecorexx/src/Config.cpp +++ /dev/null @@ -1,86 +0,0 @@ -#ifdef HAVE_CONFIG_H -#include -#endif - -/* EFL++ */ -#include -#include -#include -#include "../include/ecorexx/Config.h" - -/* EFL */ -#include - -#include -using namespace std; - -namespace Ecorexx { - -//=============================================================================================== -// Config -//=============================================================================================== - -Config::Config( const string& name ) - :_group( "default/" ) -{ - ecore_config_init( const_cast( 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( value.c_str () ) ); -} -string Config::getString( const string &key, const string& defaultValue ) -{ - ecore_config_string_default( key.c_str (), const_cast( 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(); -} - -} diff --git a/ecorexx/src/Makefile.am b/ecorexx/src/Makefile.am index 6d7043f..5db2a1b 100644 --- a/ecorexx/src/Makefile.am +++ b/ecorexx/src/Makefile.am @@ -17,7 +17,6 @@ lib_LTLIBRARIES = \ libecorexx_la_SOURCES = \ Application.cpp\ - Config.cpp \ EvasWindow.cpp \ XWindow.cpp \ Animator.cpp \ diff --git a/eflxx_examples/configure.ac b/eflxx_examples/configure.ac index fd8b4a5..5a1fcdb 100644 --- a/eflxx_examples/configure.ac +++ b/eflxx_examples/configure.ac @@ -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 diff --git a/eflxx_examples/src/Makefile.am b/eflxx_examples/src/Makefile.am index 7945229..1e75c25 100644 --- a/eflxx_examples/src/Makefile.am +++ b/eflxx_examples/src/Makefile.am @@ -14,7 +14,6 @@ AM_CFLAGS =\ SUBDIRS = \ common\ edjexx \ - esmartxx \ ecorexx \ eetxx \ emotionxx \ diff --git a/eflxx_examples/src/ecorexx/Makefile.am b/eflxx_examples/src/ecorexx/Makefile.am index 70ac757..5be7d0d 100644 --- a/eflxx_examples/src/ecorexx/Makefile.am +++ b/eflxx_examples/src/ecorexx/Makefile.am @@ -1 +1 @@ -SUBDIRS = 3dstars calibrate callbacks config paint simple stars timers list x +SUBDIRS = 3dstars calibrate callbacks paint simple stars timers list x diff --git a/eflxx_examples/src/ecorexx/config/.cvsignore b/eflxx_examples/src/ecorexx/config/.cvsignore deleted file mode 100644 index 8f4eb43..0000000 --- a/eflxx_examples/src/ecorexx/config/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -Makefile -Makefile.in -.deps -.libs -eflpp_ecore_config diff --git a/eflxx_examples/src/ecorexx/config/Makefile.am b/eflxx_examples/src/ecorexx/config/Makefile.am deleted file mode 100644 index ef6fc29..0000000 --- a/eflxx_examples/src/ecorexx/config/Makefile.am +++ /dev/null @@ -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) - diff --git a/eflxx_examples/src/ecorexx/config/main.cpp b/eflxx_examples/src/ecorexx/config/main.cpp deleted file mode 100644 index df281bc..0000000 --- a/eflxx_examples/src/ecorexx/config/main.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include - -using namespace Eflxx; - -#include -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; -}