Generic hardware access library
HAL::CommandCreator Class Reference

A class to construct SequencerCommand Objects. More...

#include <CommandCreator.hh>

List of all members.

Public Member Functions

 CommandCreator ()
 The construtor sets up the internal map of command factories.
virtual ~CommandCreator ()
SequencerCommandcreate (std::list< std::string > commandStringList, const AddressTableInterface &addressTable, CommandSequence &sequence) throw (SequencerSyntaxError, NoSuchItemException)
 Create an instantiation of a specific SequencerCommand.

Private Attributes

std::map< std::string,
AbstractCommandFactory * > 
commandFactoryMap

Detailed Description

A class to construct SequencerCommand Objects.

The CommandCreator "knows" which commands are available in the system. It can create SequencerCommand Objects from strings containing the command name and the parameters. Internally it contains a map with abstract command-factories for each available command. These are used to create the commands.

Note that commands in sequences are CASE SENSITIVE !

Available commands are: read, unmaskedRead, write, unmaskedWrite, setBit, resetBit, define, label, add, goto, print, check.

See also:
ReadCommand UnmaskedReadCommand WriteCommand UnmaskedWriteCommand SetBitCommand ResetBitCommand DefineCommand LabelCommand AddCommand GotoCommand PrintCommand CheckCommand
Author:
Christoph Schwick
Revision:
1.1
Date:
2007/03/05 18:02:09

Definition at line 62 of file CommandCreator.hh.


Constructor & Destructor Documentation

The construtor sets up the internal map of command factories.

Here it is hardcoed which commands are available for the system. If a new command is added to the system, this constructor has to be changed.

Definition at line 3 of file CommandCreator.cc.

Definition at line 19 of file CommandCreator.cc.


Member Function Documentation

HAL::SequencerCommand * HAL::CommandCreator::create ( std::list< std::string >  commandStringList,
const AddressTableInterface addressTable,
HAL::CommandSequence sequence 
) throw (SequencerSyntaxError, NoSuchItemException)

Create an instantiation of a specific SequencerCommand.

Parameters:
commandStringListspecifies the SequencerCommand to be instantiated. The first string in the list is the command name followed by it's parameters.
addressTableis forwarded to the constructor of the command.
sequenceis forwarded to the contructor of the command.

Definition at line 26 of file CommandCreator.cc.


Member Data Documentation

Definition at line 87 of file CommandCreator.hh.


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