MeshLib Documentation
Loading...
Searching...
No Matches
MR::ObjectChildrenHolder Class Reference

#include <MRObject.h>

+ Inheritance diagram for MR::ObjectChildrenHolder:

Public Member Functions

 ObjectChildrenHolder ()=default
 
 ObjectChildrenHolder (const ObjectChildrenHolder &) noexcept
 
ObjectChildrenHolderoperator= (const ObjectChildrenHolder &) noexcept
 
MRMESH_API ObjectChildrenHolder (ObjectChildrenHolder &&) noexcept
 
MRMESH_API ObjectChildrenHolderoperator= (ObjectChildrenHolder &&) noexcept
 
MRMESH_API ~ObjectChildrenHolder ()
 
MRMESH_API std::shared_ptr< ObjectgetSharedPtr () const
 
MRMESH_API size_t heapBytes () const
 

Protected Attributes

ObjectChildrenHolderparent_ = nullptr
 
std::vector< std::shared_ptr< Object > > children_
 
std::vector< std::weak_ptr< Object > > bastards_
 recognized ones
 

Detailed Description

the main purpose of this class is to avoid copy and move constructor and assignment operator implementation in Object class, which has too many fields for that; since every object stores a pointer on its parent, copying of this object does not copy the children and moving is taken with care

Constructor & Destructor Documentation

◆ ObjectChildrenHolder() [1/3]

MR::ObjectChildrenHolder::ObjectChildrenHolder ( )
default

◆ ObjectChildrenHolder() [2/3]

MR::ObjectChildrenHolder::ObjectChildrenHolder ( const ObjectChildrenHolder & )
inlinenoexcept

◆ ObjectChildrenHolder() [3/3]

MRMESH_API MR::ObjectChildrenHolder::ObjectChildrenHolder ( ObjectChildrenHolder && )
noexcept

◆ ~ObjectChildrenHolder()

MRMESH_API MR::ObjectChildrenHolder::~ObjectChildrenHolder ( )

Member Function Documentation

◆ getSharedPtr()

MRMESH_API std::shared_ptr< Object > MR::ObjectChildrenHolder::getSharedPtr ( ) const
nodiscard

◆ heapBytes()

MRMESH_API size_t MR::ObjectChildrenHolder::heapBytes ( ) const
nodiscard

returns the amount of memory this object occupies on heap, including the memory of all recognized children

◆ operator=() [1/2]

ObjectChildrenHolder & MR::ObjectChildrenHolder::operator= ( const ObjectChildrenHolder & )
inlinenoexcept

◆ operator=() [2/2]

MRMESH_API ObjectChildrenHolder & MR::ObjectChildrenHolder::operator= ( ObjectChildrenHolder && )
noexcept

Member Data Documentation

◆ bastards_

std::vector< std::weak_ptr< Object > > MR::ObjectChildrenHolder::bastards_
protected

recognized ones

◆ children_

std::vector< std::shared_ptr< Object > > MR::ObjectChildrenHolder::children_
protected

◆ parent_

ObjectChildrenHolder* MR::ObjectChildrenHolder::parent_ = nullptr
protected

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