Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

Jdb_core Class Reference

The core of the modularized Jdb. More...

#include <jdb_core.h>

Inheritance diagram for Jdb_core:

Jdb List of all members.

Static Public Member Functions

static Cmd has_cmd (char const *cmd)
 Get the command structure accoring to the given name.
static int exec_cmd (Cmd const cmd, int push_next_char=-1)
 Execute the command according to cmd.
static int getchar (void)
 Overwritten getchar() to be able to handle next_char.
static int new_line (unsigned &line)
 Call this function every time a `
' is written to the console and it stops output when the screen is full.
static void prompt_start ()
static void prompt_end ()
static void prompt ()
static void update_prompt ()
static int set_prompt_color (char v)

Static Public Attributes

static char esc_prompt [] = "\033[32m"

Static Private Attributes

static bool short_mode = true
static int next_char = -1

Classes

struct  Cmd
 The command structure for Jdb_core. More...

Detailed Description

The core of the modularized Jdb.

See also:
Jdb_module

Jdb_category

This class provides the core functions for handling Jdb_modules and providing them with the right input.


Member Function Documentation

int Jdb_core::exec_cmd Cmd const   cmd,
int  push_next_char = -1
[static]
 

Execute the command according to cmd.

Parameters:
cmd the command structure (see Jdb_core::Cmd), which describes the command to execute.
Returns:
0 if Jdb_module::action() returned LEAVE 1 if Jdb_module::action() returned NOTHING 2 if Jdb_module::action() returned GO_BACK (KEY_HOME entered) 3 if the input was aborted (KEY_ESC entered) or was invalid
This method is actually responsible for reading the input with respect to the commands format string and calling the Jdb_module::action() method after that.

int Jdb_core::getchar void   )  [static]
 

Overwritten getchar() to be able to handle next_char.

Reimplemented in Jdb.

Jdb_core::Cmd Jdb_core::has_cmd char const *  cmd  )  [static]
 

Get the command structure accoring to the given name.

Parameters:
cmd the command to look for.
Returns:
A valid Cmd structure if cmd was found, or a Cmd structure where Cmd::cmd is a null pointer if no module provides such a command.

int Jdb_core::new_line unsigned &  line  )  [static]
 

Call this function every time a `
' is written to the console and it stops output when the screen is full.

Returns:
0 if user wants to abort the output (escape or 'q' pressed)

void Jdb_core::prompt  )  [static]
 

void Jdb_core::prompt_end  )  [static]
 

void Jdb_core::prompt_start  )  [static]
 

int Jdb_core::set_prompt_color char  v  )  [static]
 

void Jdb_core::update_prompt  )  [static]
 


Member Data Documentation

char Jdb_core::esc_prompt = "\033[32m" [static]
 

int Jdb_core::next_char = -1 [static, private]
 

bool Jdb_core::short_mode = true [static, private]
 


The documentation for this class was generated from the following files:
Generated on Mon Sep 26 14:20:15 2005 for Fiasco by  doxygen 1.4.2