[beast: 20/57] SFI: adjust to be 'using' only certain Rapicorn parts



commit 716409ed69f5d9611cd051dbda5ae7ca7ea693e9
Author: Tim Janik <timj gnu org>
Date:   Mon Jul 17 11:09:02 2017 +0200

    SFI: adjust to be 'using' only certain Rapicorn parts
    
    Signed-off-by: Tim Janik <timj gnu org>

 sfi/sfidl.cc       |    1 +
 sfi/sfiglue.cc     |    5 +++++
 sfi/sfiparams.hh   |    3 +++
 sfi/sfivisitors.hh |   19 ++++++++++++-------
 sfi/sfiwrapper.hh  |    2 ++
 5 files changed, 23 insertions(+), 7 deletions(-)
---
diff --git a/sfi/sfidl.cc b/sfi/sfidl.cc
index 04bd5f4..cb2d824 100644
--- a/sfi/sfidl.cc
+++ b/sfi/sfidl.cc
@@ -73,5 +73,6 @@ int main (int argc, char **argv)
 #include "sfidl-cxxbase.cc"
 #include "sfidl-hostc.cc"
 #include "sfidl-utils.cc"
+#include "formatter.cc"
 
 /* vim:set ts=8 sts=2 sw=2: */
diff --git a/sfi/sfiglue.cc b/sfi/sfiglue.cc
index 5aee004..3a2413a 100644
--- a/sfi/sfiglue.cc
+++ b/sfi/sfiglue.cc
@@ -6,6 +6,11 @@
 #include <string.h>
 #include <gobject/gvaluecollector.h>
 
+// == Compatibility Imports ==
+namespace Bse {
+using Rapicorn::ThreadInfo;
+} // Bse
+
 /* --- prototype --- */
 static GHashTable*     glue_gc_hash_table_new  (void);
 
diff --git a/sfi/sfiparams.hh b/sfi/sfiparams.hh
index fbc1db8..067184b 100644
--- a/sfi/sfiparams.hh
+++ b/sfi/sfiparams.hh
@@ -315,9 +315,12 @@ extern GType*       sfi__param_spec_types;
 SfiRec*                sfi_pspec_to_rec        (GParamSpec     *pspec);
 GParamSpec*    sfi_pspec_from_rec      (SfiRec         *prec);
 
+#include <rapicorn-core.hh>
+
 namespace Bse { // bsecore
 
 SfiChoiceValues choice_values_from_enum_values (const String &enumname, const 
::Rapicorn::Aida::EnumValueVector &evvec);
+
 template<class EnumType> SfiChoiceValues
 choice_values_from_enum ()
 {
diff --git a/sfi/sfivisitors.hh b/sfi/sfivisitors.hh
index 41f6a56..8d3b567 100644
--- a/sfi/sfivisitors.hh
+++ b/sfi/sfivisitors.hh
@@ -6,6 +6,11 @@
 
 namespace Bse { // BseCore
 
+// == Compatibility Imports ==
+using Rapicorn::VisitorDispatcher;
+using Rapicorn::StdVectorValueHandle;
+
+
 template<class Visitable> void                            sfi_rec_to_visitable                      (SfiRec 
*rec, Visitable &visitable);
 template<class Visitable> SfiRec*                         sfi_rec_new_from_visitable                
(Visitable &visitable);
 template<class Visitable> void                            sfi_seq_to_visitable                      (SfiSeq 
*seq, Visitable &visitable);
@@ -17,7 +22,7 @@ bool sfi_pspecs_rec_fields_cache (const std::type_info &type_info, SfiRecFields
 bool sfi_pspecs_seq_field_cache  (const std::type_info &type_info, GParamSpec  **pp, bool assign = false); 
// internal
 bool sfi_pspecs_acs_fields_cache (const std::type_info &type_info, std::vector<GParamSpec*>**, bool assign = 
false); // internal
 
-class PspecVisitor : public VisitorDispatcher<PspecVisitor> {
+class PspecVisitor : public Bse::VisitorDispatcher<PspecVisitor> {
   std::vector<GParamSpec*> &pspecs_;
   std::vector<String>       aux_;
   String get_min (Name name, Name fallback) { return get_aux (name, "min", fallback); }
@@ -118,7 +123,7 @@ public:
   }
 };
 
-class ToRecVisitor : public VisitorDispatcher<ToRecVisitor> {
+class ToRecVisitor : public Bse::VisitorDispatcher<ToRecVisitor> {
   SfiRec *rec_;
 public:
   ToRecVisitor (SfiRec *rec) : rec_ (rec) {}
@@ -170,7 +175,7 @@ public:
   }
 };
 
-class FromRecVisitor : public VisitorDispatcher<FromRecVisitor> {
+class FromRecVisitor : public Bse::VisitorDispatcher<FromRecVisitor> {
   SfiRec *rec_;
 public:
   FromRecVisitor (SfiRec *rec) : rec_ (rec) {}
@@ -240,9 +245,9 @@ sfi_seq_to_visitable (SfiSeq *seq, Visitable &visitable)
       sfi_rec_set (tmp_rec, "seqelement", sfi_seq_get (seq, i));
       FromRecVisitor rec_visitor (tmp_rec);
       typedef typename Visitable::value_type A; // assumes Visitable derives std::vector
-      typename StdVectorValueHandle<::std::vector<A>>::type value_handle = visitable[i];
+      typename Bse::StdVectorValueHandle<::std::vector<A>>::type value_handle = visitable[i];
       rec_visitor (value_handle, "seqelement");
-      if (StdVectorValueHandle<::std::vector<A>>::value) // copy-by-value
+      if (Bse::StdVectorValueHandle<::std::vector<A>>::value) // copy-by-value
         visitable[i] = value_handle;
     }
   sfi_rec_unref (tmp_rec);
@@ -257,9 +262,9 @@ sfi_seq_new_from_visitable (Visitable &visitable)
     {
       ToRecVisitor rec_visitor (tmp_rec);
       typedef typename Visitable::value_type A; // assumes Visitable derives std::vector
-      typename StdVectorValueHandle<::std::vector<A>>::type value_handle = visitable[i];
+      typename Bse::StdVectorValueHandle<::std::vector<A>>::type value_handle = visitable[i];
       rec_visitor (value_handle, "seqelement");
-      if (StdVectorValueHandle<::std::vector<A>>::value) // copy-by-value
+      if (Bse::StdVectorValueHandle<::std::vector<A>>::value) // copy-by-value
         visitable[i] = value_handle;
       GValue *element = sfi_rec_get (tmp_rec, "seqelement");
       if (element)
diff --git a/sfi/sfiwrapper.hh b/sfi/sfiwrapper.hh
index 3242867..9ce8768 100644
--- a/sfi/sfiwrapper.hh
+++ b/sfi/sfiwrapper.hh
@@ -3,6 +3,8 @@
 #define __SFI_WRAPPER_H__
 
 #include <sfi/bcore.hh>
+#include <sfi/path.hh>
+#include <mutex>
 
 #ifdef  BSE_CONVENIENCE
 using Bse::uint8;


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