Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Replace surf by surf++ and make it compile
[simgrid.git] / src / include / surf / surf_resource.h
1
2 /* Copyright (c) 2009, 2010. The SimGrid Team.
3  * All rights reserved.                                                     */
4
5 /* This program is free software; you can redistribute it and/or modify it
6  * under the terms of the license (GNU LGPL) which comes with this package. */
7
8 #include "surf/surf.h"
9 #ifndef SURF_RESOURCE_H
10 #define SURF_RESOURCE_H
11
12 /*FIXME:DELETEstatic XBT_INLINE
13     surf_resource_t surf_resource_new(size_t childsize,
14                                       surf_model_t model, const char *name,
15                                       xbt_dict_t props)
16 {
17   surf_resource_t res = xbt_malloc0(childsize);
18   res->model = model;
19   res->name = xbt_strdup(name);
20   res->properties = props;
21   return res;
22 }
23
24 static XBT_INLINE void surf_resource_free(void *r)
25 {
26   surf_resource_t resource = r;
27   free(resource->name);
28   xbt_dict_free(&resource->properties);
29   free(resource);
30 }
31
32 static XBT_INLINE const char *surf_resource_name(const void *resource)
33 {
34   return ((surf_resource_t) resource)->name;
35 }
36
37 static XBT_INLINE xbt_dict_t surf_resource_properties(const void *resource)
38 {
39   return ((surf_resource_t) resource)->properties;
40 }*/
41
42 #endif                          /* SURF_RESOURCE_H */