Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
DebugIOFlat Class Reference

#include <internal_io.h>

Inherits DebugIOInterface.

Public Member Functions

 DebugIOFlat (void)
 
virtual ~DebugIOFlat ()
 
virtual int Read (char *buf, int maxchar)
 Retrieves up to the given number of characters from a command input source.
 
virtual void Write (StringType type, const char *src, const char *str)
 Write out some characters differentiated by the log string type.
 
virtual void EmergencyFlush (void)
 Emergency shutdown function.
 
virtual void Execute (class Debug &dbg, const char *cmd, bool structuredCmd, unsigned argn, const char *const *argv)
 I/O class specific command.
 
virtual void Delete (void)
 Destroys the current I/O class instance.
 
- Public Member Functions inherited from DebugIOInterface
 DebugIOInterface (void)
 

Static Public Member Functions

static DebugIOInterfaceCreate (void)
 

Additional Inherited Members

- Public Types inherited from DebugIOInterface
enum  StringType {
  Assert = 0 , Check , Log , Crash ,
  Exception , CmdReply , StructuredCmdReply , Other ,
  MAX
}
 List of possible log string types. More...
 
- Protected Member Functions inherited from DebugIOInterface
virtual ~DebugIOInterface ()
 I/O class destructor.
 

Detailed Description

Definition at line 74 of file internal_io.h.

Constructor & Destructor Documentation

◆ DebugIOFlat()

DebugIOFlat::DebugIOFlat ( void )
explicit

Definition at line 281 of file debug_io_flat.cpp.

◆ ~DebugIOFlat()

DebugIOFlat::~DebugIOFlat ( )
virtual

Definition at line 288 of file debug_io_flat.cpp.

Member Function Documentation

◆ Create()

DebugIOInterface * DebugIOFlat::Create ( void )
static

Definition at line 537 of file debug_io_flat.cpp.

◆ Delete()

void DebugIOFlat::Delete ( void )
virtual

Destroys the current I/O class instance.

Use this function instead of just delete'ing the instance.

Implements DebugIOInterface.

Definition at line 542 of file debug_io_flat.cpp.

◆ EmergencyFlush()

void DebugIOFlat::EmergencyFlush ( void )
virtual

Emergency shutdown function.

This function gets called during an exception and should perform the absolute bare minimum (e.g. just flushing and closing the output file).

Implements DebugIOInterface.

Definition at line 322 of file debug_io_flat.cpp.

◆ Execute()

void DebugIOFlat::Execute ( class Debug & dbg,
const char * cmd,
bool structuredCmd,
unsigned argn,
const char *const * argv )
virtual

I/O class specific command.

All io <class> commands are passed into this function, with the exception of remove which results in simply calling the class destructor.

Parameters
dbgdebug instance
cmdcommand issued
structuredCmdtrue if structured command reply, false if not
argnnumber of additional arguments passed in
argvargument list

Implements DebugIOInterface.

Definition at line 328 of file debug_io_flat.cpp.

◆ Read()

virtual int DebugIOFlat::Read ( char * buf,
int maxchar )
inlinevirtual

Retrieves up to the given number of characters from a command input source.

This source can be e.g. keyboard or a network pipe. This function must not block.

Parameters
bufbuffer to place read characters in
maxcharmaximum number of characters to return
Returns
numbers of characters written to buffer
Note
There is no terminating NUL char written to the buffer

Implements DebugIOInterface.

Definition at line 215 of file internal_io.h.

◆ Write()

void DebugIOFlat::Write ( StringType type,
const char * src,
const char * str )
virtual

Write out some characters differentiated by the log string type.

Parameters
typepossible string type
srcstring source, may be NULL, content depends on type:
typesrc
Assertfile(line)
Checkfile(line)
Loglog group
Crashfile(line)
ExceptionNULL
CmdReplygroup.command
StructuredCmdReplygroup.command
OtherNULL
strstring to output, NUL delimited, if NULL then simply flush output (if applicable)

Implements DebugIOInterface.

Definition at line 307 of file debug_io_flat.cpp.


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