SIMenv Class Reference

Global class exposing the current SimRunner throughout the code. More...

#include <simenv.h>

Collaboration diagram for SIMenv:

Collaboration graph
[legend]

List of all members.

Static Public Member Functions

static void loadDefaultComponents (SimRunner *sim)
static SimRunnersetMainSim (Metapop *pop)
static SimRunnergetNewSimulation ()
static void setMainSim (SimRunner *sim)
static unsigned int getCurrentGeneration ()
static unsigned int getGenerations ()
static unsigned int getCurrentReplicate ()
static unsigned int getReplicates ()

Static Public Attributes

static SimRunnerMainSim = NULL

Private Member Functions

 SIMenv ()


Detailed Description

Global class exposing the current SimRunner throughout the code.

Definition at line 36 of file simenv.h.


Constructor & Destructor Documentation

SIMenv::SIMenv (  )  [inline, private]

Definition at line 38 of file simenv.h.

00038 {}


Member Function Documentation

static unsigned int SIMenv::getCurrentGeneration (  )  [inline, static]

Definition at line 60 of file simenv.h.

00060 {return MainSim->getCurrentGeneration();}

static unsigned int SIMenv::getCurrentReplicate (  )  [inline, static]

Definition at line 62 of file simenv.h.

Referenced by LCE_StatFH::FHwrite().

00062 {return MainSim->getCurrentReplicate();}

static unsigned int SIMenv::getGenerations (  )  [inline, static]

static SimRunner* SIMenv::getNewSimulation (  )  [inline, static]

Definition at line 52 of file simenv.h.

00052                                          {
00053     SimRunner *sim = new SimRunner( new Metapop() );
00054     loadDefaultComponents( sim );
00055     return sim;
00056   }

static unsigned int SIMenv::getReplicates (  )  [inline, static]

Definition at line 63 of file simenv.h.

Referenced by LCE_StatFH::FHwrite().

00063 {return MainSim->getReplicates();}

void SIMenv::loadDefaultComponents ( SimRunner sim  )  [static]

Definition at line 50 of file simenv.cc.

Referenced by getNewSimulation(), and setMainSim().

00051 {
00052   //add TraitPrototype
00053   sim->add_trait(new TProtoDispersal(FEM));
00054   sim->add_trait(new TProtoDispersal(MAL));
00055   sim->add_trait(new TProtoNeutralGenes());
00056   sim->add_trait(new TProtoDeletMutations_bitstring());
00057   sim->add_trait(new TProtoWolbachia());
00058   
00059   //add LifeCycleEvents  
00060   sim->add_LCE(new BinaryDataSaver());
00061   sim->add_LCE(new LCE_StatServiceNotifier());
00062   sim->add_LCE(new LCE_FileServicesNotifier());
00063   sim->add_LCE(new LCE_Regulation());
00064   sim->add_LCE(new LCE_Aging());
00065   sim->add_LCE(new LCE_Patch_Extinction());
00066   sim->add_LCE(new LCE_Breed());
00067   sim->add_LCE(new LCE_Breed_Selection());
00068   sim->add_LCE(new LCE_Breed_Disperse());
00069   sim->add_LCE(new LCE_Breed_Selection_Disperse());
00070   sim->add_LCE(new LCE_Breed_Wolbachia());
00071   sim->add_LCE(new LCE_Disperse_ConstDisp());
00072   sim->add_LCE(new LCE_Disperse_EvolDisp());
00073   sim->add_LCE(new LCE_Selection_base());
00074   sim->add_LCE(new LCE_Cross());
00075   sim->add_LCE(new LCE_Resize());
00076   sim->build_allParams();
00077   
00078 }

static void SIMenv::setMainSim ( SimRunner sim  )  [inline, static]

Definition at line 58 of file simenv.h.

00058 {MainSim = sim;}

static SimRunner* SIMenv::setMainSim ( Metapop pop  )  [inline, static]

Definition at line 46 of file simenv.h.

Referenced by main().

00046                                                 {
00047     MainSim = new SimRunner( pop );
00048     loadDefaultComponents( MainSim );
00049     return MainSim;
00050   }


Member Data Documentation

SimRunner * SIMenv::MainSim = NULL [static]


The documentation for this class was generated from the following files:

Generated for Nemo v2.1.2 by  doxygen 1.5.8 -- Nemo is hosted by  SourceForge.net Logo