#include <Reference.h>
Public Types | |
typedef Ptr< R >::pointer | RefPtr |
A pointer to the class of objects referred to. | |
typedef Ptr< R >::const_pointer | cRefPtr |
A const pointer to the class of objects referred to. | |
typedef void(T::* | SetFn )(RefPtr) |
A pointer to a menberfunction to be used for the 'set' action. | |
typedef bool(T::* | CheckFn )(cRefPtr) const |
A pointer to a menberfunction to be used for the 'check' action. | |
typedef RefPtr(T::* | GetFn )() const |
A pointer to a menberfunction to be used for the 'get' action. | |
typedef RefPtr T::* | Member |
Declaration of a direct pointer to the member variable. | |
Public Member Functions | |
Reference (string newName, string newDescription, Member newMember, bool depSafe=false, bool readonly=false, bool rebind=true, bool nullable=true, SetFn newSetFn=0, GetFn newGetFn=0, CheckFn newCheckFn=0) | |
Standard constructor. | |
Reference (string newName, string newDescription, Member newMember, bool depSafe, bool readonly, bool rebind, bool nullable, bool defnull, SetFn newSetFn=0, GetFn newGetFn=0, CheckFn newCheckFn=0) | |
Standard constructor. | |
virtual void | set (InterfacedBase &ib, IBPtr ip, bool chk=true) const |
Set the pointer of ib to ip. | |
virtual IBPtr | get (const InterfacedBase &ib) const |
Return the pointer of ib. | |
virtual bool | check (const InterfacedBase &ib, cIBPtr newRef) const |
Check if set(ib, ip) will be successfull but do not do anything. | |
void | setSetFunction (SetFn sf) |
Give a pointer to a member function to be used by 'set()'. | |
void | setGetFunction (GetFn gf) |
Give a pointer to a member function to be used by 'get()'. | |
void | setCheckFunction (CheckFn cf) |
Give a pointer to a member function to be used by 'check()'. | |
Private Attributes | |
Member | theMember |
The pointer to the member variable. | |
SetFn | theSetFn |
A pointer to a member function to be used by 'set()'. | |
GetFn | theGetFn |
Give a pointer to a member function to be used by 'get()'. | |
CheckFn | theCheckFn |
Give a pointer to a member function to be used by 'check()'. |
Reference is templated on the type of the class and the class of the objects pointed to, and is derived from the InterfaceBase class via ReferenceBase and RefInterfaceBase.
For each InterfacedBase class exactly one static Reference object should created for each member variable which should be interfaced. This object will automatically register itself with the BaseRepository class.
Definition at line 162 of file Reference.h.
typedef Ptr<R>::pointer ThePEG::Reference< T, R >::RefPtr |
typedef Ptr<R>::const_pointer ThePEG::Reference< T, R >::cRefPtr |
typedef void(T::* ThePEG::Reference< T, R >::SetFn)(RefPtr) |
A pointer to a menberfunction to be used for the 'set' action.
typedef bool(T::* ThePEG::Reference< T, R >::CheckFn)(cRefPtr) const |
A pointer to a menberfunction to be used for the 'check' action.
typedef RefPtr(T::* ThePEG::Reference< T, R >::GetFn)() const |
A pointer to a menberfunction to be used for the 'get' action.
typedef RefPtr T::* ThePEG::Reference< T, R >::Member |
ThePEG::Reference< T, R >::Reference | ( | string | newName, | |
string | newDescription, | |||
Member | newMember, | |||
bool | depSafe = false , |
|||
bool | readonly = false , |
|||
bool | rebind = true , |
|||
bool | nullable = true , |
|||
SetFn | newSetFn = 0 , |
|||
GetFn | newGetFn = 0 , |
|||
CheckFn | newCheckFn = 0 | |||
) | [inline] |
Standard constructor.
newName | the name of the interface, may only contain letters [a-zA-z0-9_]. | |
newDescription | a brief description of the interface. | |
newMember | a pointer to a Member which is a TypeVector. May be null, in which case the pointers to member functions must be specified. | |
depSafe | set to true if calls to this interface for one object does not influence other objects. | |
readonly | if this is set true the interface will not be able to manipulate objects of the corresponding class, but will still be able to access information. | |
rebind | if set to true, this interface is responsible for the rebinding of corresponding objects. | |
nullable | if set to true this corresponding references may be null. | |
newSetFn | optional pointer to member function for the 'set' action. | |
newGetFn | optional pointer to member function for the 'get' action. | |
newCheckFn | optional pointer to member function for the 'check' action. |
Definition at line 215 of file Reference.h.
ThePEG::Reference< T, R >::Reference | ( | string | newName, | |
string | newDescription, | |||
Member | newMember, | |||
bool | depSafe, | |||
bool | readonly, | |||
bool | rebind, | |||
bool | nullable, | |||
bool | defnull, | |||
SetFn | newSetFn = 0 , |
|||
GetFn | newGetFn = 0 , |
|||
CheckFn | newCheckFn = 0 | |||
) | [inline] |
Standard constructor.
newName | the name of the interface, may only contain letters [a-zA-z0-9_]. | |
newDescription | a brief description of the interface. | |
newMember | a pointer to a Member which is a TypeVector. May be null, in which case the pointers to member functions must be specified. | |
depSafe | set to true if calls to this interface for one object does not influence other objects. | |
readonly | if this is set true the interface will not be able to manipulate objects of the corresponding class, but will still be able to access information. | |
rebind | if set to true, this interface is responsible for the rebinding of corresponding objects. | |
nullable | if set to true this corresponding references may be null. | |
defnull | if set to true and a corresponding reference is null it may be given a a default value in the initialization of an EventGenerator. | |
newSetFn | optional pointer to member function for the 'set' action. | |
newGetFn | optional pointer to member function for the 'get' action. | |
newCheckFn | optional pointer to member function for the 'check' action. |
Definition at line 265 of file Reference.h.