iv::ToText_TableDebugView Class Reference

#include <ToText_TableDebugView.hpp>

Public Member Functions

 ToText_TableDebugView (Context *context)
 
void Write_AsTables (TextDebugView *out)
 
void Write_AsLines (TextDebugView *out, bool print_table_names)
 
- Public Member Functions inherited from iv::TableDebugView
 TableDebugView (Context *context)
 
table_debug_context::TableHandle Table (TableId table_id)
 
bool IsEmpty () const
 
void Clear ()
 Removes all tables. More...
 
const std::unordered_map< TableId, TableData > & Tables () const
 
std::unordered_map< TableId, TableData > & Tables ()
 
- Public Member Functions inherited from iv::DebugView
 DebugView (Context *context)
 
Contextcontext () const
 

Additional Inherited Members

- Public Types inherited from iv::TableDebugView
using TableData = table_debug_context::TableData
 

Detailed Description

TableDebugView implementation that transforms input given on TableDebugView interface is transformed and sent into given TextDebugView instance. Expected usage: Instantiate an implementation of TextDebugView, instantiate ToText_TableDebugView, let game classes print into TableDebugView interface of ToText_TableDebugView, flush ToText_TableDebugView, causing it to write gathered data into our TextDebugView which then sends it into its text terminal.

Sample output: ┏━━╸data|Visual╺━━┯━━━━━━━━━━━━━━━━━┓ ┃ -position- │ -visual_id- ┃ ┣━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━┫ ┃ ( 1, 5 ) │ "trs|reactor" ┃ ┠─────────────────┼─────────────────┨ ┃ ( 3, 3 ) │ "trs|dfgg" ┃ ┃ ├╴note: origin │ ┃ ┃ └╴xyz: glem │ ┃ ┠─────────────────┼─────────────────┨ ┃ ( 8, 3 ) │ "trs|reactor" ┃ ┠─────────────────┼─────────────────┨ ┃ ( 2, 8 ) │ "trs|gauss_gun" ┃ ┠─────────────────┼─────────────────┨ ┃ ( 1, 4 ) │ "trs|dfsd" ┃ ┗━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┛

Definition at line 34 of file ToText_TableDebugView.hpp.

Constructor & Destructor Documentation

◆ ToText_TableDebugView()

iv::ToText_TableDebugView::ToText_TableDebugView ( Context context)

We keep weak pointer to the TextDebugView so it can be destroyed before us.

Definition at line 14 of file ToText_TableDebugView.cpp.

Member Function Documentation

◆ Write_AsTables()

void iv::ToText_TableDebugView::Write_AsTables ( TextDebugView out)

Prints gethered data into target TextDebugView (given in constructor).

Definition at line 100 of file ToText_TableDebugView.cpp.

◆ Write_AsLines()

void iv::ToText_TableDebugView::Write_AsLines ( TextDebugView out,
bool  print_table_names 
)

Definition at line 24 of file ToText_TableDebugView.cpp.


The documentation for this class was generated from the following files: