|
CX Framework
Cross-platform C utility framework
|
Macros | |
| #define | ssdGraft(dest, destpath, src, srcpath) _ssdGraft(dest, destpath, (SSDLockState*)_ssdCurrentLockState, src, srcpath, NULL) |
Advanced tree manipulation functions like grafting subtrees.
| #define ssdGraft | ( | dest, | |
| destpath, | |||
| src, | |||
| srcpath | |||
| ) | _ssdGraft(dest, destpath, (SSDLockState*)_ssdCurrentLockState, src, srcpath, NULL) |
bool ssdGraft(SSDNode *dest, strref destpath, SSDNode *src, strref srcpath)
Grafts a subtree from the source tree onto the destination tree.
This performs a deep copy of the source subtree and attaches it to the destination at the specified path. If the destination tree uses custom node classes, those will be used for the copied nodes.
IMPORTANT: If used within a locked transaction, it must be for the DESTINATION tree. The source tree is automatically locked in read-only mode with a transient lock and must NOT already be locked by the caller.
| dest | The destination tree root |
| destpath | Path in destination where to attach the subtree |
| src | The source tree root |
| srcpath | Path in source to the subtree to copy |
Example: