Salome HOME
Improve swig generation process on Windows platform.
[tools/medcoupling.git] / src / INTERP_KERNEL / Bases / InterpKernelAutoPtr.hxx
index 7dcec2b96f0c7e39874f154f6ab9315e17ca3314..ea984a760b850b371262754b7321ae22b3a388df 100644 (file)
@@ -29,6 +29,8 @@ namespace INTERP_KERNEL
   public:
     AutoPtr(T *ptr=0):_ptr(ptr) {  }
     ~AutoPtr() { destroyPtr(); }
+    bool isNull() const { return _ptr==0; }
+    bool isNotNull() const { return !isNull(); }
     AutoPtr &operator=(T *ptr) { if(_ptr!=ptr) { destroyPtr(); _ptr=ptr; } return *this; }
     T *operator->() { return _ptr ; }
     const T *operator->() const { return _ptr; }
@@ -48,6 +50,8 @@ namespace INTERP_KERNEL
   public:
     AutoCppPtr(T *ptr=0):_ptr(ptr) {  }
     ~AutoCppPtr() { destroyPtr(); }
+    bool isNull() const { return _ptr==0; }
+    bool isNotNull() const { return !isNull(); }
     AutoCppPtr &operator=(T *ptr) { if(_ptr!=ptr) { destroyPtr(); _ptr=ptr; } return *this; }
     T *operator->() { return _ptr ; }
     const T *operator->() const { return _ptr; }
@@ -67,6 +71,8 @@ namespace INTERP_KERNEL
   public:
     AutoCPtr(T *ptr=0):_ptr(ptr) {  }
     ~AutoCPtr() { destroyPtr(); }
+    bool isNull() const { return _ptr==0; }
+    bool isNotNull() const { return !isNull(); }
     AutoCPtr &operator=(T *ptr) { if(_ptr!=ptr) { destroyPtr(); _ptr=ptr; } return *this; }
     T *operator->() { return _ptr ; }
     const T *operator->() const { return _ptr; }