TinyLib 0.1.1
Loading...
Searching...
No Matches
tl::Console Class Reference

#include <Console.h>

Public Types

enum  { Default = 0 , Dec = 1 , Hex = 2 }
 

Public Member Functions

 Console ()
 Opens up a new console window.
 
 ~Console ()
 Automatically closes the console when object is destroyed.
 
void create ()
 Recreate the console window.
 
void close ()
 Manually close the console window.
 
void print (String)
 Display a C-string in console.
 
void println (String)
 Display a C-string in console with a new line after.
 
void print (u32)
 Display a number in console.
 
void println (u32)
 Display a number in console with a newline after.
 
void clear ()
 Clear the console.
 
void set (u8)
 Set certain settings for the console.
 
bit isOpen ()
 Check if console is still open.
 

Detailed Description

Definition at line 8 of file Console.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
Default 
Dec 
Hex 

Definition at line 24 of file Console.h.

Constructor & Destructor Documentation

◆ Console()

tl::Console::Console ( )

Opens up a new console window.

Definition at line 7 of file Console.cpp.

◆ ~Console()

tl::Console::~Console ( )

Automatically closes the console when object is destroyed.

Definition at line 14 of file Console.cpp.

Member Function Documentation

◆ clear()

void tl::Console::clear ( )

Clear the console.

Definition at line 78 of file Console.cpp.

◆ close()

void tl::Console::close ( )

Manually close the console window.

Definition at line 29 of file Console.cpp.

◆ create()

void tl::Console::create ( )

Recreate the console window.

Definition at line 21 of file Console.cpp.

◆ isOpen()

bit tl::Console::isOpen ( )

Check if console is still open.

Returns
True if console is open.

Definition at line 107 of file Console.cpp.

◆ print() [1/2]

void tl::Console::print ( String text)

Display a C-string in console.

Parameters
textWhat text to display.

Definition at line 37 of file Console.cpp.

◆ print() [2/2]

void tl::Console::print ( u32 num)

Display a number in console.

Parameters
numWhat number to display.

Definition at line 57 of file Console.cpp.

◆ println() [1/2]

void tl::Console::println ( String text)

Display a C-string in console with a new line after.

Parameters
textWhat text to display.

Definition at line 49 of file Console.cpp.

◆ println() [2/2]

void tl::Console::println ( u32 num)

Display a number in console with a newline after.

Parameters
numWhat number to display.

Definition at line 70 of file Console.cpp.

◆ set()

void tl::Console::set ( u8 index)

Set certain settings for the console.

Parameters
indexConsole enum for setting.

Console has an enum with settings you can pass here to change some settings such as displaying numbers in decimal or hex format.

Definition at line 96 of file Console.cpp.


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