17 import builtins
as __builtin__
21 strthis =
"proxy of " + self.this.__repr__()
22 except __builtin__.Exception:
24 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
27 def _swig_setattr_nondynamic_instance_variable(set):
28 def set_instance_attr(self, name, value):
30 set(self, name, value)
31 elif name ==
"thisown":
33 elif hasattr(self, name)
and isinstance(getattr(type(self), name), property):
34 set(self, name, value)
36 raise AttributeError(
"You cannot add instance attributes to %s" % self)
37 return set_instance_attr
40 def _swig_setattr_nondynamic_class_variable(set):
41 def set_class_attr(cls, name, value):
42 if hasattr(cls, name)
and not isinstance(getattr(cls, name), property):
45 raise AttributeError(
"You cannot add class attributes to %s" % cls)
49 class _SwigNonDynamicMeta(type):
50 """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
51 __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
56 class IMP_CGAL_SwigPyIterator(object):
57 r"""Proxy of C++ swig::IMP_CGAL_SwigPyIterator class."""
59 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
61 def __init__(self, *args, **kwargs):
62 raise AttributeError(
"No constructor defined - class is abstract")
64 __swig_destroy__ = _IMP_cgal.delete_IMP_CGAL_SwigPyIterator
67 r"""value(IMP_CGAL_SwigPyIterator self) -> PyObject *"""
68 return _IMP_cgal.IMP_CGAL_SwigPyIterator_value(self)
71 r"""incr(IMP_CGAL_SwigPyIterator self, size_t n=1) -> IMP_CGAL_SwigPyIterator"""
72 return _IMP_cgal.IMP_CGAL_SwigPyIterator_incr(self, n)
75 r"""decr(IMP_CGAL_SwigPyIterator self, size_t n=1) -> IMP_CGAL_SwigPyIterator"""
76 return _IMP_cgal.IMP_CGAL_SwigPyIterator_decr(self, n)
78 def distance(self, x):
79 r"""distance(IMP_CGAL_SwigPyIterator self, IMP_CGAL_SwigPyIterator x) -> ptrdiff_t"""
80 return _IMP_cgal.IMP_CGAL_SwigPyIterator_distance(self, x)
83 r"""equal(IMP_CGAL_SwigPyIterator self, IMP_CGAL_SwigPyIterator x) -> bool"""
84 return _IMP_cgal.IMP_CGAL_SwigPyIterator_equal(self, x)
87 r"""copy(IMP_CGAL_SwigPyIterator self) -> IMP_CGAL_SwigPyIterator"""
88 return _IMP_cgal.IMP_CGAL_SwigPyIterator_copy(self)
91 r"""__next__(IMP_CGAL_SwigPyIterator self) -> PyObject *"""
92 return _IMP_cgal.IMP_CGAL_SwigPyIterator___next__(self)
95 r"""previous(IMP_CGAL_SwigPyIterator self) -> PyObject *"""
96 return _IMP_cgal.IMP_CGAL_SwigPyIterator_previous(self)
99 r"""advance(IMP_CGAL_SwigPyIterator self, ptrdiff_t n) -> IMP_CGAL_SwigPyIterator"""
100 return _IMP_cgal.IMP_CGAL_SwigPyIterator_advance(self, n)
103 r"""__eq__(IMP_CGAL_SwigPyIterator self, IMP_CGAL_SwigPyIterator x) -> bool"""
104 return _IMP_cgal.IMP_CGAL_SwigPyIterator___eq__(self, x)
107 r"""__ne__(IMP_CGAL_SwigPyIterator self, IMP_CGAL_SwigPyIterator x) -> bool"""
108 return _IMP_cgal.IMP_CGAL_SwigPyIterator___ne__(self, x)
110 def __iadd__(self, n):
111 r"""__iadd__(IMP_CGAL_SwigPyIterator self, ptrdiff_t n) -> IMP_CGAL_SwigPyIterator"""
112 return _IMP_cgal.IMP_CGAL_SwigPyIterator___iadd__(self, n)
114 def __isub__(self, n):
115 r"""__isub__(IMP_CGAL_SwigPyIterator self, ptrdiff_t n) -> IMP_CGAL_SwigPyIterator"""
116 return _IMP_cgal.IMP_CGAL_SwigPyIterator___isub__(self, n)
118 def __add__(self, n):
119 r"""__add__(IMP_CGAL_SwigPyIterator self, ptrdiff_t n) -> IMP_CGAL_SwigPyIterator"""
120 return _IMP_cgal.IMP_CGAL_SwigPyIterator___add__(self, n)
122 def __sub__(self, *args):
124 __sub__(IMP_CGAL_SwigPyIterator self, ptrdiff_t n) -> IMP_CGAL_SwigPyIterator
125 __sub__(IMP_CGAL_SwigPyIterator self, IMP_CGAL_SwigPyIterator x) -> ptrdiff_t
127 return _IMP_cgal.IMP_CGAL_SwigPyIterator___sub__(self, *args)
132 _IMP_cgal.IMP_CGAL_SwigPyIterator_swigregister(IMP_CGAL_SwigPyIterator)
139 IMP_DEBUG = _IMP_cgal.IMP_DEBUG
141 IMP_RELEASE = _IMP_cgal.IMP_RELEASE
143 IMP_SILENT = _IMP_cgal.IMP_SILENT
145 IMP_PROGRESS = _IMP_cgal.IMP_PROGRESS
147 IMP_TERSE = _IMP_cgal.IMP_TERSE
149 IMP_VERBOSE = _IMP_cgal.IMP_VERBOSE
151 IMP_MEMORY = _IMP_cgal.IMP_MEMORY
153 IMP_NONE = _IMP_cgal.IMP_NONE
155 IMP_USAGE = _IMP_cgal.IMP_USAGE
157 IMP_INTERNAL = _IMP_cgal.IMP_INTERNAL
159 IMP_KERNEL_HAS_LOG4CXX = _IMP_cgal.IMP_KERNEL_HAS_LOG4CXX
161 IMP_COMPILER_HAS_CEREAL_RAW_POINTER = _IMP_cgal.IMP_COMPILER_HAS_CEREAL_RAW_POINTER
163 IMP_COMPILER_HAS_DEBUG_VECTOR = _IMP_cgal.IMP_COMPILER_HAS_DEBUG_VECTOR
165 IMP_COMPILER_HAS_RANDOM_SHUFFLE = _IMP_cgal.IMP_COMPILER_HAS_RANDOM_SHUFFLE
167 IMP_COMPILER_HAS_THREE_WAY = _IMP_cgal.IMP_COMPILER_HAS_THREE_WAY
169 IMP_KERNEL_HAS_BOOST_RANDOM = _IMP_cgal.IMP_KERNEL_HAS_BOOST_RANDOM
171 IMP_KERNEL_HAS_NUMPY = _IMP_cgal.IMP_KERNEL_HAS_NUMPY
173 IMP_KERNEL_HAS_BOOST_SYSTEM = _IMP_cgal.IMP_KERNEL_HAS_BOOST_SYSTEM
175 IMP_KERNEL_HAS_GPERFTOOLS = _IMP_cgal.IMP_KERNEL_HAS_GPERFTOOLS
177 IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER = _IMP_cgal.IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER
179 IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER = _IMP_cgal.IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER
181 IMPKERNEL_SHOW_WARNINGS = _IMP_cgal.IMPKERNEL_SHOW_WARNINGS
185 class _DirectorObjects:
186 """@internal Simple class to keep references to director objects
187 to prevent premature deletion."""
190 def register(self, obj):
191 """Take a reference to a director object; will only work for
192 refcounted C++ classes"""
193 if hasattr(obj,
'get_ref_count'):
194 self._objects.append(obj)
196 """Only drop our reference and allow cleanup by Python if no other
197 Python references exist (we hold 3 references: one in self._objects,
198 one in x, and one in the argument list for getrefcount) *and* no
199 other C++ references exist (the Python object always holds one)"""
200 objs = [x
for x
in self._objects
if sys.getrefcount(x) > 3 \
201 or x.get_ref_count() > 1]
205 def get_object_count(self):
206 """Get number of director objects (useful for testing only)"""
207 return len(self._objects)
208 _director_objects = _DirectorObjects()
210 class _ostream(object):
211 r"""Proxy of C++ std::ostream class."""
213 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
215 def __init__(self, *args, **kwargs):
216 raise AttributeError(
"No constructor defined")
217 __repr__ = _swig_repr
219 def write(self, osa_buf):
220 r"""write(_ostream self, char const * osa_buf)"""
221 return _IMP_cgal._ostream_write(self, osa_buf)
224 _IMP_cgal._ostream_swigregister(_ostream)
225 IMP_C_OPEN_BINARY = _IMP_cgal.IMP_C_OPEN_BINARY
228 IMP_CGAL_HAS_BOOST_FILESYSTEM = _IMP_cgal.IMP_CGAL_HAS_BOOST_FILESYSTEM
230 IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS = _IMP_cgal.IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS
232 IMP_CGAL_HAS_BOOST_RANDOM = _IMP_cgal.IMP_CGAL_HAS_BOOST_RANDOM
234 IMP_CGAL_HAS_NUMPY = _IMP_cgal.IMP_CGAL_HAS_NUMPY
236 IMPCGAL_SHOW_WARNINGS = _IMP_cgal.IMPCGAL_SHOW_WARNINGS
239 def get_module_name():
240 r"""get_module_name() -> std::string const"""
241 return _IMP_cgal.get_module_name()
244 r"""get_module_version() -> std::string const"""
245 return _IMP_cgal.get_module_version()
248 r"""get_example_path(std::string fname) -> std::string"""
249 return _IMP_cgal.get_example_path(fname)
252 r"""get_data_path(std::string fname) -> std::string"""
253 return _IMP_cgal.get_data_path(fname)
255 from .
import _version_check
std::string get_data_path(std::string file_name)
Return the full path to one of this module's data files.
std::string get_module_version()
Return the version of this module, as a string.
std::string get_example_path(std::string file_name)
Return the full path to one of this module's example files.