Lines Matching refs:node
94 class node; variable
104 const node* node = reinterpret_cast<const class node*>(ino); in Exists() local
106 return active_nodes_.find(node) != active_nodes_.end(); in Exists()
112 const node* node = reinterpret_cast<const class node*>(ino); in CheckTracked() local
114 CHECK(active_nodes_.find(node) != active_nodes_.end()); in CheckTracked()
118 void NodeDeleted(const node* node) { in NodeDeleted() argument
121 LOG(DEBUG) << "Node: " << reinterpret_cast<uintptr_t>(node) << " deleted."; in NodeDeleted()
123 CHECK(active_nodes_.find(node) != active_nodes_.end()); in NodeDeleted()
124 active_nodes_.erase(node); in NodeDeleted()
128 void NodeCreated(const node* node) { in NodeCreated() argument
131 LOG(DEBUG) << "Node: " << reinterpret_cast<uintptr_t>(node) << " created."; in NodeCreated()
133 CHECK(active_nodes_.find(node) == active_nodes_.end()); in NodeCreated()
134 active_nodes_.insert(node); in NodeCreated()
140 std::unordered_set<const node*> active_nodes_;
143 class node {
146 static node* Create(node* parent, const std::string& name, const std::string& io_path, in Create()
154 return new node(parent, name, io_path, transforms_complete, transforms, transforms_reason, in Create()
160 static node* CreateRoot(const std::string& path, std::recursive_mutex* lock, ino_t ino, in CreateRoot()
163 node* root = new node(nullptr, path, path, true /* transforms_complete */, in CreateRoot()
173 static inline node* FromInode(__u64 ino, const NodeTracker* tracker) { in FromInode()
175 return reinterpret_cast<node*>(static_cast<uintptr_t>(ino)); in FromInode()
179 static inline node* FromInodeNoThrow(__u64 ino, const NodeTracker* tracker) { in FromInodeNoThrow()
181 return reinterpret_cast<node*>(static_cast<uintptr_t>(ino)); in FromInodeNoThrow()
185 static __u64 ToInode(node* node) { in ToInode() argument
186 return static_cast<__u64>(reinterpret_cast<uintptr_t>(node)); in ToInode()
220 node* LookupChildByName(const std::string& name, bool acquire, const int transforms = 0) const {
221 return ForChild(name, [acquire, transforms](node* child) {
236 ForChild(name, [](node* child) { in SetDeletedForChild()
247 void RenameChild(const std::string& old_name, const std::string& new_name, node* new_parent) { in RenameChild()
248 ForChild(old_name, [=](node* child) { in RenameChild()
254 void Rename(const std::string& name, node* new_parent) { in Rename()
314 node* GetParent() const { in GetParent()
394 static void DeleteTree(node* tree);
398 static const node* LookupAbsolutePath(const node* root, const std::string& absolute_path);
401 static const node* LookupInode(const node* root, ino_t ino);
404 node(node* parent, const std::string& name, const std::string& io_path, in node() function
437 void AddToParent(node* parent) { in AddToParent()
469 node* ForChild(const std::string& name, const std::function<bool(node*)>& callback) const { in ForChild()
481 std::vector<node*> children(start, end); in ForChild()
483 for (node* child : children) { in ForChild()
507 bool operator()(const node* lhs, const node* rhs) const { in operator()
515 bool operator()(const node* lhs, const std::pair<std::string, uintptr_t>& rhs) const { in operator()
523 bool operator()(const std::pair<std::string, uintptr_t>& lhs, const node* rhs) const { in operator()
534 void BuildPathForNodeRecursive(bool safe, const node* node, std::stringstream* path) const;
556 std::set<node*, NodeCompare> children_;
558 node* parent_;
571 ~node() { in ~node()