BioDynaMo  v1.05.120-25dc9790
Classes | Namespaces | Macros
agent.h File Reference
#include <algorithm>
#include <cassert>
#include <limits>
#include <memory>
#include <set>
#include <sstream>
#include <string>
#include <type_traits>
#include <unordered_map>
#include <vector>
#include "core/agent/agent_pointer.h"
#include "core/agent/agent_uid.h"
#include "core/agent/new_agent_event.h"
#include "core/container/inline_vector.h"
#include "core/container/math_array.h"
#include "core/interaction_force.h"
#include "core/shape.h"
#include "core/util/macros.h"
#include "core/util/root.h"
#include "core/util/spinlock.h"
#include "core/util/type.h"
Include dependency graph for agent.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  bdm::Agent
 Contains code required by all agents. More...
 

Namespaces

 bdm
 

Macros

#define BDM_AGENT_HEADER(class_name, base_class, class_version_id)
 

Macro Definition Documentation

◆ BDM_AGENT_HEADER

#define BDM_AGENT_HEADER (   class_name,
  base_class,
  class_version_id 
)
Value:
public: \
using Base = base_class; \
\
explicit class_name(TRootIOCtor* io_ctor) {} \
\ \
Agent* New() const override { return new class_name(); } \ \
Agent* NewCopy() const override { return new class_name(*this); } \
\
const char* GetTypeName() const override { return #class_name; } \
\
protected: \ \
Base* UpCast() { return static_cast<Base*>(this); } \
\ \
const Base* UpCast() const { return static_cast<const Base*>(this); } \
BDM_CLASS_DEF_OVERRIDE(class_name, class_version_id)

Macro to insert required boilerplate code into agent

Parameters
class_namescalar class name of the agent
base_classscalar class name of the base agent
class_version_idrequired for ROOT I/O (see ROOT BDM_CLASS_DEF Macro). Every time the layout of the class is changed, class_version_id must be incremented by one. The class_version_id should be greater or equal to 1.
...List of all data members of this class

Definition at line 52 of file agent.h.

BDM_CLASS_DEF_OVERRIDE
#define BDM_CLASS_DEF_OVERRIDE(class_name, class_version_id)
Definition: root.h:202