9 #ifndef ThePEG_InterfacedBase_H 10 #define ThePEG_InterfacedBase_H 13 #include "ThePEG/Config/ThePEG.h" 14 #include "ThePEG/Utilities/Named.h" 15 #include "ThePEG/Utilities/ClassDescription.h" 16 #include "ThePEG/Utilities/HoldFlag.h" 17 #include "InterfacedBase.xh" 99 if ( slash != string::npos ) ret =
Named::name().substr(0,slash);
505 static string className() {
return "ThePEG::InterfacedBase"; }
void finish()
Calls the dofinish() function with recursion prevention.
PersistentIStream is used to read persistent objects from a stream where they were previously written...
virtual IBPtr clone() const =0
Return a simple clone of this object.
UpdateChecker(bool &touched)
Constructor.
void name(string newName)
Set a new name (full name including path).
void clear()
Calls reset() and unTouch().
virtual void debugme() const
Print out debugging information for this object on std::cerr.
Define the base class from which all (polymorphic) classes in ThePEG are derived. ...
void setup(istream &is)
Read setup info from a standard istream is.
virtual void doinitrun()
Initialize this object.
ClassTraitsType is an empty, non-polymorphic, base class.
Functor class to be used to update a range of dependent object in a map.
InterfacedBase(const InterfacedBase &i)
Protected copy-constructor.
The InterfaceBase class defines a generic interface to any class derived from the InterfacedBase clas...
void lock()
Lock this object.
void operator()(const ptr &i)
Function call operator.
InterfacedBase & operator=(const InterfacedBase &)
Private and non-existent assignment operator.
UpdateMapChecker(const UpdateMapChecker &uc)
Constructor.
The object has been initialized.
bool isTouched
True if this object has been chaged since the last call to update().
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
A concreate implementation of ClassDescriptionBase describing an abstract class with persistent data...
The object is currently being initialized.
UpdateChecker(const UpdateChecker &uc)
Constructor.
void touch()
This function should be called every time something in this object has changed in a way that a sanity...
string path() const
Returns the path to this object including the trailing '/'.
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Functor class to be used to update a range of dependent object.
virtual void doupdate()
Check sanity of the object during the setup phase.
Rebinder is a class associating pairs of pointers to objects.
virtual IBPtr fullclone() const
Return a full clone of this object possibly doing things to the clone to make it sane.
map< string, string > objectDefaults
A map listing object-specific defaults set for the given interfaces.
This is the main namespace within which all identifiers in ThePEG are declared.
static AbstractClassDescription< InterfacedBase > initInterfacedBase
Standard Initialization object.
bool locked() const
Return true if the BaseRepository is not allowed to change the state of this object.
The Named class is a simple concrete base class to used by classes of objects with a name...
The object has not been initialized.
InitState initState
Indicate if this object has been initialized or not, or if it is being initialized.
InitState state() const
Return the state of initialization of this object.
InterfacedBase()
Protected default constructor.
static void Init()
Standard Init function.
string comment() const
Returns a comment assigned to this object.
virtual ~InterfacedBase()
The virtual (empty) destructor;.
static void check(tIBPtr, bool &)
Call the check function for an object.
void initrun()
Calls the doinitrun() function with recursion prevention.
bool isLocked
True if this object is not to be changed by the user interface.
void reset()
Set the state of this object to uninitialized.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
bool & isTouched
Reference to the bool variable to be set.
InitState
Enumeration reflecting the state of an InterfacedBase object.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
void init()
Calls the doinit() function with recursion prevention.
BaseRepository is a purely static class which keeps a set of InterfacedBase objects indexed by their ...
InterfacedBase is the base class of all Interfaced objects to be handled by the BaseRepository class...
void unlock()
Unlock this object.
RCPtr is a reference counted (smart) pointer.
virtual void dofinish()
Finalize this object.
const string & name() const
Return name.
string theComment
A comment assigned to this object.
void operator()(const ref &i)
Function call operator.
string fullName() const
Returns the full name of this object including its path, e.g.
virtual bool preInitialize() const
Return true if this object needs to be initialized before all other objects (except those for which t...
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
The default concrete implementation of ClassTraitsBase.
The object is initialized and the initrun() method has been called.
string addComment(string)
Used by the interface to add comments.
string name() const
Returns the name of this object, without the path.
void untouch()
Clear the isTouched flag.
virtual IVector getReferences()
Return a vector of all pointers to Interfaced objects used in this object.
HoldFlag objects are used to temporarily change the value of an object, restoring the original value ...
vector< IBPtr > IVector
A vector of pointers to InterfacedBase objects.
void update()
Calls the doupdate() function with recursion prevention.
virtual void readSetup(istream &is)
Read setup info from a standard istream is.
virtual void rebind(const TranslationMap &)
Rebind pointer to other Interfaced objects.
BaseClassTraits describes the base classes of the templated class.
InterfacedBase(string newName)
Protected constructor with the name given as argument.
The EventGenerator class manages a whole event generator run.
bool touched() const
Return true if the state of this object has been changed since the last call to update().
bool & isTouched
set to false if any check() call fails.
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
UpdateMapChecker(bool &touched)
Constructor.