A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tidy some #includes in MC
[simgrid.git]
/
src
/
mc
/
Type.hpp
diff --git
a/src/mc/Type.hpp
b/src/mc/Type.hpp
index
f94d944
..
7bc1464
100644
(file)
--- a/
src/mc/Type.hpp
+++ b/
src/mc/Type.hpp
@@
-1,5
+1,4
@@
-/* Copyright (c) 2007-2015. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2007-2019. 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. */
/* 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. */
@@
-7,12
+6,15
@@
#ifndef SIMGRID_MC_TYPE_HPP
#define SIMGRID_MC_TYPE_HPP
#ifndef SIMGRID_MC_TYPE_HPP
#define SIMGRID_MC_TYPE_HPP
+#include <cstddef>
+
#include <vector>
#include <string>
#include <vector>
#include <string>
-#include <xbt/base.h>
+#include "xbt/asserts.h"
+#include "xbt/base.h"
-#include "src/mc/mc_forward.h"
+#include "src/mc/mc_forward.h
pp
"
#include "src/mc/LocationList.hpp"
namespace simgrid {
#include "src/mc/LocationList.hpp"
namespace simgrid {
@@
-24,10
+26,14
@@
namespace mc {
*/
class Member {
public:
*/
class Member {
public:
- Member() {}
+ typedef int flags_type;
+ static constexpr flags_type INHERITANCE_FLAG = 1;
+ static constexpr flags_type VIRTUAL_POINTER_FLAG = 2;
+
+ Member() = default;
/** Whether this member represent some inherited part of the object */
/** Whether this member represent some inherited part of the object */
-
bool inheritance = false
;
+
flags_type flags = 0
;
/** Name of the member (if any) */
std::string name;
/** Name of the member (if any) */
std::string name;
@@
-40,6
+46,15
@@
public:
unsigned type_id = 0;
simgrid::mc::Type* type = nullptr;
unsigned type_id = 0;
simgrid::mc::Type* type = nullptr;
+ bool isInheritance() const
+ {
+ return this->flags & INHERITANCE_FLAG;
+ }
+ bool isVirtualPointer() const
+ {
+ return this->flags & VIRTUAL_POINTER_FLAG;
+ }
+
/** Whether the member is at a fixed offset from the base address */
bool has_offset_location() const
{
/** Whether the member is at a fixed offset from the base address */
bool has_offset_location() const
{
@@
-78,7
+93,7
@@
public:
/** A type in the model-checked program */
class Type {
public:
/** A type in the model-checked program */
class Type {
public:
- Type()
{}
+ Type()
= default;
/** The DWARF TAG of the type (e.g. DW_TAG_array_type) */
int type = 0;
/** The DWARF TAG of the type (e.g. DW_TAG_array_type) */
int type = 0;