cppyabm  1.0.17
An agent-based library to integrate C++ and Python
Public Types | Public Member Functions | Public Attributes | List of all members
Cell Struct Reference

#include <cpp_example.h>

Inheritance diagram for Cell:
Agent< Domain, Cell, Tissue >

Public Types

using baseAgent = Agent< Domain, Cell, Tissue >
 

Public Member Functions

 Cell (shared_ptr< Domain > env, std::string agent_name)
 
void update ()
 To define inheritage. More...
 
virtual void step ()
 
virtual void setup ()
 
 Cell (shared_ptr< Domain > env, std::string agent_name)
 
void update ()
 To define inheritage. More...
 
virtual void step ()
 
virtual void setup ()
 
- Public Member Functions inherited from Agent< Domain, Cell, Tissue >
 Agent (shared_ptr< Domain > env, string class_name)
 
 Agent (shared_ptr< Domain > env, string class_name)
 
virtual ~Agent ()
 
virtual ~Agent ()
 
virtual void inherit (shared_ptr< Cell > father)
 To define agent behavior. More...
 
virtual void inherit (shared_ptr< Cell > father)
 To define agent behavior. More...
 
void move (shared_ptr< Tissue > dest, bool quiet=false)
 Moves the agent to the given destination patch. More...
 
void move (shared_ptr< Tissue > dest, bool quiet=false)
 Moves the agent to the given destination patch. More...
 
void order_hatch (shared_ptr< Tissue > patch=nullptr, bool inherit=false, bool quiet=false, bool reset=false)
 Orders agent to hatch. This will execute during Env::update. More...
 
void order_hatch (shared_ptr< Tissue > patch=nullptr, bool inherit=false, bool quiet=false, bool reset=false)
 Orders agent to hatch. This will execute during Env::update. More...
 
void order_move (shared_ptr< Tissue > patch=nullptr, bool quiet=false, bool reset=false)
 Orders agent to move. This will execute during Env::update. More...
 
void order_move (shared_ptr< Tissue > patch=nullptr, bool quiet=false, bool reset=false)
 Orders agent to move. This will execute during Env::update. More...
 
void order_switch (string to)
 
void order_switch (string to)
 
void reset_hatch ()
 Orders agent to switch to another agent. This will execute during Env::update. More...
 
void reset_hatch ()
 Orders agent to switch to another agent. This will execute during Env::update. More...
 
void reset_move ()
 
void reset_move ()
 
void reset_switch ()
 
void reset_switch ()
 

Public Attributes

int cycle_t
 
int clock = 0
 
- Public Attributes inherited from Agent< Domain, Cell, Tissue >
std::pair< bool, std::string > switch_info
 
HATCH_CONFIG< Domain, Cell, Tissue_hatch
 
MOVE_CONFIG< Domain, Cell, Tissue_move
 
SWITCH_CONFIG _switch
 
std::shared_ptr< Tissuepatch
 Pointer to the residing patch. More...
 
std::shared_ptr< Domainenv
 Pointer to the simulation world. More...
 
bool disappear
 if set to true, the agent will be removed from the simulation. This will execute during Env::update More...
 
string class_name
 Unique ID of this class. More...
 
bool has_patch
 Indicates if an agent residing on a patch. More...
 

Detailed Description

Definition at line 46 of file cpp_example.h.

Member Typedef Documentation

◆ baseAgent

Definition at line 49 of file cpp_example.h.

Constructor & Destructor Documentation

◆ Cell() [1/2]

Cell::Cell ( shared_ptr< Domain env,
std::string  agent_name 
)
inline

Definition at line 47 of file cpp_example.h.

◆ Cell() [2/2]

Cell::Cell ( shared_ptr< Domain env,
std::string  agent_name 
)
inline

Definition at line 51 of file cpp_example.h.

Member Function Documentation

◆ setup() [1/2]

virtual void Cell::setup ( )
inlinevirtual

Definition at line 54 of file cpp_example.h.

◆ setup() [2/2]

virtual void Cell::setup ( )
inlinevirtual

Definition at line 58 of file cpp_example.h.

◆ step() [1/2]

void Cell::step ( )
inlinevirtual

Reimplemented from Agent< Domain, Cell, Tissue >.

Definition at line 113 of file cpp_example.h.

◆ step() [2/2]

virtual void Cell::step ( )
virtual

Reimplemented from Agent< Domain, Cell, Tissue >.

◆ update() [1/2]

void Cell::update ( )
inlinevirtual

To define inheritage.

Reimplemented from Agent< Domain, Cell, Tissue >.

Definition at line 50 of file cpp_example.h.

◆ update() [2/2]

void Cell::update ( )
inlinevirtual

To define inheritage.

Reimplemented from Agent< Domain, Cell, Tissue >.

Definition at line 54 of file cpp_example.h.

Member Data Documentation

◆ clock

int Cell::clock = 0

Definition at line 58 of file cpp_example.h.

◆ cycle_t

int Cell::cycle_t

Definition at line 57 of file cpp_example.h.


The documentation for this struct was generated from the following file: