qosd: сдавленные наброски по абстрактному дереву
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
#include "links/BaseLink.h"
|
||||
#include <stdexcept>
|
||||
|
||||
/// \brief Связь для листового узла, не допускающая дочерних элементов.
|
||||
class LeafLink : public BaseLink {
|
||||
public:
|
||||
using BaseLink::BaseLink;
|
||||
void addChild(const NodePtr&) override {
|
||||
throw std::logic_error("LeafLink cannot have children");
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user