Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
Console::Command Struct Reference

Console command metadata. More...

Public Member Functions

 Command (const char *name, Callback callback, void *context=NULL, Command *next=NULL)
 Construct a new command.
 
 Command (const char *name, CommandFlow *flow, Command *next=NULL)
 Construct a new command.
 

Public Attributes

const char * name
 command name
 
union { 
 
   struct { 
 
      Callback   callback 
 callback function for command More...
 
      void *   context 
 context pointer to pass into callback More...
 
   }  
 
   CommandFlow *   flow 
 state flow for interactive commands More...
 
};  
 
bool interactive
 true if command is interactive
 
Commandnext
 next Command in list
 

Detailed Description

Console command metadata.

Definition at line 271 of file Console.hxx.

Constructor & Destructor Documentation

◆ Command() [1/2]

Console::Command::Command ( const char *  name,
Callback  callback,
void *  context = NULL,
Command next = NULL 
)
inline

Construct a new command.

Parameters
namecommand name
callbackcallback function for command
contextcontext pointer to pass into callback
nextnext command in list

Definition at line 279 of file Console.hxx.

◆ Command() [2/2]

Console::Command::Command ( const char *  name,
CommandFlow flow,
Command next = NULL 
)
inline

Construct a new command.

Parameters
namecommand name
flow??
nextnext command in list

Definition at line 293 of file Console.hxx.

Member Data Documentation

◆ callback

Callback Console::Command::callback

callback function for command

Definition at line 306 of file Console.hxx.

◆ context

void* Console::Command::context

context pointer to pass into callback

Definition at line 307 of file Console.hxx.

◆ flow

CommandFlow* Console::Command::flow

state flow for interactive commands

Definition at line 309 of file Console.hxx.

◆ interactive

bool Console::Command::interactive

true if command is interactive

Definition at line 311 of file Console.hxx.

◆ name

const char* Console::Command::name

command name

Definition at line 301 of file Console.hxx.

◆ next

Command* Console::Command::next

next Command in list

Definition at line 312 of file Console.hxx.


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