Rhino C++ API  8.13
Public Member Functions | Static Public Attributes | List of all members
CRhinoInstanceObjectIterator Class Reference

CRhinoInstanceObjectIterator is used to iterate all instance definition geometry referenced by a CRhinoInstanceObject. Any nested instance definition geometry that is referenced multiple times is returned only once. It safely iterates nested instance definitions in a way that protects against infinite looping when damaged models contain circular nested references. It iterates in a way so that it will not crash if the document is modified or deleted between calls to NextObject(). More...

#include <rhinoSdkInstance.h>

Public Member Functions

 CRhinoInstanceObjectIterator ()=default
 
 CRhinoInstanceObjectIterator (const CRhinoInstanceObject *iref)
 Create an iteratator to iterate the objects referenced by iref. More...
 
 CRhinoInstanceObjectIterator (const CRhinoInstanceObjectIterator &)=default
 
 ~CRhinoInstanceObjectIterator ()=default
 
const CRhinoInstanceDefinitionCurrentInstanceDefinition () const
 The current instance definition being iteratated. More...
 
unsigned CurrentInstanceDefinitionSerialNumber () const
 The instance definition serial number of the current instance definition being iteratated. More...
 
const CRhinoObjectCurrentObject () const
 The CRhinoObject most recently returned by this iterator. More...
 
unsigned CurrentObjectSerialNumber () const
 The CRhinoObject runtime serial number of CRhinoObject most recently returned by this iterator. More...
 
const CRhinoDocDocument () const
 The CRhinoDoc containing the instance reference being iterated. More...
 
unsigned DocumentRuntimeSerialNumber () const
 The serial number of the CRhinoDoc containing the instance reference being iterated. More...
 
const CRhinoObjectFirstObject (bool bSkipInstanceObjects)
 The first object in the set of referenced objects. This object is always an instance definition object. When bSkipInstanceObjects = true (generally what you want) nested instance reference objects are not returned (the objects they reference will be returned). Any instance definition geometry that is referenced multiple times is returned only once. More...
 
bool Initialize (const CRhinoInstanceObject *iref)
 Initialize this to iterate the objects referenced by iref. More...
 
const CRhinoInstanceObjectInstanceObject () const
 The instance reference being iterated. More...
 
unsigned InstanceObjectSerialNumber () const
 CRhinoObject runtime serial number of the instance reference being iterated. More...
 
const CRhinoObjectNextObject (bool bSkipInstanceObjects)
 The next object in the set of referenced objects. This object is always an instance definition object. When bSkipInstanceObjects = true (generally what you want) nested instance reference objects are not returned (the objects they reference will be returned). Any instance definition geometry that is referenced multiple times is returned only once. More...
 
CRhinoInstanceObjectIteratoroperator= (const CRhinoInstanceObjectIterator &)=default
 

Static Public Attributes

static const CRhinoInstanceObjectIterator Empty
 Empty iterator. More...
 

Detailed Description

CRhinoInstanceObjectIterator is used to iterate all instance definition geometry referenced by a CRhinoInstanceObject. Any nested instance definition geometry that is referenced multiple times is returned only once. It safely iterates nested instance definitions in a way that protects against infinite looping when damaged models contain circular nested references. It iterates in a way so that it will not crash if the document is modified or deleted between calls to NextObject().

Constructor & Destructor Documentation

◆ CRhinoInstanceObjectIterator() [1/3]

CRhinoInstanceObjectIterator::CRhinoInstanceObjectIterator ( )
default

◆ ~CRhinoInstanceObjectIterator()

CRhinoInstanceObjectIterator::~CRhinoInstanceObjectIterator ( )
default

◆ CRhinoInstanceObjectIterator() [2/3]

CRhinoInstanceObjectIterator::CRhinoInstanceObjectIterator ( const CRhinoInstanceObjectIterator )
default

◆ CRhinoInstanceObjectIterator() [3/3]

CRhinoInstanceObjectIterator::CRhinoInstanceObjectIterator ( const CRhinoInstanceObject iref)

Create an iteratator to iterate the objects referenced by iref.

Returns

Member Function Documentation

◆ CurrentInstanceDefinition()

const CRhinoInstanceDefinition* CRhinoInstanceObjectIterator::CurrentInstanceDefinition ( ) const

The current instance definition being iteratated.

◆ CurrentInstanceDefinitionSerialNumber()

unsigned CRhinoInstanceObjectIterator::CurrentInstanceDefinitionSerialNumber ( ) const

The instance definition serial number of the current instance definition being iteratated.

◆ CurrentObject()

const CRhinoObject* CRhinoInstanceObjectIterator::CurrentObject ( ) const

The CRhinoObject most recently returned by this iterator.

◆ CurrentObjectSerialNumber()

unsigned CRhinoInstanceObjectIterator::CurrentObjectSerialNumber ( ) const

The CRhinoObject runtime serial number of CRhinoObject most recently returned by this iterator.

◆ Document()

const CRhinoDoc* CRhinoInstanceObjectIterator::Document ( ) const

The CRhinoDoc containing the instance reference being iterated.

◆ DocumentRuntimeSerialNumber()

unsigned CRhinoInstanceObjectIterator::DocumentRuntimeSerialNumber ( ) const

The serial number of the CRhinoDoc containing the instance reference being iterated.

◆ FirstObject()

const CRhinoObject* CRhinoInstanceObjectIterator::FirstObject ( bool  bSkipInstanceObjects)

The first object in the set of referenced objects. This object is always an instance definition object. When bSkipInstanceObjects = true (generally what you want) nested instance reference objects are not returned (the objects they reference will be returned). Any instance definition geometry that is referenced multiple times is returned only once.

◆ Initialize()

bool CRhinoInstanceObjectIterator::Initialize ( const CRhinoInstanceObject iref)

Initialize this to iterate the objects referenced by iref.

◆ InstanceObject()

const CRhinoInstanceObject* CRhinoInstanceObjectIterator::InstanceObject ( ) const

The instance reference being iterated.

◆ InstanceObjectSerialNumber()

unsigned CRhinoInstanceObjectIterator::InstanceObjectSerialNumber ( ) const

CRhinoObject runtime serial number of the instance reference being iterated.

◆ NextObject()

const CRhinoObject* CRhinoInstanceObjectIterator::NextObject ( bool  bSkipInstanceObjects)

The next object in the set of referenced objects. This object is always an instance definition object. When bSkipInstanceObjects = true (generally what you want) nested instance reference objects are not returned (the objects they reference will be returned). Any instance definition geometry that is referenced multiple times is returned only once.

◆ operator=()

CRhinoInstanceObjectIterator& CRhinoInstanceObjectIterator::operator= ( const CRhinoInstanceObjectIterator )
default

Member Data Documentation

◆ Empty

const CRhinoInstanceObjectIterator CRhinoInstanceObjectIterator::Empty
static

Empty iterator.