Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
5ca55ab08cb5d3226825ee6ab0911faa96a8819d
[simgrid.git] / src / mc / Variable.hpp
1 /* Copyright (c) 2007-2015. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #ifndef SIMGRID_MC_VARIABLE_HPP
8 #define SIMGRID_MC_VARIABLE_HPP
9
10 #include <string>
11
12 #include <xbt/base.h>
13
14 #include "src/mc/mc_forward.h"
15 #include "src/mc/LocationList.hpp"
16
17 namespace simgrid {
18 namespace mc {
19
20 /** A variable (global or local) in the model-checked program */
21 class Variable {
22 public:
23   Variable();
24
25   unsigned dwarf_offset; /* Global offset of the field. */
26   int global;
27   std::string name;
28   unsigned type_id;
29   simgrid::mc::Type* type;
30
31   // Use either of:
32   simgrid::dwarf::LocationList location_list;
33   void* address;
34
35   size_t start_scope;
36   simgrid::mc::ObjectInformation* object_info;
37 };
38
39 inline
40 Variable::Variable()
41 {
42   this->dwarf_offset = 0;
43   this->global = 0;
44   this->type = nullptr;
45   this->type_id = 0;
46   this->address = nullptr;
47   this->start_scope = 0;
48   this->object_info = nullptr;
49 }
50
51 }
52 }
53
54 #endif