Page MenuHomeHEPForge

CloneBase.h
No OneTemporary

CloneBase.h

// -*- C++ -*-
#ifndef ARIADNE_CloneBase_H
#define ARIADNE_CloneBase_H
//
// This is the declaration of the CloneBase class.
//
#include "Ariadne.h"
#include "ThePEG/Utilities/Rebinder.h"
#include "ThePEG/Utilities/ClassDescription.h"
#include "CloneBase.fh"
namespace Ariadne {
/**
* CloneBase is used as base class for most of the classes in the
* Ariadne dipole cascade. It defines the basic clone and rebind
* methods which are used when cloning a whole dipole state. Maybe
* this class is general enough to be a part of ThePEG base
* classes.
*/
class CloneBase: public PersistentBase {
public:
/**
* A set of pointers to CloneBase objects.
*/
typedef set<ClonePtr> CloneSet;
/**
* The Rebinder class for CloneBase objects.
*/
typedef Rebinder<CloneBase> TranslationMap;
/**
*
*/
friend class DipoleState;
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
inline CloneBase();
/**
* The copy constructor.
*/
inline CloneBase(const CloneBase &);
/**
* The destructor.
*/
inline virtual ~CloneBase();
//@}
protected:
/** @name The virtual functions to be overridden in sub-classes. */
//@{
/**
* Return a simple clone of this object. Should be implemented as
* <code>return new_ptr(*this);</code> by a derived class.
*/
virtual ClonePtr clone() const = 0;
/**
* Fill the provided set with all pointers to CloneBase objects used
* in this object.
* @return a vector of pointers.
*/
virtual void fillReferences(CloneSet &);
/**
* Rebind pointer to other CloneBase objects. Called after a number
* of interconnected CloneBase objects have been cloned, so that
* the cloned objects will refer to the cloned copies afterwards.
*
* @param trans a TranslationMap relating the original objects to
* their respective clones.
*/
virtual void rebind(const TranslationMap & trans);
//@}
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is an abstract class without persistent data.
*/
static AbstractNoPIOClassDescription<CloneBase> initCloneBase;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
CloneBase & operator=(const CloneBase &);
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of CloneBase. */
template <>
struct BaseClassTrait<Ariadne::CloneBase,1> {
/** Typedef of the first base class of CloneBase. */
typedef PersistentBase NthBase;
};
/** This template specialization informs ThePEG about the name of
* the CloneBase class and the shared object where it is defined. */
template <>
struct ClassTraits<Ariadne::CloneBase>
: public ClassTraitsBase<Ariadne::CloneBase> {
/** Return a platform-independent class name */
static string className() { return "Ariadne::CloneBase"; }
/** Return the name of the shared library be loaded to get
* access to the CloneBase class and every other class it uses
* (except the base class). */
static string library() { return "libAriadne.so"; }
};
/** @endcond */
}
#include "CloneBase.icc"
#ifndef ThePEG_TEMPLATES_IN_CC_FILE
// #include "CloneBase.tcc"
#endif
#endif /* ARIADNE_CloneBase_H */

File Metadata

Mime Type
text/x-c++
Expires
Sat, May 3, 6:27 AM (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4983029
Default Alt Text
CloneBase.h (3 KB)

Event Timeline