9 #ifndef ThePEG_RefVector_H
10 #define ThePEG_RefVector_H
13 #include "ThePEG/Config/ThePEG.h"
14 #include "InterfaceBase.h"
15 #include "RefVector.xh"
16 #include "RefVector.fh"
81 const type_info & newTypeInfo,
82 string newRefClassName,
83 const type_info & newRefTypeInfo,
84 int newSize,
bool depSafe,
85 bool readonly,
bool norebind,
bool nullable,
bool defnull);
96 string arguments)
const;
106 virtual string type()
const;
208 template <
class T,
class R>
226 typedef vector<RefPtr> (T::*
GetFn)()
const;
277 RefVector(
string newName,
string newDescription,
278 Member newMember,
int newSize,
bool depSafe =
false,
279 bool readonly =
false,
bool rebind =
true,
bool nullable =
true,
329 RefVector(
string newName,
string newDescription,
330 Member newMember,
int newSize,
bool depSafe,
331 bool readonly,
bool rebind,
bool nullable,
bool defnull,
430 #include "RefVector.tcc"
virtual IVector getReferences(const InterfacedBase &ib) const
Return pointers to other objects in ib.
void setSetFunction(SetFn sf)
Give a pointer to a member function to be used by 'set()'.
InsFn theInsFn
Give a pointer to a member function to be used by 'insert()'.
virtual void insert(InterfacedBase &ib, IBPtr ip, int i, bool chk=true) const =0
Insert a new pointer before the i'th element of a container of pointers of ib and set it to ip...
virtual void insert(InterfacedBase &ib, IBPtr ip, int i, bool chk=true) const
Insert a new pointer before the i'th element of a container of pointers of ib and set it to ip...
Ptr< R >::pointer RefPtr
A pointer to the class of objects referred to.
virtual string doxygenType() const
Return a string describing the type of interface to be included in the Doxygen documentation.
virtual void set(InterfacedBase &ib, IBPtr ip, int i, bool chk=true) const
Set the i'th element of a container of pointers of ib to ip.
void setSize(int sz)
Set the size of the container being interfaced.
vector< RefPtr > T::* Member
Declaration of a direct pointer to the member variable in case it is a vector.
void setGetFunction(GetFn gf)
Give a pointer to a member function to be used by 'get()'.
virtual bool check(const InterfacedBase &ib, cIBPtr ip, int i) const =0
Check if set(ib, ip, i) will be successfull but do not do anything.
The RefVector and its base class RefVectorBase defines an interface to a class derived from the Inter...
ConstRCPtr is a reference counted (smart) const pointer.
virtual string type() const
Return a code for the type of this reference.
Rebinder is a class associating pairs of pointers to objects.
This is the main namespace within which all identifiers in ThePEG are declared.
virtual bool check(const InterfacedBase &ib, cIBPtr, int i) const
Check if set(ib, ip, i) will be successfull but do not do anything.
virtual void erase(InterfacedBase &ib, int i) const =0
Remove the i'th element of a container of pointers of ib.
void setVariableSize()
Set the size of the container being interfaced to -1, i.e.
Ptr< R >::const_pointer cRefPtr
A const pointer to the class of objects referred to.
int theSize
The size of the container being interfaced.
SetFn theSetFn
A pointer to a member function to be used by 'set()'.
The RefVector and its base class RefVectorBase defines an interface to a class derived from the Inter...
virtual void rebind(InterfacedBase &ib, const TranslationMap &trans, const IVector &defs) const
In the object ib, replace all pointers to objects in this interface with the translated ones provided...
virtual void set(InterfacedBase &ib, IBPtr ip, int i, bool chk=true) const =0
Set the i'th element of a container of pointers of ib to ip.
void setCheckFunction(CheckFn cf)
Give a pointer to a member function to be used by 'check()'.
void(T::* DelFn)(int)
A pointer to a menberfunction to be used for the 'erase' action.
void setEraseFunction(DelFn df)
Give a pointer to a member function to be used by 'erase()'.
RefVectorBase(string newName, string newDescription, string newClassName, const type_info &newTypeInfo, string newRefClassName, const type_info &newRefTypeInfo, int newSize, bool depSafe, bool readonly, bool norebind, bool nullable, bool defnull)
Standard constructor.
GetFn theGetFn
Give a pointer to a member function to be used by 'get()'.
InterfacedBase is the base class of all Interfaced objects to be handled by the BaseRepository class...
RefInterfaceBase is an abstract base class inheriting from InterfaceBase used for subclasses dealing ...
void setInsertFunction(InsFn ifn)
Give a pointer to a member function to be used by 'insert()'.
RCPtr is a reference counted (smart) pointer.
int size() const
Get the size of the container being interfaced.
bool(T::* CheckFn)(cRefPtr, int) const
A pointer to a menberfunction to be used for the 'check' action.
Member theMember
The pointer to the member variable.
virtual void erase(InterfacedBase &ib, int i) const
Remove the i'th element of a container of pointers of ib.
virtual string fullDescription(const InterfacedBase &ib) const
Return a complete description of this reference vector.
void(T::* InsFn)(RefPtr, int)
A pointer to a menberfunction to be used for the 'insert' action.
vector< RefPtr >(T::* GetFn)() const
A pointer to a menberfunction to be used for the 'get' action.
vector< IBPtr > IVector
A vector of pointers to InterfacedBase objects.
virtual string exec(InterfacedBase &ib, string action, string arguments) const
The general interface method overriding the one in InterfaceBase.
void(T::* SetFn)(RefPtr, int)
A pointer to a menberfunction to be used for the 'set' action.
RefVector(string newName, string newDescription, Member newMember, int newSize, bool depSafe=false, bool readonly=false, bool rebind=true, bool nullable=true, SetFn newSetFn=0, InsFn newInsFn=0, DelFn newDelFn=0, GetFn newGetFn=0, CheckFn newCheckFn=0)
Standard constructor.
DelFn theDelFn
Give a pointer to a member function to be used by 'erase()'.
CheckFn theCheckFn
Give a pointer to a member function to be used by 'check()'.