Snap! Websites
An Open Source CMS System in C++
#include <node.h>
This constructor is used to lock a node within a scope.
Note that the unlock() function can be used to prematuraly unlock a node. It is very important to use the unlock() function of the NodeLock() otherwise it will attempt to unlock the node again when it gets out of scope (although that bug will be caught).
The function accepts a null pointer as parameter. This is useful in many situation where we do not know whether the node is null and it would make it complicated to have to check.
Definition at line 247 of file node_lock.cpp.
References f_node.
This function can be used to unlock a node before the end of a scope is reached. There are cases where that may be necessary.
Note that this function is also called by the destructor. To avoid a double unlock on a node, the function sets the node pointer to null before returning. This means this function can safely be called any number of times and the lock counter of the node will remain valid.
Definition at line 293 of file node_lock.cpp.
References f_node.
Referenced by as2js::Compiler::define_function_type(), as2js::Compiler::resolve_call(), as2js::Compiler::variable(), and ~NodeLock().
Definition at line 651 of file node.h.
Referenced by NodeLock(), and unlock().
This document is part of the Snap! Websites Project.
Copyright by Made to Order Software Corp.
Snap! Websites
An Open Source CMS System in C++