Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill models getName() call sites.
[simgrid.git] / src / include / surf / surf.h
index 32dc7ad..15b1b8e 100644 (file)
@@ -56,7 +56,6 @@ class ResourceLmm;
 class Host;
 class HostCLM03;
 class NetworkCm02Link;
-class Cpu;
 class Action;
 class ActionLmm;
 class StorageActionLmm;
@@ -75,7 +74,6 @@ typedef struct ResourceLmm ResourceLmm;
 typedef struct HostCLM03 HostCLM03;
 typedef struct Host Host;
 typedef struct NetworkCm02Link NetworkCm02Link;
-typedef struct Cpu Cpu;
 typedef struct Action Action;
 typedef struct ActionLmm ActionLmm;
 typedef struct StorageActionLmm StorageActionLmm;
@@ -101,9 +99,6 @@ typedef StorageModel *surf_storage_model_t;
 typedef xbt_dictelm_t surf_resource_t;
 typedef Resource *surf_cpp_resource_t;
 typedef Host *surf_host_t;
-typedef HostCLM03 *surf_host_CLM03_t;
-typedef NetworkCm02Link *surf_network_link_t;
-typedef Cpu *surf_cpu_t;
 
 /** @ingroup SURF_c_bindings
  *  \brief Action structure
@@ -163,8 +158,7 @@ typedef enum {
   SURF_ACTION_FAILED,           /**< Task Failure */
   SURF_ACTION_DONE,             /**< Completed    */
   SURF_ACTION_TO_FREE,          /**< Action to free in next cleanup */
-  SURF_ACTION_NOT_IN_THE_SYSTEM
-                                /**< Not in the system anymore. Why did you ask ? */
+  SURF_ACTION_NOT_IN_THE_SYSTEM /**< Not in the system anymore. Why did you ask ? */
 } e_surf_action_state_t;
 
 /** @ingroup SURF_vm_interface
@@ -188,41 +182,25 @@ typedef enum {
 
 XBT_PUBLIC_DATA(routing_platf_t) routing_platf;
 
-static inline surf_cpu_t surf_cpu_resource_priv(const void *host) {
-  return (surf_cpu_t)xbt_lib_get_level((xbt_dictelm_t)host, SURF_CPU_LEVEL);
-}
 static inline surf_host_t surf_host_resource_priv(const void *host){
   return (surf_host_t) xbt_lib_get_level((xbt_dictelm_t)host, SURF_HOST_LEVEL);
 }
-static inline void *surf_routing_resource_priv(const void *host){
-  return (void*)xbt_lib_get_level((xbt_dictelm_t)host, ROUTING_HOST_LEVEL);
-}
 static inline void *surf_storage_resource_priv(const void *storage){
   return (void*)xbt_lib_get_level((xbt_dictelm_t)storage, SURF_STORAGE_LEVEL);
 }
 
-static inline void *surf_cpu_resource_by_name(const char *name) {
-  return xbt_lib_get_elm_or_null(host_lib, name);
-}
-static inline void *surf_host_resource_by_name(const char *name){
-  return xbt_lib_get_elm_or_null(host_lib, name);
-}
 static inline void *surf_storage_resource_by_name(const char *name){
   return xbt_lib_get_elm_or_null(storage_lib, name);
 }
 
-
-XBT_PUBLIC(char *) surf_routing_edge_name(sg_routing_edge_t edge);
 XBT_PUBLIC(void *) surf_as_cluster_get_backbone(AS_t as);
 XBT_PUBLIC(void) surf_as_cluster_set_backbone(AS_t as, void* backbone);
 
 /** @{ @ingroup SURF_c_bindings */
 
-/**
- * @brief Get the name of a surf model
+/** @brief Get the name of a surf model (dont rely on exact value)
  *
- * @param model A model
- * @return The name of the model
+ * This is implemented using typeid(), so it may change with the compiler
  */
 XBT_PUBLIC(const char *) surf_model_name(surf_model_t model);
 
@@ -724,31 +702,6 @@ XBT_PUBLIC(int) surf_host_file_seek(surf_resource_t host,
                                            surf_file_t fd, sg_offset_t offset,
                                            int origin);
 
-/**
- * @brief [brief description]
- * @details [long description]
- *
- * @param link [description]
- * @return [description]
- */
-XBT_PUBLIC(int) surf_network_link_is_shared(surf_cpp_resource_t link);
-
-/**
- * @brief Get the bandwidth of a link in bytes per second
- *
- * @param link The surf link
- * @return The bandwidth in bytes per second
- */
-XBT_PUBLIC(double) surf_network_link_get_bandwidth(surf_cpp_resource_t link);
-
-/**
- * @brief Get the latency of a link in seconds
- *
- * @param link The surf link
- * @return The latency in seconds
- */
-XBT_PUBLIC(double) surf_network_link_get_latency(surf_cpp_resource_t link);
-
 /**
  * @brief Get the content of a storage
  *