29 #ifndef LIFECYCLEEVENT_H
30 #define LIFECYCLEEVENT_H
131 return error(
"cannot attach trait \"%s\" to life cycle event \"%s\", trait has not been initiated.\n",
int getTraitIndex(trait_t type)
Gives the index of trait with type.
Definition: indfactory.cc:127
Base class of the Life Cycle Events, declares the LCE interface.
Definition: lifecycleevent.h:72
virtual age_t requiredAgeClass()=0
Specifies what age-classes are required by the LCE to execute.
virtual ~LifeCycleEvent()
Definition: lifecycleevent.h:105
virtual void execute()=0
Execute the event on the pop.
virtual void set_event_name(std::string &name)
Set the name of the event (name of the ParamSet) and add the corresponding parameter to the set.
Definition: lifecycleevent.h:147
virtual bool attach_trait(string trait)
Definition: lifecycleevent.h:122
virtual void set_event_name(const char *name)
Definition: lifecycleevent.h:153
virtual int get_rank()
Accessor to the LCE rank in the life cycle.
Definition: lifecycleevent.h:165
int _LCELinkedTraitIndex
The index in the individual's trait table of the linked trait.
Definition: lifecycleevent.h:88
virtual Metapop * get_pop_ptr()
Definition: lifecycleevent.h:173
virtual age_t removeAgeClass()=0
Removes the returned age-class flag(s) from the current Metapop age-class flags.
virtual void init(Metapop *popPtr)
Sets the pointer to the current Metapop and the trait link if applicable.
Definition: lifecycleevent.h:113
virtual void set_paramset(std::string name, bool required, SimComponent *owner)
Definition: lifecycleevent.h:140
std::string _event_name
The param name to be read in the init file.
Definition: lifecycleevent.h:76
LifeCycleEvent(const char *name, const char *trait_link)
Cstor.
Definition: lifecycleevent.h:97
virtual age_t addAgeClass()=0
Adds the returned age-class flag(s) to the current Metapop age-class flags.
virtual string & get_event_name()
Accessor to the LCE's name.
Definition: lifecycleevent.h:160
virtual void set_pop_ptr(Metapop *popPtr)
Accessors for the population pointer.
Definition: lifecycleevent.h:170
virtual LifeCycleEvent * clone()=0
Cloning interface.
std::string _LCELinkedTraitType
The name of the linked trait.
Definition: lifecycleevent.h:84
Metapop * _popPtr
The ptr to the current Metapop.
Definition: lifecycleevent.h:80
Interface to all basic components of a simulation (traits, life cycle events, pop,...
Definition: simcomponent.h:44
virtual double get_parameter_value(std::string name)
Param value getter.
Definition: simcomponent.h:142
virtual void set_paramset(ParamSet *paramset)
Sets the ParamSet member.
Definition: simcomponent.h:85
virtual void add_parameter(Param *param)
Interface to add a parameter to the set.
Definition: simcomponent.h:111
virtual bool setParameters()=0
Default interface needed to initialize the component's variables from its input parameters value.
void fatal(const char *str,...)
Definition: output.cc:99
int error(const char *str,...)
Definition: output.cc:78
unsigned int age_t
Age class flags.
Definition: types.h:45
@ INT
Definition: types.h:77