Generic hardware access library
|
A class to construct SequencerCommand Objects. More...
#include <CommandCreator.hh>
Public Member Functions | |
CommandCreator () | |
The construtor sets up the internal map of command factories. | |
virtual | ~CommandCreator () |
SequencerCommand * | create (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 |
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.
Definition at line 62 of file CommandCreator.hh.
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.
HAL::CommandCreator::~CommandCreator | ( | ) | [virtual] |
Definition at line 19 of file CommandCreator.cc.
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.
commandStringList | specifies the SequencerCommand to be instantiated. The first string in the list is the command name followed by it's parameters. |
addressTable | is forwarded to the constructor of the command. |
sequence | is forwarded to the contructor of the command. |
Definition at line 26 of file CommandCreator.cc.
std::map< std::string, AbstractCommandFactory* > HAL::CommandCreator::commandFactoryMap [private] |
Definition at line 87 of file CommandCreator.hh.