// // ******************************************************************** // * DISCLAIMER * // * * // * The following disclaimer summarizes all the specific disclaimers * // * of contributors to this software. The specific disclaimers,which * // * govern, are listed with their locations in: * // * http://cern.ch/geant4/license * // * * // * Neither the authors of this software system, nor their employing * // * institutes,nor the agencies providing financial support for this * // * work make any representation or warranty, express or implied, * // * regarding this software system or assume any liability for its * // * use. * // * * // * This code implementation is the intellectual property of the * // * GEANT4 collaboration. * // * By copying, distributing or modifying the Program (or any work * // * based on the Program) you indicate your acceptance of this * // * statement, and all its terms. * // ******************************************************************** // // // $Id: G4UnitsMessenger.cc,v 1.5 2003/05/21 21:13:30 asaim Exp $ // GEANT4 tag $Name: geant4-05-02-patch-01 $ // // //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... #include "G4UnitsMessenger.hh" #include "G4UnitsTable.hh" #include "G4UIdirectory.hh" #include "G4UIcmdWithoutParameter.hh" //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... G4UnitsMessenger::G4UnitsMessenger() { UnitsTableDir = new G4UIdirectory("/units/"); UnitsTableDir->SetGuidance("Available units."); ListCmd = new G4UIcmdWithoutParameter("/units/list",this); ListCmd->SetGuidance("full list of available units."); ListCmd->AvailableForStates(G4State_Idle); } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... G4UnitsMessenger::~G4UnitsMessenger() { delete ListCmd; delete UnitsTableDir; } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... void G4UnitsMessenger::SetNewValue(G4UIcommand* command,G4String) { if (command == ListCmd) { G4UnitDefinition::PrintUnitsTable(); } } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....