QwAnalysis
VQwCloneable< base_t > Class Template Reference

Polymorphic copy constructor virtual base class. More...

#include <QwFactory.h>

+ Inheritance diagram for VQwCloneable< base_t >:

Public Member Functions

virtual ~VQwCloneable ()
 Virtual destructor. More...
 
std::string GetClassName () const
 Get demangled name of this class. More...
 
virtual base_t * Clone () const
 Abstract clone method when no derived method is defined. More...
 
virtual const VQwFactory
< base_t > * 
Factory () const
 Virtual factory getter. More...
 

Detailed Description

template<class base_t>
class VQwCloneable< base_t >

Polymorphic copy constructor virtual base class.

Definition at line 149 of file QwFactory.h.

Constructor & Destructor Documentation

template<class base_t>
virtual VQwCloneable< base_t >::~VQwCloneable ( )
inlinevirtual

Virtual destructor.

Definition at line 154 of file QwFactory.h.

154 { }

Member Function Documentation

template<class base_t>
virtual base_t* VQwCloneable< base_t >::Clone ( ) const
inlinevirtual

Abstract clone method when no derived method is defined.

Reimplemented in MQwCloneable< base_t, type_t >, MQwCloneable< VQwSubsystem, QwScanner >, MQwCloneable< VQwDataElement, dataelement_t >, MQwCloneable< VQwSubsystem, QwMainCerenkovDetector >, MQwCloneable< VQwSubsystem, QwBeamMod >, MQwCloneable< VQwSubsystem, QwTriggerScintillator >, MQwCloneable< VQwSubsystem, QwBeamLine >, MQwCloneable< VQwSubsystem, QwComptonPhotonDetector >, MQwCloneable< VQwSubsystem, QwComptonElectronDetector >, MQwCloneable< VQwSubsystem, QwMollerDetector >, MQwCloneable< VQwSubsystem, QwDriftChamberVDC >, MQwCloneable< VQwSubsystem, QwIntegratedRaster >, MQwCloneable< VQwSubsystem, QwHelicity >, MQwCloneable< VQwSubsystem, QwRaster >, MQwCloneable< VQwSubsystem, QwDriftChamberHDC >, MQwCloneable< VQwSubsystem, subsystem_t >, MQwCloneable< VQwSubsystem, QwLumi >, MQwCloneable< VQwSubsystem, QwScaler >, MQwCloneable< VQwSubsystem, QwSciFiDetector >, MQwCloneable< VQwSubsystem, QwRegressionSubsystem >, and MQwCloneable< VQwSubsystem, QwMainDetector >.

Definition at line 167 of file QwFactory.h.

167  {
168  QwError << "Clone() is not implemented for class " << GetClassName() << "!" << QwLog::endl;
169  QwMessage << "Modify the class definition of " << GetClassName() << " to:" << QwLog::endl;
170  QwMessage << " class " << GetClassName() << ": "
171  << "public MQwSomethingCloneable<" << GetClassName() << ">" << QwLog::endl;
172  return 0;
173  }
#define QwMessage
Predefined log drain for regular messages.
Definition: QwLog.h:50
std::string GetClassName() const
Get demangled name of this class.
Definition: QwFactory.h:157
static std::ostream & endl(std::ostream &)
End of the line.
Definition: QwLog.cc:299
#define QwError
Predefined log drain for errors.
Definition: QwLog.h:40
template<class base_t>
std::string VQwCloneable< base_t >::GetClassName ( ) const
inline

Get demangled name of this class.

Definition at line 157 of file QwFactory.h.

Referenced by VQwCloneable< VQwDataElement >::Clone().

157  {
158  int status;
159  const type_info& ti = typeid(*this);
160  char* name = abi::__cxa_demangle(ti.name(), 0, 0, &status);
161  std::string str(name);
162  free(name);
163  return str;
164  }

+ Here is the caller graph for this function:


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