MeshLib C# Docs
Loading...
Searching...
No Matches

read-only access to the children of an Object, as returned by Object.constChildren() Object stores its children as std::shared_ptr<Object>, and a const Object cannot hand them out directly without either dropping constness or copying the whole vector. This class solves that: it is a lightweight non-owning view on the object's children, which produces std::shared_ptr<const Object> on the fly. Typical use: for ( const auto & child : obj.constChildren() ) processRecursively( *child ); It is also indexable, so a plain loop works too: for ( size_t i = 0; i < obj.constChildren().size(); ++i ) process( *obj.constChildren()[i] ); The view refers to the object's own storage, so use it as a temporary and do not store it: it is invalidated by anything that adds, removes or reorders the object's children, exactly like an iterator of the underlying vector. Generated from class MR.ConstChildren. This is the const half of the class. More...

Inheritance diagram for MR.Const_ConstChildren:

Classes

class  _Enumerator
class  _InOptConst_Iterator
 This is used for optional parameters of class Iterator with default arguments. This is only used const parameters. For non-const ones we have _InOptMut_Iterator. Usage:
class  _InOptMut_Iterator
 This is used for optional parameters of class Iterator with default arguments. This is only used mutable parameters. For const ones we have _InOptConst_Iterator. Usage:
struct  _Underlying
class  Const_Iterator
 dereferences to std::shared_ptr<const Object>, constructed on each dereference Generated from class MR.ConstChildren.Iterator. This is the const half of the class. More...
class  Iterator
 dereferences to std::shared_ptr<const Object>, constructed on each dereference Generated from class MR.ConstChildren.Iterator. This is the non-const half of the class. More...

Public Member Functions

virtual void Dispose ()
IEnumerator< MR.Std.SharedPtr_ConstMRObject > GetEnumerator ()
unsafe Const_ConstChildren (MR.Const_ConstChildren _other)
 Generated from constructor MR.ConstChildren.ConstChildren.
 Const_ConstChildren (ConstChildren _other)
 Generated from constructor MR.ConstChildren.ConstChildren.
unsafe Const_ConstChildren (MR.Std.Const_Vector_StdSharedPtrMRObject children)
 Generated from constructor MR.ConstChildren.ConstChildren.
unsafe MR.ConstChildren.Iterator begin ()
 Generated from method MR.ConstChildren.begin.
unsafe MR.ConstChildren.Iterator end ()
 Generated from method MR.ConstChildren.end.
unsafe bool empty ()
 Generated from method MR.ConstChildren.empty.
unsafe nuint size ()
 Generated from method MR.ConstChildren.size.

Protected Member Functions

virtual unsafe void Dispose (bool disposing)

Properties

unsafe MR.Std.SharedPtr_ConstMRObject this[nuint i] [get]
 Generated from method MR::ConstChildren::operator[].

Detailed Description

read-only access to the children of an Object, as returned by Object.constChildren() Object stores its children as std::shared_ptr<Object>, and a const Object cannot hand them out directly without either dropping constness or copying the whole vector. This class solves that: it is a lightweight non-owning view on the object's children, which produces std::shared_ptr<const Object> on the fly. Typical use: for ( const auto & child : obj.constChildren() ) processRecursively( *child ); It is also indexable, so a plain loop works too: for ( size_t i = 0; i < obj.constChildren().size(); ++i ) process( *obj.constChildren()[i] ); The view refers to the object's own storage, so use it as a temporary and do not store it: it is invalidated by anything that adds, removes or reorders the object's children, exactly like an iterator of the underlying vector. Generated from class MR.ConstChildren. This is the const half of the class.

Constructor & Destructor Documentation

◆ Const_ConstChildren() [1/3]

unsafe MR.Const_ConstChildren.Const_ConstChildren ( MR.Const_ConstChildren _other)
inline

Generated from constructor MR.ConstChildren.ConstChildren.

◆ Const_ConstChildren() [2/3]

MR.Const_ConstChildren.Const_ConstChildren ( ConstChildren _other)
inline

Generated from constructor MR.ConstChildren.ConstChildren.

◆ Const_ConstChildren() [3/3]

unsafe MR.Const_ConstChildren.Const_ConstChildren ( MR.Std.Const_Vector_StdSharedPtrMRObject children)
inline

Generated from constructor MR.ConstChildren.ConstChildren.

Member Function Documentation

◆ begin()

unsafe MR.ConstChildren.Iterator MR.Const_ConstChildren.begin ( )
inline

Generated from method MR.ConstChildren.begin.

◆ Dispose() [1/2]

virtual void MR.Const_ConstChildren.Dispose ( )
inlinevirtual

◆ Dispose() [2/2]

virtual unsafe void MR.Const_ConstChildren.Dispose ( bool disposing)
inlineprotectedvirtual

◆ empty()

unsafe bool MR.Const_ConstChildren.empty ( )
inline

Generated from method MR.ConstChildren.empty.

◆ end()

unsafe MR.ConstChildren.Iterator MR.Const_ConstChildren.end ( )
inline

Generated from method MR.ConstChildren.end.

◆ GetEnumerator()

IEnumerator< MR.Std.SharedPtr_ConstMRObject > MR.Const_ConstChildren.GetEnumerator ( )
inline

◆ size()

unsafe nuint MR.Const_ConstChildren.size ( )
inline

Generated from method MR.ConstChildren.size.

Property Documentation

◆ this[nuint i]

unsafe MR.Std.SharedPtr_ConstMRObject MR.Const_ConstChildren.this[nuint i]
get

Generated from method MR::ConstChildren::operator[].


The documentation for this class was generated from the following file: