-/* Copyright (c) 2016-2018. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2016-2019. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <simgrid/forward.h>
#include <simgrid/s4u/NetZone.hpp>
+#include <xbt/PropertyHolder.hpp>
#include <xbt/graph.h>
#include <map>
* called Autonomous Systems in this article).
*
*/
-class XBT_PUBLIC NetZoneImpl {
- friend simgrid::kernel::EngineImpl; // it destroys netRoot_
+class XBT_PUBLIC NetZoneImpl : public xbt::PropertyHolder {
+ friend EngineImpl; // it destroys netRoot_
protected:
- explicit NetZoneImpl(NetZoneImpl* father, std::string name);
+ explicit NetZoneImpl(NetZoneImpl* father, const std::string& name, resource::NetworkModel* network_model);
+ NetZoneImpl(const NetZoneImpl&) = delete;
+ NetZoneImpl& operator=(const NetZoneImpl&) = delete;
virtual ~NetZoneImpl();
- s4u::NetZone piface_;
-
public:
s4u::NetZone* get_iface() { return &piface_; }
- /** @brief Make an host within that NetZone */
- simgrid::s4u::Host* create_host(const char* name, std::vector<double>* speed_per_pstate, int core_count,
- std::map<std::string, std::string>* props);
+ /** @brief Make a host within that NetZone */
+ s4u::Host* create_host(const std::string& name, const std::vector<double>& speed_per_pstate, int core_count,
+ const std::map<std::string, std::string>* props);
/** @brief Creates a new route in this NetZone */
virtual void add_bypass_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
std::vector<resource::LinkImpl*>& link_list, bool symmetrical);
bool get_bypass_route(routing::NetPoint* src, routing::NetPoint* dst,
/* OUT */ std::vector<resource::LinkImpl*>& links, double* latency);
+public:
+ resource::NetworkModel* network_model_;
+
private:
+ s4u::NetZone piface_;
+
// our content, as known to our graph routing algorithm (maps vertex_id -> vertex)
std::vector<kernel::routing::NetPoint*> vertices_;
};
} // namespace routing
} // namespace kernel
-}; // namespace simgrid
+} // namespace simgrid
#endif /* SIMGRID_ROUTING_NETZONEIMPL_HPP */