|
@@ -65,7 +65,7 @@
|
|
|
// disable mysterious MSVC warning for static inline PTA::empty_array method
|
|
// disable mysterious MSVC warning for static inline PTA::empty_array method
|
|
|
// need to chk if vc 7.0 still has this problem, would like to keep it enabled
|
|
// need to chk if vc 7.0 still has this problem, would like to keep it enabled
|
|
|
#pragma warning (disable : 4506)
|
|
#pragma warning (disable : 4506)
|
|
|
-#endif
|
|
|
|
|
|
|
+#endif // _MSC_VER && !__INTEL_COMPILER
|
|
|
|
|
|
|
|
template <class Element>
|
|
template <class Element>
|
|
|
class ConstPointerToArray;
|
|
class ConstPointerToArray;
|
|
@@ -96,7 +96,9 @@ PUBLISHED:
|
|
|
INLINE static PointerToArray<Element> empty_array(size_type n, TypeHandle type_handle = get_type_handle(Element));
|
|
INLINE static PointerToArray<Element> empty_array(size_type n, TypeHandle type_handle = get_type_handle(Element));
|
|
|
INLINE PointerToArray(const PointerToArray<Element> ©);
|
|
INLINE PointerToArray(const PointerToArray<Element> ©);
|
|
|
|
|
|
|
|
|
|
+#ifdef HAVE_PYTHON
|
|
|
EXTENSION(PointerToArray(PyObject *self, PyObject *source));
|
|
EXTENSION(PointerToArray(PyObject *self, PyObject *source));
|
|
|
|
|
+#endif // HAVE_PYTHON */
|
|
|
|
|
|
|
|
INLINE void clear();
|
|
INLINE void clear();
|
|
|
|
|
|
|
@@ -107,9 +109,11 @@ PUBLISHED:
|
|
|
INLINE void set_element(size_type n, const Element &value);
|
|
INLINE void set_element(size_type n, const Element &value);
|
|
|
EXTENSION(const Element &__getitem__(size_type n) const);
|
|
EXTENSION(const Element &__getitem__(size_type n) const);
|
|
|
EXTENSION(void __setitem__(size_type n, const Element &value));
|
|
EXTENSION(void __setitem__(size_type n, const Element &value));
|
|
|
|
|
+#ifdef HAVE_PYTHON
|
|
|
EXTENSION(PyObject *get_data() const);
|
|
EXTENSION(PyObject *get_data() const);
|
|
|
EXTENSION(void set_data(PyObject *data));
|
|
EXTENSION(void set_data(PyObject *data));
|
|
|
EXTENSION(PyObject *get_subdata(size_type n, size_type count) const);
|
|
EXTENSION(PyObject *get_subdata(size_type n, size_type count) const);
|
|
|
|
|
+#endif // HAVE_PYTHON
|
|
|
INLINE void set_subdata(size_type n, size_type count, const std::string &data);
|
|
INLINE void set_subdata(size_type n, size_type count, const std::string &data);
|
|
|
INLINE int get_ref_count() const;
|
|
INLINE int get_ref_count() const;
|
|
|
INLINE int get_node_ref_count() const;
|
|
INLINE int get_node_ref_count() const;
|
|
@@ -123,7 +127,7 @@ PUBLISHED:
|
|
|
EXTENSION(void __releasebuffer__(PyObject *self, Py_buffer *view) const);
|
|
EXTENSION(void __releasebuffer__(PyObject *self, Py_buffer *view) const);
|
|
|
|
|
|
|
|
EXTENSION(PointerToArray<Element> __deepcopy__(PyObject *memo) const);
|
|
EXTENSION(PointerToArray<Element> __deepcopy__(PyObject *memo) const);
|
|
|
-#endif
|
|
|
|
|
|
|
+#endif // HAVE_PYTHON
|
|
|
|
|
|
|
|
#else // CPPPARSER
|
|
#else // CPPPARSER
|
|
|
// This is the actual, complete interface.
|
|
// This is the actual, complete interface.
|
|
@@ -186,7 +190,7 @@ public:
|
|
|
#ifndef _WIN32
|
|
#ifndef _WIN32
|
|
|
INLINE reference operator [](size_type n) const;
|
|
INLINE reference operator [](size_type n) const;
|
|
|
INLINE reference operator [](int n) const;
|
|
INLINE reference operator [](int n) const;
|
|
|
-#endif
|
|
|
|
|
|
|
+#endif // !_WIN32
|
|
|
|
|
|
|
|
INLINE void push_back(const Element &x);
|
|
INLINE void push_back(const Element &x);
|
|
|
INLINE void pop_back();
|
|
INLINE void pop_back();
|
|
@@ -269,8 +273,10 @@ PUBLISHED:
|
|
|
INLINE size_type size() const;
|
|
INLINE size_type size() const;
|
|
|
INLINE const Element &get_element(size_type n) const;
|
|
INLINE const Element &get_element(size_type n) const;
|
|
|
EXTENSION(const Element &__getitem__(size_type n) const);
|
|
EXTENSION(const Element &__getitem__(size_type n) const);
|
|
|
|
|
+#ifdef HAVE_PYTHON
|
|
|
EXTENSION(PyObject *get_data() const);
|
|
EXTENSION(PyObject *get_data() const);
|
|
|
EXTENSION(PyObject *get_subdata(size_type n, size_type count) const);
|
|
EXTENSION(PyObject *get_subdata(size_type n, size_type count) const);
|
|
|
|
|
+#endif // HAVE_PYTHON
|
|
|
INLINE int get_ref_count() const;
|
|
INLINE int get_ref_count() const;
|
|
|
INLINE int get_node_ref_count() const;
|
|
INLINE int get_node_ref_count() const;
|
|
|
|
|
|
|
@@ -283,7 +289,7 @@ PUBLISHED:
|
|
|
EXTENSION(void __releasebuffer__(PyObject *self, Py_buffer *view) const);
|
|
EXTENSION(void __releasebuffer__(PyObject *self, Py_buffer *view) const);
|
|
|
|
|
|
|
|
EXTENSION(ConstPointerToArray<Element> __deepcopy__(PyObject *memo) const);
|
|
EXTENSION(ConstPointerToArray<Element> __deepcopy__(PyObject *memo) const);
|
|
|
-#endif
|
|
|
|
|
|
|
+#endif // HAVE_PYTHON
|
|
|
|
|
|
|
|
#else // CPPPARSER
|
|
#else // CPPPARSER
|
|
|
// This is the actual, complete interface.
|
|
// This is the actual, complete interface.
|
|
@@ -296,9 +302,9 @@ PUBLISHED:
|
|
|
#ifdef _MSC_VER
|
|
#ifdef _MSC_VER
|
|
|
// VC++ seems to break the const_reverse_iterator definition somehow.
|
|
// VC++ seems to break the const_reverse_iterator definition somehow.
|
|
|
typedef typename pvector<Element>::reverse_iterator reverse_iterator;
|
|
typedef typename pvector<Element>::reverse_iterator reverse_iterator;
|
|
|
-#else
|
|
|
|
|
|
|
+#else // _MSC_VER
|
|
|
typedef typename pvector<Element>::const_reverse_iterator reverse_iterator;
|
|
typedef typename pvector<Element>::const_reverse_iterator reverse_iterator;
|
|
|
-#endif
|
|
|
|
|
|
|
+#endif // _MSC_VER
|
|
|
typedef typename pvector<Element>::const_reverse_iterator const_reverse_iterator;
|
|
typedef typename pvector<Element>::const_reverse_iterator const_reverse_iterator;
|
|
|
typedef typename pvector<Element>::difference_type difference_type;
|
|
typedef typename pvector<Element>::difference_type difference_type;
|
|
|
typedef typename pvector<Element>::size_type size_type;
|
|
typedef typename pvector<Element>::size_type size_type;
|
|
@@ -334,7 +340,7 @@ PUBLISHED:
|
|
|
#ifndef _WIN32
|
|
#ifndef _WIN32
|
|
|
INLINE reference operator [](size_type n) const;
|
|
INLINE reference operator [](size_type n) const;
|
|
|
INLINE reference operator [](int n) const;
|
|
INLINE reference operator [](int n) const;
|
|
|
-#endif
|
|
|
|
|
|
|
+#endif // !_WIN32
|
|
|
|
|
|
|
|
INLINE operator const Element *() const;
|
|
INLINE operator const Element *() const;
|
|
|
INLINE const Element *p() const;
|
|
INLINE const Element *p() const;
|
|
@@ -390,4 +396,4 @@ private:
|
|
|
|
|
|
|
|
#include "pointerToArray.I"
|
|
#include "pointerToArray.I"
|
|
|
|
|
|
|
|
-#endif // HAVE_POINTERTOARRAY_H
|
|
|
|
|
|
|
+#endif // !POINTERTOARRAY_H
|