Import Geant4 9.3.0 source tree
This commit is contained in:
@@ -0,0 +1,137 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * 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. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIExecutive.icc,v 1.6 2009/11/20 22:10:31 kmura Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
//
|
||||
// ====================================================================
|
||||
// G4UIExecutive.icc
|
||||
//
|
||||
// ====================================================================
|
||||
#include "G4UIsession.hh"
|
||||
#include "G4UImanager.hh"
|
||||
|
||||
#if defined(G4UI_USE_TCSH)
|
||||
#include "G4UIterminal.hh"
|
||||
#include "G4UItcsh.hh"
|
||||
|
||||
#elif defined(G4UI_USE_XM)
|
||||
#include "G4UIXm.hh"
|
||||
|
||||
#elif defined(G4UI_USE_WIN32)
|
||||
#include "G4UIWin32.hh"
|
||||
|
||||
#elif defined(G4UI_USE_QT)
|
||||
#include "G4UIQt.hh"
|
||||
#include "G4Qt.hh"
|
||||
|
||||
#else
|
||||
#include "G4UIterminal.hh"
|
||||
#include "G4UIcsh.hh"
|
||||
|
||||
#endif
|
||||
|
||||
#define DISCARD_PARAMETER(p) (void)p
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
G4UIExecutive::G4UIExecutive(G4int argc, char** argv)
|
||||
: session(0), shell(0),isGUI(false)
|
||||
/////////////////////////////////////////////////////
|
||||
{
|
||||
#if defined(G4UI_USE_TCSH)
|
||||
DISCARD_PARAMETER(argc);
|
||||
DISCARD_PARAMETER(argv);
|
||||
|
||||
shell = new G4UItcsh;
|
||||
session = new G4UIterminal(shell);
|
||||
|
||||
#elif defined(G4UI_USE_XM)
|
||||
session = new G4UIXm(argc, argv);
|
||||
isGUI = true;
|
||||
|
||||
#elif defined(G4UI_USE_WIN32)
|
||||
DISCARD_PARAMETER(argc);
|
||||
DISCARD_PARAMETER(argv);
|
||||
|
||||
session = new G4UIWin32();
|
||||
|
||||
#elif defined(G4UI_USE_QT)
|
||||
session = new G4UIQt(argc, argv);
|
||||
isGUI = true;
|
||||
|
||||
#else
|
||||
DISCARD_PARAMETER(argc);
|
||||
DISCARD_PARAMETER(argv);
|
||||
|
||||
shell = new G4UIcsh;
|
||||
session = new G4UIterminal(shell);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
///////////////////////////////
|
||||
G4UIExecutive::~G4UIExecutive()
|
||||
///////////////////////////////
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////
|
||||
inline G4bool G4UIExecutive::IsGUI() const
|
||||
//////////////////////////////////////////
|
||||
{
|
||||
return isGUI;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
inline G4UIsession* G4UIExecutive::GetSession() const
|
||||
/////////////////////////////////////////////////////
|
||||
{
|
||||
return session;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
inline void G4UIExecutive::SetPrompt(const G4String& prompt)
|
||||
////////////////////////////////////////////////////////////
|
||||
{
|
||||
if(shell) shell-> SetPrompt(prompt);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
inline void G4UIExecutive::SetLsColor(TermColorIndex dirColor,
|
||||
TermColorIndex cmdColor)
|
||||
//////////////////////////////////////////////////////////////
|
||||
{
|
||||
if(shell) shell-> SetLsColor(dirColor, cmdColor);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////
|
||||
inline void G4UIExecutive::SessionStart()
|
||||
/////////////////////////////////////////
|
||||
{
|
||||
session-> SessionStart();
|
||||
delete session;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user