Files
Upsilon/apps/tree/layout_reference.cpp
2018-07-02 15:48:50 +02:00

24 lines
715 B
C++

#include "layout_reference.h"
#include "layout_cursor.h"
#include "allocation_failed_layout_node.h"
#include "layout_node.h"
#include "char_layout_node.h"
template<>
TreeNode * LayoutRef::FailedAllocationStaticNode() {
static AllocationFailedLayoutNode FailureNode;
if (FailureNode.identifier() >= -1) {
int newIdentifier = TreePool::sharedPool()->registerStaticNode(&FailureNode);
FailureNode.rename(newIdentifier);
}
return &FailureNode;
}
template <typename T>
LayoutCursor LayoutReference<T>::cursor() const {
return LayoutCursor(this->typedNode());
}
template LayoutCursor LayoutReference<LayoutNode>::cursor() const;
template LayoutCursor LayoutReference<CharLayoutNode>::cursor() const;