-/* Copyright (c) 2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2016-2017. 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. */
* @endcode
*
*/
-struct SimulationClock {
+class SimulationClock {
+public:
using rep = double;
using period = std::ratio<1>;
using duration = std::chrono::duration<rep, period>;
template<class T>
void bindPromise(Promise<T> promise, Future<T> future)
{
- struct PromiseBinder {
+ class PromiseBinder {
public:
PromiseBinder(Promise<T> promise) : promise_(std::move(promise)) {}
void operator()(Future<T> future)
* the process memory, etc. All those informations are gathered in
* the evaluation context.
*/
-struct ExpressionContext {
+class ExpressionContext {
+public:
ExpressionContext() :
cursor(nullptr), frame_base(nullptr), address_space(nullptr),
object_info(nullptr), process_index(simgrid::mc::ProcessIndexMissing) {}
-/* Copyright (c) 2007-2016. The SimGrid Team.
+/* Copyright (c) 2007-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
namespace simgrid {
namespace mc {
-struct XBT_PRIVATE VisitedState {
+class XBT_PRIVATE VisitedState {
+public:
std::shared_ptr<simgrid::mc::Snapshot> system_state = nullptr;
std::size_t heap_bytes_used = 0;
int actors_count = 0;
-/* Copyright (c) 2007-2015. The SimGrid Team.
+/* Copyright (c) 2007-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
namespace simgrid {
namespace mc {
-struct XBT_PRIVATE Pair {
+class XBT_PRIVATE Pair {
+public:
int num = 0;
bool search_cycle = false;
std::shared_ptr<simgrid::mc::State> graph_state = nullptr; /* System state included */
Pair& operator=(Pair const&) = delete;
};
-struct XBT_PRIVATE VisitedPair {
+class XBT_PRIVATE VisitedPair {
+public:
int num;
int other_num = 0; /* Dot output for */
std::shared_ptr<simgrid::mc::State> graph_state = nullptr; /* System state included */
receive = 2,
};
-struct PatternCommunication {
+class PatternCommunication {
+public:
int num = 0;
simgrid::kernel::activity::CommImpl* comm_addr;
PatternCommunicationType type = PatternCommunicationType::send;
/* A node in the exploration graph (kind-of)
*/
-struct XBT_PRIVATE State {
-
+class XBT_PRIVATE State {
+public:
/** Sequential state number (used for debugging) */
int num = 0;
// ***** ConfigType *****
/// A trait which define possible options types:
-template<class T> struct ConfigType;
+template <class T> class ConfigType;
-template<> struct ConfigType<int> {
+template <> class ConfigType<int> {
+public:
static constexpr const char* type_name = "int";
static inline double parse(const char* value)
{
return parseLong(value);
}
};
-template<> struct ConfigType<double> {
+template <> class ConfigType<double> {
+public:
static constexpr const char* type_name = "double";
static inline double parse(const char* value)
{
return parseDouble(value);
}
};
-template<> struct ConfigType<std::string> {
+template <> class ConfigType<std::string> {
+public:
static constexpr const char* type_name = "string";
static inline std::string parse(const char* value)
{
return std::string(value);
}
};
-template<> struct ConfigType<bool> {
+template <> class ConfigType<bool> {
+public:
static constexpr const char* type_name = "boolean";
static inline bool parse(const char* value)
{