Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
simplication and uniformization
[simgrid.git] / src / include / surf / surf.hpp
index 58e3a95..db629cc 100644 (file)
@@ -7,39 +7,7 @@
 #define SURF_SURF_H
 
 #include "simgrid/forward.h"
-#include "src/internal_config.h"
-#include "xbt/config.h"
-#include "xbt/dict.h"
-#include "xbt/dynar.h"
 #include "xbt/graph.h"
-#include "xbt/misc.h"
-
-#ifndef __cplusplus
-#error This is a C++ only file, now
-#endif
-
-namespace simgrid {
-namespace surf {
-class CpuModel;
-class HostModel;
-class NetworkModel;
-class StorageModel;
-class NetworkCm02Link;
-}
-}
-
-/** @ingroup SURF_c_bindings
- *  \brief Model datatype
- *
- *  Generic data structure for a model. The hosts,
- *  the CPUs and the network links are examples of models.
- */
-typedef simgrid::surf::CpuModel* surf_cpu_model_t;
-typedef simgrid::surf::HostModel* surf_host_model_t;
-typedef simgrid::surf::NetworkModel* surf_network_model_t;
-typedef simgrid::surf::StorageModel* surf_storage_model_t;
-
-/* Actions and models are highly connected structures... */
 
 /** \brief Resource model description
  */
@@ -103,12 +71,12 @@ XBT_PUBLIC void surf_cpu_action_set_bound(simgrid::kernel::resource::Action* act
 /** \ingroup SURF_models
  *  \brief The CPU model object for the physical machine layer
  */
-XBT_PUBLIC_DATA surf_cpu_model_t surf_cpu_model_pm;
+XBT_PUBLIC_DATA simgrid::surf::CpuModel* surf_cpu_model_pm;
 
 /** \ingroup SURF_models
  *  \brief The CPU model object for the virtual machine layer
  */
-XBT_PUBLIC_DATA surf_cpu_model_t surf_cpu_model_vm;
+XBT_PUBLIC_DATA simgrid::surf::CpuModel* surf_cpu_model_vm;
 
 /** \ingroup SURF_models
  *  \brief Initializes the CPU model with the model Cas01
@@ -144,14 +112,6 @@ XBT_PUBLIC_DATA s_surf_model_description_t surf_plugin_description[];
  */
 XBT_PUBLIC_DATA s_surf_model_description_t surf_cpu_model_description[];
 
-/** \ingroup SURF_models
- *  \brief The network model
- *
- *  When creating a new API on top on SURF, you shouldn't use the network model unless you know what you are doing.
- *  Only the host model should be accessed because depending on the platform model, the network model can be NULL.
- */
-XBT_PUBLIC_DATA surf_network_model_t surf_network_model;
-
 /** \ingroup SURF_models
  *  \brief Same as network model 'LagrangeVelho', only with different correction factors.
  *
@@ -267,7 +227,7 @@ XBT_PUBLIC void surf_storage_model_init_default();
  */
 XBT_PUBLIC_DATA s_surf_model_description_t surf_storage_model_description[];
 
-XBT_PUBLIC_DATA surf_storage_model_t surf_storage_model;
+XBT_PUBLIC_DATA simgrid::surf::StorageModel* surf_storage_model;
 
 /** \ingroup SURF_models
  *  \brief The host model
@@ -275,7 +235,7 @@ XBT_PUBLIC_DATA surf_storage_model_t surf_storage_model;
  *  Note that when you create an API on top of SURF, the host model should be the only one you use
  *  because depending on the platform model, the network model and the CPU model may not exist.
  */
-XBT_PUBLIC_DATA surf_host_model_t surf_host_model;
+XBT_PUBLIC_DATA simgrid::surf::HostModel* surf_host_model;
 
 /** \ingroup SURF_models
  *  \brief Initializes the platform with a compound host model
@@ -372,7 +332,6 @@ XBT_PUBLIC void parse_platform_file(const char* file);
 /********** Tracing **********/
 
 /* instr_routing.c */
-void instr_routing_define_callbacks();
 xbt_graph_t instr_routing_platform_graph();
 void instr_routing_platform_graph_export_graphviz(xbt_graph_t g, const char* filename);