BLCMDinclude Class Reference

Inheritance diagram for BLCMDinclude:

BLCommand

List of all members.


Detailed Description

class BLCMDinclude implements the include command to include a file.

Public Member Functions

 BLCMDinclude ()
G4String commandName ()
int command (BLArgumentVector &argv, BLArgumentMap &namedArgs)

Constructor & Destructor Documentation

BLCMDinclude::BLCMDinclude (  ) 

References BLCMDTYPE_CONTROL, BLCommand::registerCommand(), BLCommand::setDescription(), and BLCommand::setSynopsis().

00038 {
00039         registerCommand(BLCMDTYPE_CONTROL);
00040         setSynopsis("includes a command file.");
00041         setDescription("include requires one argument, the file to include.");
00042 }


Member Function Documentation

G4String BLCMDinclude::commandName (  )  [inline, virtual]

Implements BLCommand.

00028 { return "include"; }

int BLCMDinclude::command ( BLArgumentVector argv,
BLArgumentMap namedArgs 
) [virtual]

Implements BLCommand.

References BLCommand::printError(), and BLCommand::readFile().

00045 {
00046         if(argv.size() != 1 || namedArgs.size() != 0) {
00047                 printError("Invalid include command");
00048                 return -1;
00049         }
00050 
00051         BLCommand::readFile(argv[0]);
00052 
00053         return 0;
00054 }


The documentation for this class was generated from the following file:
g4beamline