[beast: 38/57] BSE: adjust for having 'Aida' as independent toplevel namespace



commit 6b237d21af2f71aeb21d0fe8089a6899f316192a
Author: Tim Janik <timj gnu org>
Date:   Mon Jul 17 11:49:30 2017 +0200

    BSE: adjust for having 'Aida' as independent toplevel namespace
    
    Signed-off-by: Tim Janik <timj gnu org>

 bse/bse.hh             |    4 ++--
 bse/bseenums.cc        |    2 +-
 bse/bsemain.cc         |    1 -
 bse/bsemidievent.cc    |    2 +-
 bse/bseobject.hh       |    4 ++--
 bse/bseserverinsert.hh |    2 +-
 bse/bsestartup.cc      |   18 +++++++++---------
 bse/bsestartup.hh      |    2 +-
 bse/bsestorage.cc      |    9 ++++-----
 bse/tests/misctests.cc |    3 +--
 10 files changed, 22 insertions(+), 25 deletions(-)
---
diff --git a/bse/bse.hh b/bse/bse.hh
index 661080e..b56180f 100644
--- a/bse/bse.hh
+++ b/bse/bse.hh
@@ -6,8 +6,8 @@
 #include <bse/bseclientapi.hh>
 
 namespace Bse { // clientapi glue code, see bsestartup.cc
-ServerHandle                      init_server_instance   ();
-Rapicorn::Aida::ClientConnectionP init_server_connection ();
+ServerHandle            init_server_instance   ();
+Aida::ClientConnectionP init_server_connection ();
 } // Bse
 
 #endif /* __BSE_H__ */
diff --git a/bse/bseenums.cc b/bse/bseenums.cc
index dfb5e7f..f31f3ad 100644
--- a/bse/bseenums.cc
+++ b/bse/bseenums.cc
@@ -41,7 +41,7 @@ bse_type_register_enums (void)
 const char*
 bse_error_blurb (Bse::Error error_value)
 {
-  const Rapicorn::Aida::EnumValue ev = Rapicorn::Aida::enum_info<Bse::Error>().find_value (error_value);
+  const Aida::EnumValue ev = Aida::enum_info<Bse::Error>().find_value (error_value);
   return ev.blurb;
 }
 
diff --git a/bse/bsemain.cc b/bse/bsemain.cc
index fe8a23e..d454652 100644
--- a/bse/bsemain.cc
+++ b/bse/bsemain.cc
@@ -21,7 +21,6 @@
 
 using namespace Bse;
 namespace Test = Rapicorn::Test;
-namespace Aida = Rapicorn::Aida;
 
 /* --- prototypes --- */
 static void    init_parse_args (int *argc_p, char **argv_p, BseMainArgs *margs, const Bse::StringVector 
&args);
diff --git a/bse/bsemidievent.cc b/bse/bsemidievent.cc
index 21dfcbb..41a5cd4 100644
--- a/bse/bsemidievent.cc
+++ b/bse/bsemidievent.cc
@@ -50,7 +50,7 @@ bse_midi_signal_default (Bse::MidiSignal type)
 const char*
 bse_midi_signal_name (Bse::MidiSignal signal)
 {
-  const Rapicorn::Aida::EnumValue ev = Rapicorn::Aida::enum_info<Bse::MidiSignal>().find_value (signal);
+  const Aida::EnumValue ev = Aida::enum_info<Bse::MidiSignal>().find_value (signal);
   return ev.blurb;
 }
 
diff --git a/bse/bseobject.hh b/bse/bseobject.hh
index 234f73e..4b81ab9 100644
--- a/bse/bseobject.hh
+++ b/bse/bseobject.hh
@@ -71,7 +71,7 @@ struct BseObject : GObject {
   {
     static_assert (std::is_pointer<ObjectImplPtr>::value, "");
     typedef typename std::remove_pointer<ObjectImplPtr>::type ObjectImplT;
-    static_assert (std::is_base_of<Rapicorn::Aida::ImplicitBase, ObjectImplT>::value, "");
+    static_assert (std::is_base_of<Aida::ImplicitBase, ObjectImplT>::value, "");
     return dynamic_cast<ObjectImplPtr> (cxxobject_);
   }
   // as<shared_ptr<T>>()
@@ -79,7 +79,7 @@ struct BseObject : GObject {
   ObjectImplP            as ()
   {
     typedef typename ObjectImplP::element_type ObjectImplT;
-    static_assert (std::is_base_of<Rapicorn::Aida::ImplicitBase, ObjectImplT>::value, "");
+    static_assert (std::is_base_of<Aida::ImplicitBase, ObjectImplT>::value, "");
     ObjectImplT *impl = this && cxxobject_ ? as<ObjectImplT*>() : NULL;
     return impl ? Rapicorn::shared_ptr_cast<ObjectImplT> (impl) : NULL;
   }
diff --git a/bse/bseserverinsert.hh b/bse/bseserverinsert.hh
index 04d8eaa..e7f1941 100644
--- a/bse/bseserverinsert.hh
+++ b/bse/bseserverinsert.hh
@@ -23,7 +23,7 @@ class_scope:Object:
   ObjectImplP            as ()
   {
     typedef typename ObjectImplP::element_type ObjectImplT;
-    static_assert (std::is_base_of<Rapicorn::Aida::ImplicitBase, ObjectImplT>::value, "");
+    static_assert (std::is_base_of<Aida::ImplicitBase, ObjectImplT>::value, "");
     ObjectImplT *impl = this ? dynamic_cast<ObjectImplT*> (this) : NULL;
     return impl ? Rapicorn::shared_ptr_cast<ObjectImplT> (impl) : NULL;
   }
diff --git a/bse/bsestartup.cc b/bse/bsestartup.cc
index ee35333..fd2c7e0 100644
--- a/bse/bsestartup.cc
+++ b/bse/bsestartup.cc
@@ -84,9 +84,9 @@ class AidaGlibSourceImpl : public AidaGlibSource {
   static int                 glib_check    (GSource *src)                     { return self_ (src)->check(); 
}
   static int                 glib_dispatch (GSource *src, GSourceFunc, void*) { return self_ 
(src)->dispatch(); }
   static void                glib_finalize (GSource *src)                     { self_ 
(src)->~AidaGlibSourceImpl(); }
-  Rapicorn::Aida::BaseConnection *connection_;
+  Aida::BaseConnection      *connection_;
   GPollFD                         pfd_;
-  AidaGlibSourceImpl (Rapicorn::Aida::BaseConnection *connection) :
+  AidaGlibSourceImpl (Aida::BaseConnection *connection) :
     connection_ (connection), pfd_ { -1, 0, 0 }
   {
     pfd_.fd = connection_->notify_fd();
@@ -116,7 +116,7 @@ class AidaGlibSourceImpl : public AidaGlibSource {
   }
 public:
   static AidaGlibSourceImpl*
-  create (Rapicorn::Aida::BaseConnection *connection)
+  create (Aida::BaseConnection *connection)
   {
     assert_return (connection != NULL, NULL);
     static GSourceFuncs glib_source_funcs = { glib_prepare, glib_check, glib_dispatch, glib_finalize, NULL, 
NULL };
@@ -126,31 +126,31 @@ public:
 };
 
 AidaGlibSource*
-AidaGlibSource::create (Rapicorn::Aida::BaseConnection *connection)
+AidaGlibSource::create (Aida::BaseConnection *connection)
 {
   return AidaGlibSourceImpl::create (connection);
 }
 
-static Rapicorn::Aida::ClientConnectionP *client_connection = NULL;
+static Aida::ClientConnectionP *client_connection = NULL;
 
 /// Retrieve a handle for the Bse::Server instance managing the Bse thread.
 ServerHandle
 init_server_instance () // bse.hh
 {
   ServerH server;
-  Rapicorn::Aida::ClientConnectionP connection = init_server_connection();
+  Aida::ClientConnectionP connection = init_server_connection();
   if (connection)
     server = connection->remote_origin<ServerH>();
   return server;
 }
 
 /// Retrieve the ClientConnection used for RPC communication with the Bse thread.
-Rapicorn::Aida::ClientConnectionP
+Aida::ClientConnectionP
 init_server_connection () // bse.hh
 {
   if (!client_connection)
     {
-      Rapicorn::Aida::ClientConnectionP connection = Rapicorn::Aida::ClientConnection::connect 
("inproc://BSE-" BST_VERSION);
+      Aida::ClientConnectionP connection = Aida::ClientConnection::connect ("inproc://BSE-" BST_VERSION);
       ServerH bseconnection_server_handle;
       if (connection)
         bseconnection_server_handle = connection->remote_origin<ServerH>(); // sets errno
@@ -159,7 +159,7 @@ init_server_connection () // bse.hh
       assert_return (bseconnection_server_handle.proxy_id() == BSE_SERVER, NULL);
       assert_return (bseconnection_server_handle.from_proxy (BSE_SERVER) == bseconnection_server_handle, 
NULL);
       assert_return (client_connection == NULL, NULL);
-      client_connection = new Rapicorn::Aida::ClientConnectionP (connection);
+      client_connection = new Aida::ClientConnectionP (connection);
     }
   return *client_connection;
 }
diff --git a/bse/bsestartup.hh b/bse/bsestartup.hh
index c67a7be..c2d1899 100644
--- a/bse/bsestartup.hh
+++ b/bse/bsestartup.hh
@@ -29,7 +29,7 @@ void          objects_debug_leaks ();
 /// A GSource implementation to attach an Aida::BaseConnection to a Glib main loop.
 class AidaGlibSource : public GSource {
 public:
-  static AidaGlibSource* create (Rapicorn::Aida::BaseConnection *connection);
+  static AidaGlibSource* create (Aida::BaseConnection *connection);
 };
 
 } // Bse
diff --git a/bse/bsestorage.cc b/bse/bsestorage.cc
index 7408097..3e6da1b 100644
--- a/bse/bsestorage.cc
+++ b/bse/bsestorage.cc
@@ -17,7 +17,6 @@
 #include <signal.h>
 
 using Bse::Flac1Handle;
-namespace Aida = Bse::Aida;
 
 /* --- macros --- */
 #define parse_or_return sfi_scanner_parse_or_return
@@ -629,7 +628,7 @@ item_link_resolved (gpointer     data,
 template<typename ValueType = std::string> ValueType
 aux_vector_get (const std::vector<std::string> &auxvector, const std::string &field, const std::string &key, 
const std::string &fallback = "")
 {
-  return Bse::string_to_type<ValueType> (Rapicorn::Aida::aux_vector_find (auxvector, field, key, fallback));
+  return Bse::string_to_type<ValueType> (Aida::aux_vector_find (auxvector, field, key, fallback));
 }
 
 static bool
@@ -773,7 +772,7 @@ restore_cxx_item_property (BseItem *bitem, BseStorage *self)
       GTokenType expected_token = storage_parse_property_value (self, identifier, any, auxvector);
       if (expected_token != G_TOKEN_NONE)
         return expected_token;
-      if (Rapicorn::Aida::aux_vector_check_options (auxvector, identifier, "hints", "r:w:S")) // readable, 
writable, storage
+      if (Aida::aux_vector_check_options (auxvector, identifier, "hints", "r:w:S")) // readable, writable, 
storage
         {
           item->__aida_set__ (identifier, any);
         }
@@ -1260,7 +1259,7 @@ store_item_properties (BseItem    *item,
 static void
 storage_store_property_value (BseStorage *self, const std::string &property_name, Bse::Any any, const 
std::vector<std::string> &aux_data)
 {
-  if (Rapicorn::Aida::aux_vector_check_options (aux_data, property_name, "hints", "skip-default"))
+  if (Aida::aux_vector_check_options (aux_data, property_name, "hints", "skip-default"))
     {
       const char *const invalid = "\377\377\376\376\1\2 invalid \3"; // no-value marker, (invalid UTF-8)
       const std::string dflt_val = aux_vector_get (aux_data, property_name, "default", invalid);
@@ -1302,7 +1301,7 @@ store_cxx_item_properties (BseItem *bitem, BseStorage *self)
   Bse::ItemImpl *item = bitem->as<Bse::ItemImpl*>();
   const std::vector<std::string> auxvector = item->__aida_aux_data__();
   for (const std::string &pname : item->__aida_dir__())
-    if (Rapicorn::Aida::aux_vector_check_options (auxvector, pname, "hints", "r:w:S")) // readable, 
writable, storage
+    if (Aida::aux_vector_check_options (auxvector, pname, "hints", "r:w:S")) // readable, writable, storage
       storage_store_property_value (self, pname, item->__aida_get__ (pname), auxvector);
 }
 
diff --git a/bse/tests/misctests.cc b/bse/tests/misctests.cc
index c76c78e..ad07b35 100644
--- a/bse/tests/misctests.cc
+++ b/bse/tests/misctests.cc
@@ -146,8 +146,7 @@ main (gint   argc,
       Bse::MusicalTuning musical_tuning = Bse::MusicalTuning (j);
       check_tuning_monotony (musical_tuning);
       check_freq_vs_notes (musical_tuning);
-      TPASS ("Tuning System: %s\n",
-             Rapicorn::Aida::enum_info<Bse::MusicalTuning>().find_value (musical_tuning).ident);
+      TPASS ("Tuning System: %s\n", Aida::enum_info<Bse::MusicalTuning>().find_value (musical_tuning).ident);
     }
 
   return 0;


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