Changeset 105


Ignore:
Timestamp:
06/05/13 13:26:45 (12 years ago)
Author:
epyon
Message:
  • root object has virtual functions child_added, child_removed, called on add or remove
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/nv/root.hh

    r64 r105  
    1919        {
    2020        public:
     21                virtual void child_added( object* ) {}
     22                virtual void child_removed( object* ) {}
    2123                type_database* get_type_database() const { return m_type_database; }
    2224                lua::state*    get_lua_state()     const { return m_lua_state; }
  • trunk/src/object.cc

    r78 r105  
    5151                m_children.push_back( child );
    5252                m_child_count++;
     53                m_root->child_added( child );
    5354        }
    5455}
     
    6566                (*it)->m_parent = nullptr;
    6667                m_children.erase(it);
     68                m_root->child_removed( child );
    6769        }       
    6870}
Note: See TracChangeset for help on using the changeset viewer.