+/*------------------------- [ ActorIDTrait ] -------------------------*/
+class XBT_PUBLIC ActorIDTrait {
+ std::string name_;
+ aid_t pid_ = 0;
+ aid_t ppid_ = -1;
+
+ static unsigned long maxpid_;
+
+public:
+ explicit ActorIDTrait(const std::string& name, aid_t ppid);
+ const std::string& get_name() const { return name_; }
+ const char* get_cname() const { return name_.c_str(); }
+ aid_t get_pid() const { return pid_; }
+ aid_t get_ppid() const { return ppid_; }
+
+ static unsigned long get_maxpid() { return maxpid_; }
+ // In MC mode, the application sends this pointer to the MC
+ static unsigned long* get_maxpid_addr() { return &maxpid_; }
+};
+
+/*------------------------- [ ActorRestartingTrait ] -------------------------*/
+class XBT_PUBLIC ActorRestartingTrait {
+ bool auto_restart_ = false;
+ int restart_count_ = 0;
+
+ friend ActorImpl;
+
+public:
+ bool has_to_auto_restart() const { return auto_restart_; }
+ void set_auto_restart(bool autorestart) { auto_restart_ = autorestart; }
+ int get_restart_count() const { return restart_count_; }
+};
+
+/*------------------------- [ ActorImpl ] -------------------------*/
+class XBT_PUBLIC ActorImpl : public xbt::PropertyHolder, public ActorIDTrait, public ActorRestartingTrait {