class XBT_PUBLIC ImpossibleError : public std::logic_error {
public:
explicit ImpossibleError(const std::string& arg) : std::logic_error(arg) {}
- ~ImpossibleError();
+ ~ImpossibleError() override;
};
class XBT_PUBLIC InitializationError : public std::logic_error {
public:
explicit InitializationError(const std::string& arg) : std::logic_error(arg) {}
- ~InitializationError();
+ ~InitializationError() override;
};
class XBT_PUBLIC UnimplementedError : public std::logic_error {
public:
explicit UnimplementedError(const std::string& arg) : std::logic_error(arg) {}
- ~UnimplementedError();
+ ~UnimplementedError() override;
};
} // namespace xbt
}
Exception(const Exception&) = default;
Exception(Exception&&) noexcept = default;
- ~Exception(); // DO NOT define it here -- see Exception.cpp for a rationale
+ ~Exception() override; // DO NOT define it here -- see Exception.cpp for a rationale
/** Return the information about where the exception was thrown */
xbt::ThrowPoint const& throw_point() const { return throwpoint_; }
}
TimeoutException(const TimeoutException&) = default;
TimeoutException(TimeoutException&&) noexcept = default;
- ~TimeoutException();
+ ~TimeoutException() override;
};
XBT_ATTRIB_DEPRECATED_v328("Please use simgrid::TimeoutException") typedef TimeoutException TimeoutError;
}
HostFailureException(const HostFailureException&) = default;
HostFailureException(HostFailureException&&) noexcept = default;
- ~HostFailureException();
+ ~HostFailureException() override;
};
/** Exception raised when a communication fails because of the network or because of the remote host */
}
NetworkFailureException(const NetworkFailureException&) = default;
NetworkFailureException(NetworkFailureException&&) noexcept = default;
- ~NetworkFailureException();
+ ~NetworkFailureException() override;
};
/** Exception raised when a storage fails */
}
StorageFailureException(const StorageFailureException&) = default;
StorageFailureException(StorageFailureException&&) noexcept = default;
- ~StorageFailureException();
+ ~StorageFailureException() override;
};
/** Exception raised when a VM fails */
}
VmFailureException(const VmFailureException&) = default;
VmFailureException(VmFailureException&&) noexcept = default;
- ~VmFailureException();
+ ~VmFailureException() override;
};
/** Exception raised when something got canceled before completion */
}
CancelException(const CancelException&) = default;
CancelException(CancelException&&) noexcept = default;
- ~CancelException();
+ ~CancelException() override;
};
/** Exception raised when something is going wrong during the simulation tracing */
}
TracingError(const TracingError&) = default;
TracingError(TracingError&&) noexcept = default;
- ~TracingError();
+ ~TracingError() override;
};
/** Exception raised when something is going wrong during the parsing of XML files */
}
ParseError(const ParseError&) = default;
ParseError(ParseError&&) noexcept = default;
- ~ParseError();
+ ~ParseError() override;
};
class XBT_PUBLIC ForcefulKillException {
explicit WifiZone(NetZoneImpl* father, const std::string& name, resource::NetworkModel* netmodel);
WifiZone(const WifiZone&) = delete;
WifiZone& operator=(const WifiZone) = delete;
- ~WifiZone() = default;
+ ~WifiZone() override = default;
void seal() override;
void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
friend Mailbox; // Factory of comms
#endif
- virtual ~Comm();
+ ~Comm() override;
static xbt::signal<void(Actor const&)> on_sender_start;
static xbt::signal<void(Actor const&)> on_receiver_start;
public:
Exec();
- virtual ~Exec() = default;
+ ~Exec() override = default;
#ifndef DOXYGEN
Exec(Exec const&) = delete;
Exec& operator=(Exec const&) = delete;
friend Storage; // Factory of IOs
#endif
- ~Io() = default;
+ ~Io() override = default;
Io* start() override;
Io* wait() override;
*/
class XBT_PUBLIC VirtualMachine : public s4u::Host {
vm::VirtualMachineImpl* const pimpl_vm_;
- virtual ~VirtualMachine();
+ ~VirtualMachine() override;
public:
explicit VirtualMachine(const std::string& name, Host* physical_host, int core_amount);
friend class Extendable<T>;
explicit constexpr Extension(std::size_t id) : id_(id) {}
public:
- explicit constexpr Extension() {}
+ explicit constexpr Extension() = default;
std::size_t id() const { return id_; }
bool valid() const { return id_ != INVALID_ID; }
};
{
return Extension<T, U>(extension_create([](void* p) { delete static_cast<U*>(p); }));
}
- Extendable() {}
+ Extendable() = default;
Extendable(const Extendable&) = delete;
Extendable& operator=(const Extendable&) = delete;
~Extendable()
}
public:
- Task() { /* Nothing to do */}
+ Task() = default;
explicit Task(std::nullptr_t) { /* Nothing to do */}
~Task()
{
public:
static xbt::signal<void(StateEvent&)> on_destruction;
StateEvent(Container* container, Type* type, e_event_type event_type, EntityValue* value, TIData* extra);
- ~StateEvent() { on_destruction(*this); }
+ ~StateEvent() override { on_destruction(*this); }
bool has_extra() const { return extra_ != nullptr; }
void print() override;
};
: Type(event_type, name, alias, "", father){};
ValueType(e_event_type event_type, const std::string& name, Type* father)
: Type(event_type, name, name, "", father){};
- virtual ~ValueType() = default;
+ ~ValueType() override = default;
void add_entity_value(const std::string& name, const std::string& color);
void add_entity_value(const std::string& name);
EntityValue* get_entity_value(const std::string& name);
, send_type(send_type)
, recv_type(recv_type){};
- virtual ~TIData() {}
+ virtual ~TIData() = default;
const std::string& get_name() const { return name_; }
double get_amount() const { return amount_; }
class XBT_PUBLIC ContextFactory {
public:
- explicit ContextFactory() {}
+ explicit ContextFactory() = default;
ContextFactory(const ContextFactory&) = delete;
ContextFactory& operator=(const ContextFactory&) = delete;
virtual ~ContextFactory();
SwappedContext(std::function<void()>&& code, actor::ActorImpl* get_actor, SwappedContextFactory* factory);
SwappedContext(const SwappedContext&) = delete;
SwappedContext& operator=(const SwappedContext&) = delete;
- virtual ~SwappedContext();
+ ~SwappedContext() override;
void suspend() override;
virtual void resume();
DiskModel();
DiskModel(const DiskModel&) = delete;
DiskModel& operator=(const DiskModel&) = delete;
- ~DiskModel();
+ ~DiskModel() override;
virtual DiskImpl* createDisk(const std::string& id, double read_bw, double write_bw) = 0;
};
private:
typedef std::pair<double, Event*> Qelt;
- std::priority_queue<Qelt, std::vector<Qelt>, std::greater<Qelt>> heap_;
+ std::priority_queue<Qelt, std::vector<Qelt>, std::greater<>> heap_;
};
// FIXME: kill that singleton
std::vector<double> cost_arr(nr_nodes); /* link cost from src to other hosts */
pred_arr.resize(nr_nodes); /* predecessors in path from src */
typedef std::pair<double, int> Qelt;
- std::priority_queue<Qelt, std::vector<Qelt>, std::greater<Qelt>> pqueue;
+ std::priority_queue<Qelt, std::vector<Qelt>, std::greater<>> pqueue;
/* initialize */
cost_arr[src_node_id] = 0.0;
constexpr explicit ReadOptions(std::uint32_t value) : value_(value) {}
public:
- constexpr ReadOptions() {}
+ constexpr ReadOptions() = default;
explicit constexpr operator bool() const { return value_ != 0; }
constexpr bool operator!() const { return value_ == 0; }
class XBT_PRIVATE CommunicationDeterminismChecker : public Checker {
public:
explicit CommunicationDeterminismChecker(Session& session);
- ~CommunicationDeterminismChecker();
+ ~CommunicationDeterminismChecker() override;
void run() override;
RecordTrace get_record_trace() override;
std::vector<std::string> get_textual_trace() override;
class XBT_PRIVATE LivenessChecker : public Checker {
public:
explicit LivenessChecker(Session& session);
- ~LivenessChecker() = default;
+ ~LivenessChecker() override = default;
void run() override;
RecordTrace get_record_trace() override;
std::vector<std::string> get_textual_trace() override;
public:
explicit SafetyChecker(Session& session);
- ~SafetyChecker() = default;
+ ~SafetyChecker() override = default;
void run() override;
RecordTrace get_record_trace() override;
std::vector<std::string> get_textual_trace() override;
public:
explicit RemoteSimulation(pid_t pid);
- ~RemoteSimulation();
+ ~RemoteSimulation() override;
void init();
RemoteSimulation(RemoteSimulation const&) = delete;
public:
/* Initialization */
Snapshot(int num_state, RemoteSimulation* get_remote_simulation = &mc_model_checker->get_remote_simulation());
- ~Snapshot() = default;
+ ~Snapshot() override = default;
/* Regular use */
bool on_heap(const void* address) const
static std::deque<s4u::VirtualMachine*> allVms_;
explicit VirtualMachineImpl(s4u::VirtualMachine* piface, s4u::Host* host, int core_amount, size_t ramsize);
- ~VirtualMachineImpl();
+ ~VirtualMachineImpl() override;
virtual void suspend(kernel::actor::ActorImpl* issuer);
virtual void resume();
Datatype(Datatype* datatype, int* ret);
Datatype(const Datatype&) = delete;
Datatype& operator=(const Datatype&) = delete;
- virtual ~Datatype();
+ ~Datatype() override;
char* name() const { return name_; }
size_t size() const { return size_; }
Type_Contiguous(int size, MPI_Aint lb, MPI_Aint ub, int flags, int block_count, MPI_Datatype old_type);
Type_Contiguous(const Type_Contiguous&) = delete;
Type_Contiguous& operator=(const Type_Contiguous&) = delete;
- ~Type_Contiguous();
+ ~Type_Contiguous() override;
int clone(MPI_Datatype* type) override;
void serialize(const void* noncontiguous, void* contiguous, int count) override;
void unserialize(const void* contiguous_vector, void* noncontiguous_vector, int count, MPI_Op op) override;
MPI_Datatype old_type);
Type_Hvector(const Type_Hvector&) = delete;
Type_Hvector& operator=(const Type_Hvector&) = delete;
- ~Type_Hvector();
+ ~Type_Hvector() override;
int clone(MPI_Datatype* type) override;
void serialize(const void* noncontiguous, void* contiguous, int count) override;
void unserialize(const void* contiguous_vector, void* noncontiguous_vector, int count, MPI_Op op) override;
Type_Hindexed(const Type_Hindexed&) = delete;
Type_Hindexed& operator=(const Type_Hindexed&) = delete;
int clone(MPI_Datatype* type) override;
- ~Type_Hindexed();
+ ~Type_Hindexed() override;
void serialize(const void* noncontiguous, void* contiguous, int count) override;
void unserialize(const void* contiguous_vector, void* noncontiguous_vector, int count, MPI_Op op) override;
};
Type_Struct(const Type_Struct&) = delete;
Type_Struct& operator=(const Type_Struct&) = delete;
int clone(MPI_Datatype* type) override;
- ~Type_Struct();
+ ~Type_Struct() override;
void serialize(const void* noncontiguous, void* contiguous, int count) override;
void unserialize(const void* contiguous_vector, void* noncontiguous_vector, int count, MPI_Op op) override;
};
static char* get_key(char* key, int id);
static void delete_lookup();
static std::unordered_map<std::string, F2C*>* lookup();
- F2C() {}
+ F2C() = default;
virtual ~F2C() = default;
//Override these to handle specific values.
File(MPI_Comm comm, const char *filename, int amode, MPI_Info info);
File(const File&) = delete;
File& operator=(const File&) = delete;
- ~File();
+ ~File() override;
int size() const;
int get_position(MPI_Offset* offset) const;
int get_position_shared(MPI_Offset* offset) const;
public:
Info() = default;
explicit Info(const Info* orig) : map_(orig->map_) {}
- ~Info() = default;
+ ~Info() override = default;
void ref();
static void unref(MPI_Info info);
void set(const char* key, const char* value) { map_[key] = value; }
Win(MPI_Info info, MPI_Comm comm) : Win(MPI_BOTTOM, 0, 1, info, comm, 0, 1) {};
Win(const Win&) = delete;
Win& operator=(const Win&) = delete;
- ~Win();
+ ~Win() override;
int attach (void *base, MPI_Aint size);
int detach (const void *base);
void get_name(char* name, int* length) const;
req_storage_t store;
public:
- RequestStorage() {}
- int size() const { return store.size(); }
+ RequestStorage() = default;
+ int size() const { return store.size(); }
- req_storage_t& get_store()
- {
- return store;
- }
+ req_storage_t& get_store() { return store; }
- void get_requests(std::vector<MPI_Request>& vec) const
- {
- for (auto const& pair : store) {
- auto& req = pair.second;
- auto my_proc_id = simgrid::s4u::this_actor::get_pid();
- if (req != MPI_REQUEST_NULL && (req->src() == my_proc_id || req->dst() == my_proc_id)) {
- vec.push_back(pair.second);
- pair.second->print_request("MM");
- }
+ void get_requests(std::vector<MPI_Request>& vec) const
+ {
+ for (auto const& pair : store) {
+ auto& req = pair.second;
+ auto my_proc_id = simgrid::s4u::this_actor::get_pid();
+ if (req != MPI_REQUEST_NULL && (req->src() == my_proc_id || req->dst() == my_proc_id)) {
+ vec.push_back(pair.second);
+ pair.second->print_request("MM");
}
}
+ }
MPI_Request find(int src, int dst, int tag)
{
class MigrateParser : public replay::ActionArgParser {
public:
double memory_consumption;
- void parse(xbt::ReplayAction& action, const std::string&)
+ void parse(xbt::ReplayAction& action, const std::string&) override
{
// The only parameter is the amount of memory used by the current process.
CHECK_ACTION_PARAMS(action, 1, 0);
class MigrateAction : public replay::ReplayAction<smpi::plugin::MigrateParser> {
public:
explicit MigrateAction() : ReplayAction("Migrate") {}
- void kernel(xbt::ReplayAction&)
+ void kernel(xbt::ReplayAction&) override
{
static std::map<s4u::ActorPtr, int> migration_call_counter;
static s4u::Barrier smpilb_bar(smpi_get_universe_size());
StorageModel();
StorageModel(const StorageModel&) = delete;
StorageModel& operator=(const StorageModel&) = delete;
- ~StorageModel();
+ ~StorageModel() override;
virtual StorageImpl* createStorage(std::string& filename, int lineno, const std::string& id,
const std::string& type_id, const std::string& content_name,
CpuTiAction(CpuTi* cpu, double cost);
CpuTiAction(const CpuTiAction&) = delete;
CpuTiAction& operator=(const CpuTiAction&) = delete;
- ~CpuTiAction();
+ ~CpuTiAction() override;
void set_state(Action::State state) override;
void cancel() override;
public:
DiskS19(DiskModel* model, const std::string& name, kernel::lmm::System* maxminSystem, double read_bw,
double write_bw);
- virtual ~DiskS19() = default;
+ ~DiskS19() override = default;
DiskAction* io_start(sg_size_t size, s4u::Io::OpType type) override;
DiskAction* read(sg_size_t size) override;
DiskAction* write(sg_size_t size) override;
class NetworkCm02Model : public NetworkModel {
public:
explicit NetworkCm02Model(lmm::System* (*make_new_sys)(bool) = &lmm::make_new_maxmin_system);
- virtual ~NetworkCm02Model() = default;
+ ~NetworkCm02Model() override = default;
LinkImpl* create_link(const std::string& name, const std::vector<double>& bandwidths, double latency,
s4u::Link::SharingPolicy policy) override;
void update_actions_state_lazy(double now, double delta) override;
public:
NetworkCm02Action(Model* model, s4u::Host& src, s4u::Host& dst, double cost, bool failed)
: NetworkAction(model, src, dst, cost, failed){};
- virtual ~NetworkCm02Action() = default;
+ ~NetworkCm02Action() override = default;
void update_remains_lazy(double now) override;
};
}
class NetworkConstantAction : public NetworkAction {
public:
NetworkConstantAction(NetworkConstantModel* model_, s4u::Host& src, s4u::Host& dst, double size, double latency);
- ~NetworkConstantAction();
+ ~NetworkConstantAction() override;
double initial_latency_;
void update_remains_lazy(double now) override;
};
class NetworkNS3Model : public NetworkModel {
public:
NetworkNS3Model();
- ~NetworkNS3Model() = default;
+ ~NetworkNS3Model() override = default;
LinkImpl* create_link(const std::string& name, const std::vector<double>& bandwidth, double latency,
s4u::Link::SharingPolicy policy) override;
Action* communicate(s4u::Host* src, s4u::Host* dst, double size, double rate) override;
public:
explicit LinkNS3(NetworkNS3Model* model, const std::string& name, double bandwidth, double latency,
s4u::Link::SharingPolicy policy);
- ~LinkNS3();
+ ~LinkNS3() override;
s4u::Link::SharingPolicy sharing_policy_;
void apply_event(profile::Event* event, double value) override;
class XBT_PRIVATE NetworkSmpiModel : public NetworkCm02Model {
public:
NetworkSmpiModel();
- ~NetworkSmpiModel() = default;
+ ~NetworkSmpiModel() override = default;
- double get_latency_factor(double size);
- double get_bandwidth_factor(double size);
- double get_bandwidth_constraint(double rate, double bound, double size);
+ double get_latency_factor(double size) override;
+ double get_bandwidth_factor(double size) override;
+ double get_bandwidth_constraint(double rate, double bound, double size) override;
};
} // namespace resource
} // namespace kernel
CpuL07Model(HostL07Model* hmodel, kernel::lmm::System* sys);
CpuL07Model(const CpuL07Model&) = delete;
CpuL07Model& operator=(const CpuL07Model&) = delete;
- ~CpuL07Model();
+ ~CpuL07Model() override;
kernel::resource::Cpu* create_cpu(s4u::Host* host, const std::vector<double>& speed_per_pstate, int core) override;
HostL07Model *hostModel_;
NetworkL07Model(HostL07Model* hmodel, kernel::lmm::System* sys);
NetworkL07Model(const NetworkL07Model&) = delete;
NetworkL07Model& operator=(const NetworkL07Model&) = delete;
- ~NetworkL07Model();
+ ~NetworkL07Model() override;
kernel::resource::LinkImpl* create_link(const std::string& name, const std::vector<double>& bandwidths,
double latency, s4u::Link::SharingPolicy policy) override;
const double* bytes_amount, double rate);
L07Action(const L07Action&) = delete;
L07Action& operator=(const L07Action&) = delete;
- ~L07Action();
+ ~L07Action() override;
void updateBound();
double get_latency() const { return latency_; }
StorageN11(StorageModel* model, const std::string& name, kernel::lmm::System* maxminSystem, double bread,
double bwrite, const std::string& type_id, const std::string& content_name, sg_size_t size,
const std::string& attach);
- virtual ~StorageN11() = default;
+ ~StorageN11() override = default;
StorageAction* io_start(sg_size_t size, s4u::Io::OpType type) override;
StorageAction* read(sg_size_t size) override;
StorageAction* write(sg_size_t size) override;
TypedConfigurationElement(const std::string& key, const std::string& desc, T value, std::function<void(T&)> callback)
: ConfigurationElement(key, desc), content(std::move(value)), callback(std::move(callback))
{}
- ~TypedConfigurationElement() = default;
+ ~TypedConfigurationElement() override = default;
std::string get_string_value() override;
const char* get_type_name() override;