X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b487d5a9259b88670b8cd97e9c16e4b000c11008..3203ed1f4fb6f4617e94d5351661ba07e8b8f833:/src/mc/mc_forward.h diff --git a/src/mc/mc_forward.h b/src/mc/mc_forward.h index dd74458538..40d9993b0e 100644 --- a/src/mc/mc_forward.h +++ b/src/mc/mc_forward.h @@ -1,19 +1,30 @@ -/* Copyright (c) 2007-2014. The SimGrid Team. +/* Copyright (c) 2007-2015. 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. */ -#ifndef MC_FORWARD_H -#define MC_FORWARD_H +/** \file mc_forward.h + * + * Define type names for pointers of MC objects for the C code + */ -#include +#ifndef SIMGRID_MC_FORWARD_H +#define SIMGRID_MC_FORWARD_H -typedef struct s_mc_object_info s_mc_object_info_t, *mc_object_info_t; -typedef struct s_mc_transition s_mc_transition_t, *mc_transition_t; -typedef struct s_dw_type s_dw_type_t, *dw_type_t; -typedef struct s_memory_map s_memory_map_t, *memory_map_t; -typedef struct s_dw_variable s_dw_variable_t, *dw_variable_t; -typedef struct s_dw_frame s_dw_frame_t, *dw_frame_t; +#ifdef __cplusplus + +// If we're in C++, we give the real definition: +#include "mc_forward.hpp" +typedef simgrid::mc::Snapshot *mc_snapshot_t; +typedef simgrid::mc::Type *mc_type_t; + +#else + +// Otherwise we use dummy opaque structs: +typedef struct _mc_snapshot_t *mc_snapshot_t; +typedef struct _s_mc_type_t *mc_type_t; + +#endif #endif