Import Geant4 10.2.0 source tree
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
// Copyright (C) 2010, Guy Barrand. All rights reserved.
|
||||
// See the file tools.license for terms.
|
||||
|
||||
#ifndef tools_sg_action
|
||||
#define tools_sg_action
|
||||
|
||||
#ifdef TOOLS_MEM
|
||||
#include "../mem"
|
||||
#endif
|
||||
|
||||
#include "../S_STRING"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace tools {
|
||||
namespace sg {
|
||||
|
||||
class action {
|
||||
//public:
|
||||
TOOLS_SCLASS(tools::sg::action)
|
||||
public:
|
||||
//virtual void* cast(const std::string&) const = 0;
|
||||
public:
|
||||
action(std::ostream& a_out)
|
||||
:m_out(a_out)
|
||||
{
|
||||
#ifdef TOOLS_MEM
|
||||
mem::increment(s_class().c_str());
|
||||
#endif
|
||||
}
|
||||
virtual ~action(){
|
||||
#ifdef TOOLS_MEM
|
||||
mem::decrement(s_class().c_str());
|
||||
#endif
|
||||
}
|
||||
protected:
|
||||
action(const action& a_from)
|
||||
:m_out(a_from.m_out)
|
||||
{
|
||||
#ifdef TOOLS_MEM
|
||||
mem::increment(s_class().c_str());
|
||||
#endif
|
||||
}
|
||||
action& operator=(const action&){return *this;}
|
||||
public:
|
||||
std::ostream& out() const {return m_out;}
|
||||
//void reset() {
|
||||
//}
|
||||
protected:
|
||||
std::ostream& m_out;
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user