#include "storage_interface.hpp"
#include "surf_private.h"
+#include "xbt/file.h" /* xbt_getline */
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_storage, surf,
"Logging specific to the SURF storage module");
xbt_lib_t storage_type_lib;
int ROUTING_STORAGE_TYPE_LEVEL; //Routing for storage_type level
xbt_dynar_t mount_list = NULL;
-StorageModel *surf_storage_model = NULL;
+simgrid::surf::StorageModel *surf_storage_model = NULL;
+
+namespace simgrid {
+namespace surf {
/*************
* Callbacks *
*************/
-surf_callback(void, Storage*) storageCreatedCallbacks;
-surf_callback(void, Storage*) storageDestructedCallbacks;
-surf_callback(void, Storage*, e_surf_resource_state_t, e_surf_resource_state_t) storageStateChangedCallbacks;
-surf_callback(void, StorageAction*, e_surf_action_state_t, e_surf_action_state_t) storageActionStateChangedCallbacks;
+surf_callback(void, simgrid::surf::Storage*) storageCreatedCallbacks;
+surf_callback(void, simgrid::surf::Storage*) storageDestructedCallbacks;
+surf_callback(void, simgrid::surf::Storage*, e_surf_resource_state_t, e_surf_resource_state_t) storageStateChangedCallbacks;
+surf_callback(void, simgrid::surf::StorageAction*, e_surf_action_state_t, e_surf_action_state_t) storageActionStateChangedCallbacks;
/*********
* Model *
, p_typeId(xbt_strdup(type_id))
, p_writeActions(xbt_dynar_new(sizeof(Action*),NULL))
{
- surf_callback_emit(storageCreatedCallbacks, this);
p_content = parseContent(content_name);
setState(SURF_RESOURCE_ON);
}
, m_size(size), m_usedSize(0)
, p_typeId(xbt_strdup(type_id))
, p_writeActions(xbt_dynar_new(sizeof(Action*),NULL)) {
- surf_callback_emit(storageCreatedCallbacks, this);
p_content = parseContent(content_name);
p_attach = xbt_strdup(attach);
setState(SURF_RESOURCE_ON);
Action::setState(state);
surf_callback_emit(storageActionStateChangedCallbacks, this, old, state);
}
+
+}
+}