qosd: добавил краевые узлы
Краевые узлы не могут иметь дочерние узлы. Отлично подходит для бесклассовых дисциплин. Например, вариации FIFO, Fair Queue, RED и т.д. Псевдо-бесклассовые по типу TBF, которые подключают в себя FIFO (или любую указанную пользователем дисциплину), всё ещё должны пользоваться SimpleNode.master
parent
df1a728f56
commit
79caaad58d
@ -0,0 +1,23 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "nodes/BaseNode.h"
|
||||||
|
#include "mixins/LazyLinkMixin.h"
|
||||||
|
#include "mixins/FabricMixin.h"
|
||||||
|
#include "links/LeafLink.h"
|
||||||
|
#include "Logger.h"
|
||||||
|
|
||||||
|
/// \brief Класс простого (листового) узла дерева.
|
||||||
|
/// Может содержать только одного дочернего ComplexNode.
|
||||||
|
class LeafNode : public BaseNode,
|
||||||
|
virtual public LazyLinkMixin<LeafLink<INode>>,
|
||||||
|
public FabricMixin<LeafNode> {
|
||||||
|
public:
|
||||||
|
~LeafNode() {
|
||||||
|
Logger::get("ConDes").dbg(std::string("--- Leaf destructor called for: ") + name_);
|
||||||
|
}
|
||||||
|
private:
|
||||||
|
friend class FabricMixin<LeafNode>;
|
||||||
|
LeafNode(std::string name) : BaseNode(std::move(name)) {
|
||||||
|
Logger::get("ConDes").dbg(std::string("--- Leaf constructor called for: ") + name_);
|
||||||
|
}
|
||||||
|
};
|
||||||
Loading…
Reference in New Issue