42 class PathTreeObserverConcrete :
public PathTreeObserver {
44 PathTreeObserverConcrete() =
default;
53 template <
typename T,
typename F>
55 using weak_ptr_type =
typename T::value_type;
58 auto fullPtr = ptr.lock();
65 c.erase(newEnd, end(c));
69 auto ret = PathTreeObserverPtr{make_shared<PathTreeObserverConcrete>()};
70 m_observers.push_back(ret);
77 observer.notifyEvent(PathTreeEvents::AboutToUpdate, m_tree);
88 observer.notifyEvent(PathTreeEvents::AfterUpdate, m_tree);
void replaceTree(Json::Value const &nodes)
Replace the entirety of the path tree from the given serialized array of nodes.
void jsonToPathTree(PathTree &tree, Json::Value nodes)
Deserialize a path tree from a JSON array of objects.
PathTreeObserverPtr makeObserver()
Make an observer object that can hold callbacks for tree updates. Callbacks are called in the order t...
void reset()
Reset the path tree to a new, empty root node.
void for_each_cleanup_pointers(T &c, F &&f)
void remove_if(GeneralizedTransform &transform, UnaryPredicate pred)
Remove levels from a generalized transform as dictated by an arbitrary predicate. ...