#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"
Go to the source code of this file.
◆ 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); }
\
Macro to insert required boilerplate code into agent
- Parameters
-
class_name | scalar class name of the agent |
base_class | scalar class name of the base agent |
class_version_id | required 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.