Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::RenderTree Struct Reference
Collaboration diagram for duckdb::RenderTree:

Public Member Functions

 RenderTree (idx_t width, idx_t height)
optional_ptr< RenderTreeNode > GetNode (idx_t x, idx_t y)
void SetNode (idx_t x, idx_t y, unique_ptr< RenderTreeNode > node)
bool HasNode (idx_t x, idx_t y)
void SanitizeKeyNames ()

Static Public Member Functions

static unique_ptr< RenderTree > CreateRenderTree (const LogicalOperator &op)
static unique_ptr< RenderTree > CreateRenderTree (const PhysicalOperator &op)
static unique_ptr< RenderTree > CreateRenderTree (const ProfilingNode &op)
static unique_ptr< RenderTree > CreateRenderTree (const Pipeline &op)

Public Attributes

unique_array< unique_ptr< RenderTreeNode > > nodes
idx_t width
idx_t height

Private Member Functions

idx_t GetPosition (idx_t x, idx_t y)

Constructor & Destructor Documentation

◆ RenderTree()

duckdb::RenderTree::RenderTree ( idx_t width,
idx_t height )
99639 : width(width_p), height(height_p) {
99640 nodes = make_uniq_array<unique_ptr<RenderTreeNode>>((width + 1) * (height + 1));
99641}

Member Function Documentation

◆ CreateRenderTree() [1/4]

unique_ptr< RenderTree > duckdb::RenderTree::CreateRenderTree ( const LogicalOperator & op)
static
99665 {
99666 return CreateTree<LogicalOperator>(op);
99667}

◆ CreateRenderTree() [2/4]

unique_ptr< RenderTree > duckdb::RenderTree::CreateRenderTree ( const PhysicalOperator & op)
static
99669 {
99670 return CreateTree<PhysicalOperator>(op);
99671}

◆ CreateRenderTree() [3/4]

unique_ptr< RenderTree > duckdb::RenderTree::CreateRenderTree ( const ProfilingNode & op)
static
99673 {
99674 return CreateTree<ProfilingNode>(op);
99675}

◆ CreateRenderTree() [4/4]

unique_ptr< RenderTree > duckdb::RenderTree::CreateRenderTree ( const Pipeline & op)
static
99697 {
99698 auto operators = pipeline.GetOperators();
99699 D_ASSERT(!operators.empty());
99700 unique_ptr<PipelineRenderNode> node;
99701 for (auto &op : operators) {
99702 auto new_node = make_uniq<PipelineRenderNode>(op.get());
99703 new_node->child = std::move(node);
99704 node = std::move(new_node);
99705 }
99706 return CreateTree<PipelineRenderNode>(*node);
99707}

◆ GetNode()

optional_ptr< RenderTreeNode > duckdb::RenderTree::GetNode ( idx_t x,
idx_t y )
99643 {
99644 if (x >= width || y >= height) {
99645 return nullptr;
99646 }
99647 return nodes[GetPosition(x, y)].get();
99648}

◆ SetNode()

void duckdb::RenderTree::SetNode ( idx_t x,
idx_t y,
unique_ptr< RenderTreeNode > node )
99661 {
99662 nodes[GetPosition(x, y)] = std::move(node);
99663}

◆ HasNode()

bool duckdb::RenderTree::HasNode ( idx_t x,
idx_t y )
99650 {
99651 if (x >= width || y >= height) {
99652 return false;
99653 }
99654 return nodes[GetPosition(x, y)].get() != nullptr;
99655}

◆ SanitizeKeyNames()

void duckdb::RenderTree::SanitizeKeyNames ( )
99677 {
99678 for (idx_t i = 0; i < width * height; i++) {
99679 if (!nodes[i]) {
99680 continue;
99681 }
99682 InsertionOrderPreservingMap<string> new_map;
99683 for (auto &entry : nodes[i]->extra_text) {
99684 auto key = entry.first;
99685 if (StringUtil::StartsWith(key, "__")) {
99686 key = StringUtil::Replace(key, "__", "");
99687 key = StringUtil::Replace(key, "_", " ");
99688 key = StringUtil::Title(key);
99689 }
99690 auto &value = entry.second;
99691 new_map.insert(make_pair(key, value));
99692 }
99693 nodes[i]->extra_text = std::move(new_map);
99694 }
99695}
static DUCKDB_API bool StartsWith(string str, string prefix)
Returns true if the target string starts with the given prefix.
Definition duckdb.cpp:109377
static DUCKDB_API string Title(const string &str)
Convert a string to Title Case.
Definition duckdb.cpp:109637
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237

◆ GetPosition()

idx_t duckdb::RenderTree::GetPosition ( idx_t x,
idx_t y )
private
99657 {
99658 return y * width + x;
99659}

The documentation for this struct was generated from the following file: