* Implemented Python's iterator protocol in Interface0DIterator and

orientedViewEdgeIterator.

* Simplified Python-related error handling in C++ class definitions.
The definitions of the following C++ methods were simplified and most
code segments using the C/Python API were moved to Director.cpp.

  ChainingIterator::init()
  ChainingIterator::traverse()
  UnaryPredicate0D::operator()()
  UnaryPredicate1D::operator()()
  BinaryPredicate0D::operator()()
  BinaryPredicate1D::operator()()
  UnaryFunction0D::operator()()
  UnaryFunction1D::operator()()
  StrokeShader.shade()

* Moved part of the introspection-based automatic type conversion code
from BPy_Interface0DIterator.cpp and Director.cpp to BPy_Convert.cpp
for the sake of better code organization.

* Fixed an uninitialized member in StrokeVertexIterator___init__().
This commit is contained in:
Tamito Kajiyama
2009-07-31 22:13:48 +00:00
parent 6134a41270
commit ba9943e4a7
22 changed files with 228 additions and 212 deletions

View File

@@ -345,12 +345,12 @@ PyObject * ViewEdge_setQI( BPy_ViewEdge *self, PyObject *args ) {
PyObject * ViewEdge_verticesBegin( BPy_ViewEdge *self ) {
Interface0DIterator if0D_it( self->ve->verticesBegin() );
return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it );
return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it, 0 );
}
PyObject * ViewEdge_verticesEnd( BPy_ViewEdge *self ) {
Interface0DIterator if0D_it( self->ve->verticesEnd() );
return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it );
return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it, 1 );
}
@@ -361,7 +361,7 @@ PyObject * ViewEdge_pointsBegin( BPy_ViewEdge *self, PyObject *args ) {
return NULL;
Interface0DIterator if0D_it( self->ve->pointsBegin(f) );
return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it );
return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it, 0 );
}
PyObject * ViewEdge_pointsEnd( BPy_ViewEdge *self, PyObject *args ) {
@@ -371,7 +371,7 @@ PyObject * ViewEdge_pointsEnd( BPy_ViewEdge *self, PyObject *args ) {
return NULL;
Interface0DIterator if0D_it( self->ve->pointsEnd(f) );
return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it );
return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it, 1 );
}
PyObject * ViewEdge_qi( BPy_ViewEdge *self ) {