[glom/online-glom] Hide some methods in sharedptr from swig.



commit bec0b932aef043ea1a8b531c177088bf7d031127
Author: Ben Konrath <ben bagu org>
Date:   Thu Dec 23 11:47:51 2010 +0100

    Hide some methods in sharedptr from swig.
    
    * glom/libglom/sharedptr.h: Add #ifdefs to stop swig warnings and hide
    internal methods from the java code generation.

 ChangeLog                |    7 +++++++
 glom/libglom/sharedptr.h |   12 ++++++++++++
 2 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 52c6ba9..515a0e8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-12-23  Ben Konrath  <ben bagu org>
+
+	Hide some methods in sharedptr from swig.
+
+	* glom/libglom/sharedptr.h: Add #ifdefs to stop swig warnings and hide
+	internal methods from the java code generation.
+
 2010-12-17  Ben Konrath  <ben bagu org>
 
 	Remove python code in libglom to avoid python errors when using the
diff --git a/glom/libglom/sharedptr.h b/glom/libglom/sharedptr.h
index f69c3a9..e438315 100644
--- a/glom/libglom/sharedptr.h
+++ b/glom/libglom/sharedptr.h
@@ -46,10 +46,12 @@ public:
   ///Take ownership
   explicit sharedptr(T_obj* pobj);
 
+#ifndef SWIG //Hide this API from swig.
   /** Take ownership.
    * This is only for internal use.
    */
   explicit sharedptr(T_obj* pobj, size_type* refcount);
+#endif //SWIG
 
   ///Share ownership
   sharedptr(const sharedptr& src);
@@ -68,8 +70,10 @@ public:
   template <class T_CastFrom>
   inline sharedptr(const sharedptr<T_CastFrom>& src);
 
+#ifndef SWIG //Hide this API from swig.
   ///Share ownership
   sharedptr& operator=(const sharedptr& src);
+#endif //SWIG
 
   /** Copy from different, but castable type).
    *
@@ -80,8 +84,10 @@ public:
 
   virtual ~sharedptr();
 
+#ifndef SWIG //Hide this API from swig.
   inline bool operator==(const sharedptr<T_obj>& src) const;
   inline bool operator!=(const sharedptr<T_obj>& src) const;
+#endif //SWIG
 
   ///Forget the instance.
   virtual void clear();
@@ -90,9 +96,11 @@ public:
    */
   inline T_obj& operator*();
 
+#ifndef SWIG //Hide this API from swig.
   /** Dereferencing.
    */
   inline const T_obj& operator*() const;
+#endif //SWIG
 
   /** Dereferencing.
    *
@@ -101,6 +109,7 @@ public:
    */
   inline T_obj* operator->() const;
 
+#ifndef SWIG //Hide this API from swig.
   /** Test whether the sharedptr<> points to any underlying instance.
    *
    * Mimics usage of ordinary pointers:
@@ -120,6 +129,7 @@ public:
    * @endcode
    */
   inline bool operator!() const;
+#endif //SWIG
 
    /** Dynamic cast to derived class.
    *
@@ -159,12 +169,14 @@ public:
   ///Get the underlying instance:
   inline T_obj* obj();
 
+#ifndef SWIG //Hide this API from swig.
   ///Get the underlying instance:
   inline const T_obj* obj() const;
 
   ///This is for internal use. You never need to use it.
   inline size_type* _get_refcount() const
   { return m_pRefCount; }
+#endif //SWIG
 
 private:
   inline void ref();



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