Public Member Functions | |
BLCMDinclude () | |
G4String | commandName () |
int | command (BLArgumentVector &argv, BLArgumentMap &namedArgs) |
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 }
G4String BLCMDinclude::commandName | ( | ) | [inline, virtual] |
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 }