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

atlas::commands::CommandMode Class Reference

#include <commands.h>

List of all members.

Public Types

typedef CommandDict::iterator iterator
typedef CommandDict::const_iterator const_iterator

Public Member Functions

 CommandMode (const char *, void(*entry)()=&relax_f, void(*exit)()=&relax_f, void(*error)(const char *)=&defaultError)
virtual ~CommandMode ()
const_iterator begin () const
const_iterator end () const
bool empty () const
const_iterator find (const char *name) const
const char * prompt () const
void entry () const
void error (const char *str) const
void exit () const
void extensions (std::set< const char *, StrCmp > &, const char *) const
void extensions (std::vector< const char * > &, const char *) const
const_iterator findName (const char *name) const
virtual const std::vector<
const CommandMode * > & 
next () const
size_t n_desc () const
const CommandModenextMode (size_t j) const
void add (const char *const name, void(*action)())
void add (const char *const, const Command &)
void add_descendant (CommandMode &c)
iterator find (const char *name)
void setAction (const char *, void(*)())

Private Types

typedef std::map< const char *,
Command, StrCmp
CommandDict

Private Attributes

std::vector< const CommandMode * > d_nextList
CommandDict d_map
const char * d_prompt
void(* d_entry )()
void(* d_exit )()
void(* d_error )(const char *)


Member Typedef Documentation

typedef std::map<const char*,Command,StrCmp> atlas::commands::CommandMode::CommandDict [private]
 

Definition at line 78 of file commands.h.

typedef CommandDict::const_iterator atlas::commands::CommandMode::const_iterator
 

Definition at line 91 of file commands.h.

Referenced by extensions(), and findName().

typedef CommandDict::iterator atlas::commands::CommandMode::iterator
 

Definition at line 90 of file commands.h.


Constructor & Destructor Documentation

atlas::commands::CommandMode::CommandMode const char *  ,
void(*)()  entry = &relax_f,
void(*)()  exit = &relax_f,
void(*)(const char *)  error = &defaultError
 

Definition at line 109 of file commands.cpp.

virtual atlas::commands::CommandMode::~CommandMode  )  [inline, virtual]
 

Definition at line 99 of file commands.h.


Member Function Documentation

void atlas::commands::CommandMode::add const char *  const,
const Command
 

Definition at line 203 of file commands.cpp.

References d_map.

void atlas::commands::CommandMode::add const char *const   name,
void(*)()  action
[inline]
 

Definition at line 149 of file commands.h.

Referenced by atlas::blockmode::addBlockHelp(), atlas::commands::addCommands(), atlas::emptyhelp::addEmptyHelp(), atlas::mainhelp::addMainHelp(), atlas::realhelp::addRealHelp(), atlas::special::addSpecialCommands(), atlas::special::addSpecialHelp(), atlas::blockmode::blockMode(), atlas::emptymode::emptyMode(), atlas::helpmode::helpMode(), atlas::mainmode::mainMode(), and atlas::realmode::realMode().

void atlas::commands::CommandMode::add_descendant CommandMode c  )  [inline]
 

Definition at line 155 of file commands.h.

const_iterator atlas::commands::CommandMode::begin  )  const [inline]
 

Definition at line 102 of file commands.h.

Referenced by atlas::commands::addCommands(), and atlas::completionGenerator().

bool atlas::commands::CommandMode::empty  )  const [inline]
 

Definition at line 110 of file commands.h.

Referenced by atlas::blockmode::blockMode(), atlas::helpmode::helpMode(), atlas::mainmode::mainMode(), and atlas::realmode::realMode().

const_iterator atlas::commands::CommandMode::end  )  const [inline]
 

Definition at line 106 of file commands.h.

Referenced by atlas::commands::addCommands(), atlas::ambiguous(), atlas::commands::checkName(), atlas::execute(), extensions(), findName(), and atlas::commands::printTags().

void atlas::commands::CommandMode::entry  )  const [inline]
 

Definition at line 120 of file commands.h.

Referenced by atlas::commands::activate().

void atlas::commands::CommandMode::error const char *  str  )  const [inline]
 

Definition at line 124 of file commands.h.

Referenced by atlas::commands::run().

void atlas::commands::CommandMode::exit  )  const [inline]
 

Definition at line 128 of file commands.h.

Referenced by atlas::commands::exitMode().

void atlas::commands::CommandMode::extensions std::vector< const char * > &  ,
const char * 
const
 

Definition at line 154 of file commands.cpp.

References end(), and extensions().

void atlas::commands::CommandMode::extensions std::set< const char *, StrCmp > &  ,
const char * 
const
 

Definition at line 129 of file commands.cpp.

References const_iterator, d_map, atlas::isInitial(), n_desc(), and nextMode().

Referenced by atlas::commands::checkName(), atlas::completionGenerator(), extensions(), and atlas::commands::run().

iterator atlas::commands::CommandMode::find const char *  name  )  [inline]
 

Definition at line 158 of file commands.h.

const_iterator atlas::commands::CommandMode::find const char *  name  )  const [inline]
 

Definition at line 112 of file commands.h.

Referenced by atlas::execute(), findName(), and setAction().

CommandMode::const_iterator atlas::commands::CommandMode::findName const char *  name  )  const
 

Definition at line 173 of file commands.cpp.

References const_iterator, end(), find(), n_desc(), next(), and nextMode().

Referenced by atlas::commands::checkName(), and atlas::execute().

size_t atlas::commands::CommandMode::n_desc  )  const [inline]
 

Definition at line 142 of file commands.h.

Referenced by atlas::execute(), extensions(), and findName().

virtual const std::vector<const CommandMode*>& atlas::commands::CommandMode::next  )  const [inline, virtual]
 

Definition at line 138 of file commands.h.

Referenced by findName().

const CommandMode& atlas::commands::CommandMode::nextMode size_t  j  )  const [inline]
 

Definition at line 144 of file commands.h.

Referenced by atlas::execute(), extensions(), and findName().

const char* atlas::commands::CommandMode::prompt  )  const [inline]
 

Definition at line 116 of file commands.h.

Referenced by atlas::getCommand().

void atlas::commands::CommandMode::setAction const char *  ,
void(*)() 
 

Definition at line 220 of file commands.cpp.

References atlas::commands::Command::action, and find().


Member Data Documentation

void(* atlas::commands::CommandMode::d_entry)() [private]
 

void(* atlas::commands::CommandMode::d_error)(const char *) [private]
 

void(* atlas::commands::CommandMode::d_exit)() [private]
 

CommandDict atlas::commands::CommandMode::d_map [private]
 

Definition at line 82 of file commands.h.

Referenced by add(), and extensions().

std::vector<const CommandMode*> atlas::commands::CommandMode::d_nextList [private]
 

Definition at line 80 of file commands.h.

const char* atlas::commands::CommandMode::d_prompt [private]
 

Definition at line 83 of file commands.h.


The documentation for this class was generated from the following files:
Generated on Wed Mar 26 16:52:23 2008 for atlas by  doxygen 1.3.9.1