Generic hardware access library
/home/cschwick/hal/generic/src/common/LabelFactory.cc
Go to the documentation of this file.
00001 #include "hal/LabelFactory.hh"
00002 
00003 HAL::SequencerCommand* HAL::LabelFactory::create( std::list<std::string>& arguments, 
00004                                                   const HAL::AddressTableInterface& addressTable,
00005                                                   HAL::CommandSequence& sequence ) 
00006   throw (HAL::SequencerSyntaxError) {
00007   if ( arguments.size() != 1 ) {
00008         std::string text ="\"define\" command must have one argument.\n    syntax : label {name}";
00009     throw( HAL::SequencerSyntaxError(text));
00010   }
00011   std::string labelName = arguments.front();
00012   arguments.pop_front();
00013   return new HAL::LabelCommand(labelName, sequence); 
00014 }
00015 
00016   
00017 
00018