1#ifndef ANCHORS_ANCHORBASE_H
2#define ANCHORS_ANCHORBASE_H
4#pragma comment(lib, "bcrypt.lib")
6#include <boost/uuid/uuid.hpp>
8#include <unordered_set>
21 using AnchorId = boost::uuids::uuid;
23 virtual ~AnchorBase(){};
25 virtual void compute(
int stabilizationNumber) = 0;
27 virtual AnchorId getId()
const = 0;
29 virtual int getHeight()
const = 0;
31 virtual int getRecomputeId()
const = 0;
33 virtual int getChangeId()
const = 0;
35 virtual void setChangeId(
int changeId) = 0;
37 virtual void markNecessary() = 0;
39 virtual void decrementNecessaryCount() = 0;
41 virtual bool isNecessary()
const = 0;
43 virtual bool isStale()
const = 0;
45 virtual std::unordered_set<std::shared_ptr<AnchorBase>> getDependants()
48 virtual std::vector<std::shared_ptr<AnchorBase>> getDependencies()
51 virtual void addDependant(
const std::shared_ptr<AnchorBase>& parent) = 0;
53 virtual void removeDependant(
const std::shared_ptr<AnchorBase>& parent) = 0;
Main library namespace.
Definition: anchor.h:32