4 template<
class ChildT >
7 cm( inst, this,
"VectorChildrenElem" ),
9 children_dirty( true ),
10 heap( inst, &this->cm )
12 this->cm.inherits( this->Elem::cm );
15 template<
class ChildT >
18 for( ChildT * child : this->children )
24 child->elem()->input_treeRefresh();
25 child->elem()->input_deactivate();
26 child->elem()->input_setParent(
nullptr );
30 template<
class ChildT >
31 template<
class T,
class ... CArgs >
34 static_assert( std::is_base_of< ChildT, T >::value,
"Child must inherit ChildT." );
35 auto t = this->heap.template createClient< T >( cargs ... );
40 template<
class ChildT >
41 template<
class T,
class ... CArgs >
44 static_assert( std::is_base_of< ChildT, T >::value,
"Child must inherit ChildT." );
45 auto t = this->heap.template createInstance< T >( name, cargs ... );
50 template<
class ChildT >
54 this->children.push_back( child );
55 this->children_dirty =
true;
59 this->input_treeRefresh();
62 child->elem()->elem_setParent(
this );
65 template<
class ChildT >
68 ChildT * child = this->children[ i ];
72 child->elem()->input_deactivate();
73 child->elem()->input_treeRefresh();
76 child->elem()->elem_setParent(
nullptr );
79 this->children.erase( this->children.begin() + i );
80 this->children_dirty =
true;
83 template<
class ChildT >
86 this->input_childDisconnect( child->elem() );
89 template<
class ChildT >
92 for(
auto * child : this->children )
96 template<
class ChildT >
99 this->input_childDisconnect( child );
102 template<
class ChildT >
105 this->Elem::input_eachChild( f );
107 for(
auto it = this->children.rbegin(); it != this->children.rend(); ++it )
111 template<
class ChildT >
114 this->Elem::input_childDisconnect( child );
116 for(
size_t i = 0; i < this->children.size(); i++ )
117 if( this->children[ i ]->elem() == child )
119 this->_removeChild( i );