-/* Copyright (c) 2010-2018. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2010-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. */
namespace jedule{
class XBT_PUBLIC Container {
public:
- explicit Container(std::string name);
+ explicit Container(const std::string& name);
+ Container(const Container&) = delete;
+ Container& operator=(const Container&) = delete;
virtual ~Container();
private:
- int last_id;
- int is_lowest = 0;
+ int last_id_;
+ int is_lowest_ = 0;
+
public:
std::string name;
std::unordered_map<const char*, unsigned int> name2id;
Container *parent = nullptr;
std::vector<Container*> children;
std::vector<sg_host_t> resource_list;
- void addChild(Container* child);
- void addResources(std::vector<sg_host_t> hosts);
- void createHierarchy(sg_netzone_t from_as);
- std::vector<int> getHierarchy();
- std::string getHierarchyAsString();
+ void add_child(Container* child);
+ void add_resources(std::vector<sg_host_t> hosts);
+ void create_hierarchy(sg_netzone_t from_as);
+ std::vector<int> get_hierarchy();
+ std::string get_hierarchy_as_string();
void print(FILE *file);
- void printResources(FILE *file);
+ void print_resources(FILE* file);
};
class XBT_PUBLIC Subset {