Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
public headers should include simgrid in a system-wide way, not a project-wide one
[simgrid.git] / include / simgrid / jedule / jedule_platform.hpp
index 86b134d..1b0c32c 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2010-2012, 2014-2016. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2010-2018. 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. */
@@ -7,17 +6,19 @@
 #ifndef JED_SIMGRID_PLATFORM_H_
 #define JED_SIMGRID_PLATFORM_H_
 
-#include "simgrid_config.h"
-#include "simgrid/forward.h"
-#include "xbt/dynar.h"
+#include <simgrid/forward.h>
+#include <simgrid_config.h>
+#include <xbt/dynar.h>
+
 #include <unordered_map>
 #include <vector>
 #include <string>
-#if HAVE_JEDULE
+
+#if SIMGRID_HAVE_JEDULE
 
 namespace simgrid {
 namespace jedule{
-XBT_PUBLIC_CLASS Container {
+class XBT_PUBLIC Container {
 public:
   Container(std::string name);
   virtual ~Container();
@@ -32,14 +33,14 @@ public:
   std::vector<sg_host_t> resource_list;
   void addChild(Container* child);
   void addResources(std::vector<sg_host_t> hosts);
-  void createHierarchy(NetZone_t from_as);
+  void createHierarchy(sg_netzone_t from_as);
   std::vector<int> getHierarchy();
   std::string getHierarchyAsString();
   void print(FILE *file);
   void printResources(FILE *file);
 };
 
-XBT_PUBLIC_CLASS Subset {
+class XBT_PUBLIC Subset {
 public:
   Subset(int s, int n, Container* p);
   virtual ~Subset()=default;
@@ -50,12 +51,11 @@ public:
 
 }
 }
-SG_BEGIN_DECL()
+extern "C" {
 typedef simgrid::jedule::Container * jed_container_t;
 typedef simgrid::jedule::Subset * jed_subset_t;
 void get_resource_selection_by_hosts(std::vector<jed_subset_t>* subset_list, std::vector<sg_host_t> *host_list);
-
-SG_END_DECL()
+}
 
 #endif