diff options
Diffstat (limited to 'src/Structure.cpp')
-rw-r--r-- | src/Structure.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Structure.cpp b/src/Structure.cpp index 872d396..cf7c611 100644 --- a/src/Structure.cpp +++ b/src/Structure.cpp @@ -70,5 +70,20 @@ std::vector<char> Structure::ToBin() return ret; } +void Structure::UpdateNodeParent(Node* node) +{ + //Unlink node first + if ( NULL != node->_parent ) + { + plist_type type = plist_get_node_type(node->_parent); + if (PLIST_ARRAY ==type || PLIST_DICT == type ) + { + Structure* s = static_cast<Structure*>(node->_parent); + s->Remove(node); + } + } + node->_parent = this; +} + }; |