Shellminator V3.0.1
Simple Terminal
Loading...
Searching...
No Matches
CommanderColorizer Class Reference

Simple colorizer for Commander-API like syntax. More...

#include <Shellminator-Commander-Interface.hpp>

Inheritance diagram for CommanderColorizer:
Collaboration diagram for CommanderColorizer:

Public Member Functions

 CommanderColorizer ()
 
void printChar (Stream *response, char c) override
 
void reset (Stream *response) override
 
- Public Member Functions inherited from DefaultColorizer
 DefaultColorizer ()
 
virtual void printChar (Stream *response, char c)
 
virtual void reset (Stream *response)
 

Protected Types

enum  colorizerState_t {
  DEFAULT_STATE = 0 , FIRST_DASH_STATE , SECOND_DASH_STATE , WAIT_FOR_WHITESPACE ,
  WAIT_TOKEN_END , WAIT_STRING_END , ENV_VAR_START
}
 

Protected Member Functions

void defaultStateFuncion (Stream *response, char c)
 
void firstDashStateFuncion (Stream *response, char c)
 
void secondDashStateFuncion (Stream *response, char c)
 
void waitForWhitespaceStateFuncion (Stream *response, char c)
 
void waitTokenEndStateFunction (Stream *response, char c)
 
void waitStringEndStateFunction (Stream *response, char c)
 
void envVarStartStateFunction (Stream *response, char c)
 
void printBackwardError (Stream *response)
 
- Protected Member Functions inherited from DefaultColorizer
bool isCharacter (char c)
 
bool isNumber (char c)
 

Protected Attributes

colorizerState_t stateBuffer [SHELLMINATOR_BUFF_LEN+1]
 
int bufferCntr = 0
 
colorizerState_t currentState = DEFAULT_STATE
 

Detailed Description

Simple colorizer for Commander-API like syntax.

Definition at line 99 of file Shellminator-Commander-Interface.hpp.

Member Enumeration Documentation

◆ colorizerState_t

Enumerator
DEFAULT_STATE 
FIRST_DASH_STATE 
SECOND_DASH_STATE 
WAIT_FOR_WHITESPACE 
WAIT_TOKEN_END 
WAIT_STRING_END 
ENV_VAR_START 

Definition at line 108 of file Shellminator-Commander-Interface.hpp.

Constructor & Destructor Documentation

◆ CommanderColorizer()

CommanderColorizer::CommanderColorizer ( )

Definition at line 161 of file Shellminator-Commander-Interface.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ defaultStateFuncion()

void CommanderColorizer::defaultStateFuncion ( Stream *  response,
char  c 
)
protected

Definition at line 224 of file Shellminator-Commander-Interface.cpp.

Here is the caller graph for this function:

◆ envVarStartStateFunction()

void CommanderColorizer::envVarStartStateFunction ( Stream *  response,
char  c 
)
protected

Definition at line 335 of file Shellminator-Commander-Interface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ firstDashStateFuncion()

void CommanderColorizer::firstDashStateFuncion ( Stream *  response,
char  c 
)
protected

Definition at line 264 of file Shellminator-Commander-Interface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ printBackwardError()

void CommanderColorizer::printBackwardError ( Stream *  response)
protected

Definition at line 355 of file Shellminator-Commander-Interface.cpp.

◆ printChar()

void CommanderColorizer::printChar ( Stream *  response,
char  c 
)
overridevirtual

Reimplemented from DefaultColorizer.

Definition at line 180 of file Shellminator-Commander-Interface.cpp.

Here is the call graph for this function:

◆ reset()

void CommanderColorizer::reset ( Stream *  response)
overridevirtual

Reimplemented from DefaultColorizer.

Definition at line 165 of file Shellminator-Commander-Interface.cpp.

Here is the caller graph for this function:

◆ secondDashStateFuncion()

void CommanderColorizer::secondDashStateFuncion ( Stream *  response,
char  c 
)
protected

Definition at line 284 of file Shellminator-Commander-Interface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ waitForWhitespaceStateFuncion()

void CommanderColorizer::waitForWhitespaceStateFuncion ( Stream *  response,
char  c 
)
protected

Definition at line 310 of file Shellminator-Commander-Interface.cpp.

Here is the caller graph for this function:

◆ waitStringEndStateFunction()

void CommanderColorizer::waitStringEndStateFunction ( Stream *  response,
char  c 
)
protected

Definition at line 323 of file Shellminator-Commander-Interface.cpp.

Here is the caller graph for this function:

◆ waitTokenEndStateFunction()

void CommanderColorizer::waitTokenEndStateFunction ( Stream *  response,
char  c 
)
protected

Definition at line 298 of file Shellminator-Commander-Interface.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ bufferCntr

int CommanderColorizer::bufferCntr = 0
protected

Definition at line 119 of file Shellminator-Commander-Interface.hpp.

◆ currentState

colorizerState_t CommanderColorizer::currentState = DEFAULT_STATE
protected

Definition at line 121 of file Shellminator-Commander-Interface.hpp.

◆ stateBuffer

colorizerState_t CommanderColorizer::stateBuffer[SHELLMINATOR_BUFF_LEN+1]
protected

Definition at line 118 of file Shellminator-Commander-Interface.hpp.