nemiver r853 - in branches/0.5: . src/confmgr



Author: dodji
Date: Sat Jun 21 12:38:42 2008
New Revision: 853
URL: http://svn.gnome.org/viewvc/nemiver?rev=853&view=rev

Log:
[gconfmgr] remove spaces before ';' at end of lines



Modified:
   branches/0.5/ChangeLog
   branches/0.5/src/confmgr/nmv-gconf-mgr.cc
   branches/0.5/src/confmgr/nmv-i-conf-mgr.h

Modified: branches/0.5/src/confmgr/nmv-gconf-mgr.cc
==============================================================================
--- branches/0.5/src/confmgr/nmv-gconf-mgr.cc	(original)
+++ branches/0.5/src/confmgr/nmv-gconf-mgr.cc	Sat Jun 21 12:38:42 2008
@@ -30,31 +30,31 @@
 
 NEMIVER_BEGIN_NAMESPACE (nemiver)
 
-using nemiver::common::GCharSafePtr ;
+using nemiver::common::GCharSafePtr;
 
 class GConfMgr : public IConfMgr {
-    GConfMgr (const GConfMgr &) ;
-    GConfMgr& operator= (const GConfMgr &) ;
+    GConfMgr (const GConfMgr &);
+    GConfMgr& operator= (const GConfMgr &);
 
-    GConfClient *m_gconf_client ;
-    sigc::signal<void, const UString&, IConfMgr::Value&> m_value_changed_signal ;
+    GConfClient *m_gconf_client;
+    sigc::signal<void, const UString&, IConfMgr::Value&> m_value_changed_signal;
 
 public:
 
-    GConfMgr (DynamicModule *a_dynmod) ;
-    virtual ~GConfMgr () ;
+    GConfMgr (DynamicModule *a_dynmod);
+    virtual ~GConfMgr ();
 
-    void set_key_dir_to_notify (const UString &a_key_dir) ;
+    void set_key_dir_to_notify (const UString &a_key_dir);
     void add_key_to_notify (const UString &a_key);
 
-    bool get_key_value (const UString &a_key, UString &a_value) ;
-    void set_key_value (const UString &a_key, const UString &a_value) ;
+    bool get_key_value (const UString &a_key, UString &a_value);
+    void set_key_value (const UString &a_key, const UString &a_value);
 
-    bool get_key_value (const UString &a_key, bool &a_value) ;
-    void set_key_value (const UString &a_key, bool a_value) ;
+    bool get_key_value (const UString &a_key, bool &a_value);
+    void set_key_value (const UString &a_key, bool a_value);
 
-    bool get_key_value (const UString &a_key, int &a_value) ;
-    void set_key_value (const UString &a_key, int a_value) ;
+    bool get_key_value (const UString &a_key, int &a_value);
+    void set_key_value (const UString &a_key, int a_value);
 
     bool get_key_value (const UString &a_key, double &a_value) ;
     void set_key_value (const UString &a_key, double a_value) ;
@@ -63,7 +63,7 @@
 
 };//end class GCongMgr
 
-//static const char * NEMIVER_KEY_DIR = "/app/nemiver" ;
+//static const char * NEMIVER_KEY_DIR = "/app/nemiver";
 
 struct GErrorRef {
     void operator () (GError *a_error) {if (a_error) {}}
@@ -73,7 +73,7 @@
     void operator () (GError *a_error) {if (a_error) {g_error_free (a_error);}}
 };
 
-typedef SafePtr<GError, GErrorRef, GErrorUnref> GErrorSafePtr ;
+typedef SafePtr<GError, GErrorRef, GErrorUnref> GErrorSafePtr;
 
 void
 client_notify_func (GConfClient *a_client,
@@ -83,39 +83,39 @@
 {
     NEMIVER_TRY
 
-    THROW_IF_FAIL (a_client) ;
-    THROW_IF_FAIL (a_key) ;
-    THROW_IF_FAIL (a_value) ;
-    THROW_IF_FAIL (a_conf_mgr) ;
+    THROW_IF_FAIL (a_client);
+    THROW_IF_FAIL (a_key);
+    THROW_IF_FAIL (a_value);
+    THROW_IF_FAIL (a_conf_mgr);
 
 
-    LOG_DD ("key changed: '" << a_key << "'") ;
+    LOG_DD ("key changed: '" << a_key << "'");
 
-    IConfMgr::Value value ;
+    IConfMgr::Value value;
     switch (a_value->type) {
         case GCONF_VALUE_STRING:
-            value = UString (gconf_value_get_string (a_value)) ;
-            LOG_DD ("key value is: '" << boost::get<UString> (value) << "'") ;
-            break ;
+            value = UString (gconf_value_get_string (a_value));
+            LOG_DD ("key value is: '" << boost::get<UString> (value) << "'");
+            break;
         case GCONF_VALUE_INT:
-            value = gconf_value_get_int (a_value) ;
-            LOG_DD ("key value is: '" << boost::get<int> (value) << "'") ;
-            break ;
+            value = gconf_value_get_int (a_value);
+            LOG_DD ("key value is: '" << boost::get<int> (value) << "'");
+            break;
         case GCONF_VALUE_FLOAT:
-            value = gconf_value_get_float (a_value) ;
-            LOG_DD ("key value is: '" << boost::get<double> (value) << "'") ;
-            break ;
+            value = gconf_value_get_float (a_value);
+            LOG_DD ("key value is: '" << boost::get<double> (value) << "'");
+            break;
         case GCONF_VALUE_BOOL:
-            value = (bool) gconf_value_get_bool (a_value) ;
-            LOG_DD ("key value is: '" << boost::get<bool> (value) << "'") ;
-            break ;
+            value = (bool) gconf_value_get_bool (a_value);
+            LOG_DD ("key value is: '" << boost::get<bool> (value) << "'");
+            break;
         default:
             LOG_ERROR ("unsupported key type '"
                        << (int)a_value->type
-                       << "'") ;
-            return ;
+                       << "'");
+            return;
     }
-    a_conf_mgr->value_changed_signal ().emit (a_key, value) ;
+    a_conf_mgr->value_changed_signal ().emit (a_key, value);
 
     NEMIVER_CATCH_NOX
 }
@@ -126,9 +126,9 @@
                         GConfEntry *a_entry,
                         GConfMgr *a_conf_mgr)
 {
-    THROW_IF_FAIL (a_client) ;
-    THROW_IF_FAIL (a_entry) ;
-    THROW_IF_FAIL (a_conf_mgr) ;
+    THROW_IF_FAIL (a_client);
+    THROW_IF_FAIL (a_entry);
+    THROW_IF_FAIL (a_conf_mgr);
     if (a_cnxn_id) {}
 
     client_notify_func (a_client,
@@ -140,177 +140,177 @@
 void
 GConfMgr::set_key_dir_to_notify (const UString &a_key_dir)
 {
-    THROW_IF_FAIL (m_gconf_client) ;
+    THROW_IF_FAIL (m_gconf_client);
     GError *err=0;
     gconf_client_add_dir (m_gconf_client,
                           a_key_dir.c_str (),
                           GCONF_CLIENT_PRELOAD_NONE,
-                          &err) ;
-    GErrorSafePtr error (err) ;
-    THROW_IF_FAIL2 (!error, error->message) ;
-    LOG_DD ("watching key for notification: '" << a_key_dir << "'") ;
+                          &err);
+    GErrorSafePtr error (err);
+    THROW_IF_FAIL2 (!error, error->message);
+    LOG_DD ("watching key for notification: '" << a_key_dir << "'");
 }
 
 void
 GConfMgr::add_key_to_notify (const UString &a_key)
 {
-    THROW_IF_FAIL (m_gconf_client) ;
+    THROW_IF_FAIL (m_gconf_client);
     GError *err=0;
     gconf_client_notify_add (m_gconf_client,
                              a_key.c_str (),
                              (GConfClientNotifyFunc) client_notify_add_func,
                              this,
                              NULL,
-                             &err) ;
-    GErrorSafePtr error (err) ;
-    THROW_IF_FAIL2 (!error, error->message) ;
-    LOG_DD ("watching key for notification: '" << a_key << "'") ;
+                             &err);
+    GErrorSafePtr error (err);
+    THROW_IF_FAIL2 (!error, error->message);
+    LOG_DD ("watching key for notification: '" << a_key << "'");
 }
 
 GConfMgr::GConfMgr (DynamicModule *a_dynmod) :
     IConfMgr (a_dynmod),
     m_gconf_client (0)
 {
-    m_gconf_client = gconf_client_get_default () ;
-    THROW_IF_FAIL (m_gconf_client) ;
+    m_gconf_client = gconf_client_get_default ();
+    THROW_IF_FAIL (m_gconf_client);
     g_signal_connect (G_OBJECT (m_gconf_client),
                       "value-changed",
                       G_CALLBACK (client_notify_func),
-                      this) ;
+                      this);
 }
 
 GConfMgr::~GConfMgr ()
 {
-    LOG_D ("delete", "destructor-domain") ;
+    LOG_D ("delete", "destructor-domain");
 }
 
 bool
 GConfMgr::get_key_value (const UString &a_key, UString &a_value)
 {
-    THROW_IF_FAIL (m_gconf_client) ;
+    THROW_IF_FAIL (m_gconf_client);
 
-    GError *err=NULL ;
+    GError *err=NULL;
     GCharSafePtr value (gconf_client_get_string (m_gconf_client,
                                                  a_key.c_str (),
                                                  &err));
-    GErrorSafePtr error (err) ;
+    GErrorSafePtr error (err);
     if (error) {
-        LOG_ERROR (error->message) ;
-        return false ;
+        LOG_ERROR (error->message);
+        return false;
     }
-    a_value = value.get () ;
-    return true ;
+    a_value = value.get ();
+    return true;
 }
 
 void
 GConfMgr::set_key_value (const UString &a_key, const UString &a_value)
 {
-    THROW_IF_FAIL (m_gconf_client) ;
-    GError *err=NULL ;
+    THROW_IF_FAIL (m_gconf_client);
+    GError *err=NULL;
 
     gconf_client_set_string (m_gconf_client,
                              a_key.c_str (),
                              a_value.c_str (),
-                             &err) ;
+                             &err);
     GErrorSafePtr error (err);
     if (error) {
-        THROW (error->message) ;
+        THROW (error->message);
     }
 }
 
 bool
 GConfMgr::get_key_value (const UString &a_key, bool &a_value)
 {
-    THROW_IF_FAIL (m_gconf_client) ;
+    THROW_IF_FAIL (m_gconf_client);
 
-    GError *err=NULL ;
+    GError *err=NULL;
     a_value = gconf_client_get_bool (m_gconf_client,
                                      a_key.c_str (),
                                      &err);
-    GErrorSafePtr error (err) ;
+    GErrorSafePtr error (err);
     if (error) {
-        LOG_ERROR (error->message) ;
-        return false ;
+        LOG_ERROR (error->message);
+        return false;
     }
-    return true ;
+    return true;
 }
 
 void
 GConfMgr::set_key_value (const UString &a_key, bool a_value)
 {
-    THROW_IF_FAIL (m_gconf_client) ;
-    GError *err=NULL ;
+    THROW_IF_FAIL (m_gconf_client);
+    GError *err=NULL;
 
     gconf_client_set_bool (m_gconf_client,
                            a_key.c_str (),
                            a_value,
-                           &err) ;
+                           &err);
     GErrorSafePtr error (err);
     if (error) {
-        THROW (error->message) ;
+        THROW (error->message);
     }
 }
 
 bool
 GConfMgr::get_key_value (const UString &a_key, int &a_value)
 {
-    THROW_IF_FAIL (m_gconf_client) ;
+    THROW_IF_FAIL (m_gconf_client);
 
-    GError *err=NULL ;
+    GError *err=NULL;
     a_value = gconf_client_get_int (m_gconf_client,
                                     a_key.c_str (),
                                     &err);
-    GErrorSafePtr error (err) ;
+    GErrorSafePtr error (err);
     if (error) {
-        LOG_ERROR (error->message) ;
-        return false ;
+        LOG_ERROR (error->message);
+        return false;
     }
-    return true ;
+    return true;
 }
 
 void
 GConfMgr::set_key_value (const UString &a_key, int a_value)
 {
-    THROW_IF_FAIL (m_gconf_client) ;
-    GError *err=NULL ;
+    THROW_IF_FAIL (m_gconf_client);
+    GError *err=NULL;
 
     gconf_client_set_int (m_gconf_client,
                           a_key.c_str (),
                           a_value,
-                          &err) ;
+                          &err);
     GErrorSafePtr error (err);
     if (error) {
-        THROW (error->message) ;
+        THROW (error->message);
     }
 }
 
 bool
 GConfMgr::get_key_value (const UString &a_key, double &a_value)
 {
-    THROW_IF_FAIL (m_gconf_client) ;
+    THROW_IF_FAIL (m_gconf_client);
 
-    GError *err=NULL ;
+    GError *err=NULL;
     a_value = gconf_client_get_float (m_gconf_client,
                                       a_key.c_str (),
                                       &err);
-    GErrorSafePtr error (err) ;
+    GErrorSafePtr error (err);
     if (error) {
-        LOG_ERROR (error->message) ;
-        return false ;
+        LOG_ERROR (error->message);
+        return false;
     }
-    return true ;
+    return true;
 }
 
 void
 GConfMgr::set_key_value (const UString &a_key, double a_value)
 {
-    THROW_IF_FAIL (m_gconf_client) ;
-    GError *err=NULL ;
+    THROW_IF_FAIL (m_gconf_client);
+    GError *err=NULL;
 
     gconf_client_set_float (m_gconf_client,
                             a_key.c_str (),
                             a_value,
-                            &err) ;
+                            &err);
     GErrorSafePtr error (err);
     if (error) {
         THROW (error->message) ;
@@ -320,19 +320,20 @@
 sigc::signal<void, const UString&, IConfMgr::Value&>&
 GConfMgr::value_changed_signal ()
 {
-    return m_value_changed_signal ;
+    return m_value_changed_signal;
 }
 
-using nemiver::common::DynModIfaceSafePtr ;
+
+using nemiver::common::DynModIfaceSafePtr;
 class GConfMgrModule : public DynamicModule {
 
 public:
     void get_info (Info &a_info) const
     {
-        a_info.module_name = "GConfMgr" ;
+        a_info.module_name = "GConfMgr";
         a_info.module_description =
-            "A GConf implementation of the IConfMgr interface" ;
-        a_info.module_version = "1.0" ;
+            "A GConf implementation of the IConfMgr interface";
+        a_info.module_version = "1.0";
     }
 
     /// \brief module init routinr
@@ -344,11 +345,11 @@
                            DynModIfaceSafePtr &a_iface)
     {
         if (a_iface_name == "IConfMgr") {
-            a_iface.reset (new GConfMgr (this)) ;
+            a_iface.reset (new GConfMgr (this));
         } else {
-            return false ;
+            return false;
         }
-        return true ;
+        return true;
     }
 };//end class GConfMgrModule
 
@@ -358,8 +359,8 @@
 bool
 NEMIVER_API nemiver_common_create_dynamic_module_instance (void **a_new_instance)
 {
-    *a_new_instance = new nemiver::GConfMgrModule () ;
-    return (*a_new_instance != 0) ;
+    *a_new_instance = new nemiver::GConfMgrModule ();
+    return (*a_new_instance != 0);
 }
 
 }//end extern C

Modified: branches/0.5/src/confmgr/nmv-i-conf-mgr.h
==============================================================================
--- branches/0.5/src/confmgr/nmv-i-conf-mgr.h	(original)
+++ branches/0.5/src/confmgr/nmv-i-conf-mgr.h	Sat Jun 21 12:38:42 2008
@@ -26,26 +26,27 @@
 #define __NMV_CONF_MGR_H__
 
 #include <boost/variant.hpp>
+#include <list>
 #include "common/nmv-dynamic-module.h"
 #include "common/nmv-env.h"
 
-using nemiver::common::SafePtr ;
-using nemiver::common::DynamicModule ;
-using nemiver::common::DynamicModuleSafePtr ;
-using nemiver::common::DynModIface ;
-using nemiver::common::ObjectRef ;
-using nemiver::common::ObjectUnref ;
-using nemiver::common::UString ;
+using nemiver::common::SafePtr;
+using nemiver::common::DynamicModule;
+using nemiver::common::DynamicModuleSafePtr;
+using nemiver::common::DynModIface;
+using nemiver::common::ObjectRef;
+using nemiver::common::ObjectUnref;
+using nemiver::common::UString;
 
 NEMIVER_BEGIN_NAMESPACE (nemiver)
 
-class IConfMgr ;
-typedef SafePtr<IConfMgr, ObjectRef, ObjectUnref> IConfMgrSafePtr ;
+class IConfMgr;
+typedef SafePtr<IConfMgr, ObjectRef, ObjectUnref> IConfMgrSafePtr;
 
 class NEMIVER_API IConfMgr : public DynModIface {
     //non copyable
-    IConfMgr (const IConfMgr &) ;
-    IConfMgr& operator= (const IConfMgr &) ;
+    IConfMgr (const IConfMgr &);
+    IConfMgr& operator= (const IConfMgr &);
 
 protected:
 
@@ -55,14 +56,14 @@
 
 public:
 
-    typedef boost::variant<UString, bool, int, double> Value ;
+    typedef boost::variant<UString, bool, int, double> Value;
 
     virtual ~IConfMgr () {}
 
     virtual void set_key_dir_to_notify (const UString &a_key_dir) = 0;
     virtual void add_key_to_notify (const UString &a_key) = 0;
 
-    virtual bool get_key_value (const UString &a_key, UString &a_value) = 0 ;
+    virtual bool get_key_value (const UString &a_key, UString &a_value) = 0;
     virtual void set_key_value (const UString &a_key, const UString &a_value) = 0;
 
     virtual bool get_key_value (const UString &a_key, bool &a_value) = 0;
@@ -75,7 +76,7 @@
     virtual void set_key_value (const UString &a_key, double a_value) = 0;
 
     virtual sigc::signal<void, const UString&, IConfMgr::Value&>&
-                                                    value_changed_signal () = 0 ;
+                                                    value_changed_signal () = 0;
 
 };//end class IConfMgr
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]