30#ifndef LIFECYCLEEVENT_H
31#define LIFECYCLEEVENT_H
132 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:128
Base class of the Life Cycle Events, declares the LCE interface.
Definition: lifecycleevent.h:73
virtual age_t requiredAgeClass()=0
Specifies what age-classes are required by the LCE to execute.
virtual ~LifeCycleEvent()
Definition: lifecycleevent.h:106
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:148
virtual bool attach_trait(string trait)
Definition: lifecycleevent.h:123
virtual void set_event_name(const char *name)
Definition: lifecycleevent.h:154
virtual int get_rank()
Accessor to the LCE rank in the life cycle.
Definition: lifecycleevent.h:166
int _LCELinkedTraitIndex
The index in the individual's trait table of the linked trait.
Definition: lifecycleevent.h:89
virtual string & get_event_name()
Accessor to the LCE's name.
Definition: lifecycleevent.h:161
virtual Metapop * get_pop_ptr()
Definition: lifecycleevent.h:174
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:114
virtual void set_paramset(std::string name, bool required, SimComponent *owner)
Definition: lifecycleevent.h:141
std::string _event_name
The param name to be read in the init file.
Definition: lifecycleevent.h:77
LifeCycleEvent(const char *name, const char *trait_link)
Cstor.
Definition: lifecycleevent.h:98
virtual age_t addAgeClass()=0
Adds the returned age-class flag(s) to the current Metapop age-class flags.
virtual LifeCycleEvent * clone()=0
Cloning interface.
virtual void set_pop_ptr(Metapop *popPtr)
Accessors for the population pointer.
Definition: lifecycleevent.h:171
std::string _LCELinkedTraitType
The name of the linked trait.
Definition: lifecycleevent.h:85
Metapop * _popPtr
The ptr to the current Metapop.
Definition: lifecycleevent.h:81
Interface to all basic components of a simulation (traits, life cycle events, pop,...
Definition: simcomponent.h:45
virtual double get_parameter_value(std::string name)
Param value getter.
Definition: simcomponent.h:143
virtual void set_paramset(ParamSet *paramset)
Sets the ParamSet member.
Definition: simcomponent.h:86
virtual void add_parameter(Param *param)
Interface to add a parameter to the set.
Definition: simcomponent.h:112
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:96
int error(const char *str,...)
Definition: output.cc:77
unsigned int age_t
Age class flags.
Definition: types.h:46
@ INT
Definition: types.h:78