Last change
on this file since 269 was
266,
checked in by epyon, 11 years ago
|
- decoupling - uid_store independent of nv::object
- decoupling - nv::object no longer linked with lua in any way
- decoupling - gui::element related object methods moved to element
- uid_store can operate on void* or specialized base class
- root class no longer carries uid store nor lua state (will be removed later)
|
File size:
513 bytes
|
Rev | Line | |
---|
[256] | 1 | // Copyright (C) 2012-2014 ChaosForge Ltd
|
---|
| 2 | // http://chaosforge.org/
|
---|
| 3 | //
|
---|
| 4 | // This file is part of NV Libraries.
|
---|
| 5 | // For conditions of distribution and use, see copyright notice in nv.hh
|
---|
| 6 |
|
---|
| 7 | #include "nv/root.hh"
|
---|
| 8 |
|
---|
| 9 | #include "nv/uid.hh"
|
---|
| 10 | #include "nv/lua/lua_state.hh"
|
---|
| 11 |
|
---|
[257] | 12 | void nv::root::destroy_object( object* o )
|
---|
[256] | 13 | {
|
---|
[257] | 14 | destroy_children( o );
|
---|
| 15 | o->detach();
|
---|
[264] | 16 | delete o;
|
---|
[256] | 17 | }
|
---|
[257] | 18 |
|
---|
| 19 | void nv::root::destroy_children( object* o )
|
---|
| 20 | {
|
---|
| 21 | while ( !o->m_children.empty() )
|
---|
| 22 | {
|
---|
| 23 | destroy_object( o->m_children.front() );
|
---|
| 24 | }
|
---|
| 25 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.