XBT_EXPORT_NO_IMPORT(type)=type \
XBT_IMPORT_NO_EXPORT(type)=type \
XBT_PUBLIC_DATA(type)="extern type" \
- XBT_PUBLIC_CLASS=class \
XBT_INLINE= \
XBT_PRIVATE=
-/* Copyright (c) 2010-2012, 2014-2017. The SimGrid Team.
+/* Copyright (c) 2010-2012, 2014-2018. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
namespace simgrid {
namespace jedule{
-
-XBT_PUBLIC_CLASS Jedule {
+class XBT_PUBLIC Jedule {
public:
Jedule()=default;
~Jedule();
-/* Copyright (c) 2010-2012, 2014-2017. The SimGrid Team.
+/* Copyright (c) 2010-2012, 2014-2018. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
namespace simgrid {
namespace jedule{
-XBT_PUBLIC_CLASS Event{
- public:
- Event(std::string name, double start_time, double end_time, std::string type);
- ~Event();
- void addCharacteristic(char *characteristic);
- void addResources(std::vector<sg_host_t> *host_selection);
- void addInfo(char *key, char *value);
- void print(FILE *file);
-
- private:
- std::string name;
- double start_time;
- double end_time;
- std::string type;
- std::vector<jed_subset_t> *resource_subsets;
- std::vector<char*> characteristics_list; /* just a list of names (strings) */
- std::unordered_map<char*, char*> info_map; /* key/value pairs */
+class XBT_PUBLIC Event {
+public:
+ Event(std::string name, double start_time, double end_time, std::string type);
+ ~Event();
+ void addCharacteristic(char* characteristic);
+ void addResources(std::vector<sg_host_t>* host_selection);
+ void addInfo(char* key, char* value);
+ void print(FILE* file);
+
+private:
+ std::string name;
+ double start_time;
+ double end_time;
+ std::string type;
+ std::vector<jed_subset_t>* resource_subsets;
+ std::vector<char*> characteristics_list; /* just a list of names (strings) */
+ std::unordered_map<char*, char*> info_map; /* key/value pairs */
};
}
}
extern "C" {
-typedef simgrid::jedule::Event * jed_event_t;
+typedef simgrid::jedule::Event* jed_event_t;
}
#endif
-/* Copyright (c) 2010-2012, 2014-2017. The SimGrid Team.
+/* Copyright (c) 2010-2012, 2014-2018. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
namespace simgrid {
namespace jedule{
-XBT_PUBLIC_CLASS Container {
+class XBT_PUBLIC Container {
public:
Container(std::string name);
virtual ~Container();
void printResources(FILE *file);
};
-XBT_PUBLIC_CLASS Subset {
+class XBT_PUBLIC Subset {
public:
Subset(int s, int n, Container* p);
virtual ~Subset()=default;
*
* This class is the ancestor of every activities that an actor can undertake, that is, of the actions that do take time in the simulated world.
*/
-XBT_PUBLIC_CLASS Activity {
+class XBT_PUBLIC Activity {
friend Comm;
friend XBT_PUBLIC void intrusive_ptr_release(Comm * c);
friend XBT_PUBLIC void intrusive_ptr_add_ref(Comm * c);
*/
/** @brief Simulation Agent */
-XBT_PUBLIC_CLASS Actor : public simgrid::xbt::Extendable<Actor>
-{
+class XBT_PUBLIC Actor : public simgrid::xbt::Extendable<Actor> {
friend Exec;
friend Mailbox;
friend simgrid::simix::ActorImpl;
*
* Represents all asynchronous communications, that you can test or wait onto.
*/
-XBT_PUBLIC_CLASS Comm : public Activity
-{
+class XBT_PUBLIC Comm : public Activity {
Comm() : Activity() {}
public:
friend XBT_PUBLIC void intrusive_ptr_release(simgrid::s4u::Comm * c);
* semantic. But we currently use (only) double for both durations and
* timestamp timeouts.
*/
-XBT_PUBLIC_CLASS ConditionVariable
-{
+class XBT_PUBLIC ConditionVariable {
private:
friend s_smx_cond_t;
smx_cond_t cond_;
*
* This class is an interface to the simulation engine.
*/
-XBT_PUBLIC_CLASS Engine
-{
+class XBT_PUBLIC Engine {
public:
/** Constructor, taking the command line parameters of your main function */
Engine(int* argc, char** argv);
namespace simgrid {
namespace s4u {
-XBT_PUBLIC_CLASS Exec : public Activity
-{
+class XBT_PUBLIC Exec : public Activity {
Exec() : Activity() {}
public:
friend XBT_PUBLIC void intrusive_ptr_release(simgrid::s4u::Exec * e);
* You can retrieve a particular host using simgrid::s4u::Host::byName()
* and actors can retrieve the host on which they run using simgrid::s4u::Host::current().
*/
-XBT_PUBLIC_CLASS Host : public simgrid::xbt::Extendable<Host>
-{
+class XBT_PUBLIC Host : public simgrid::xbt::Extendable<Host> {
public:
explicit Host(const char* name);
-/* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2004-2018. 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. */
};
namespace s4u {
/** @brief A Link represents the network facilities between [hosts](\ref simgrid::s4u::Host) */
-XBT_PUBLIC_CLASS Link : public simgrid::xbt::Extendable<Link>
-{
+class XBT_PUBLIC Link : public simgrid::xbt::Extendable<Link> {
friend simgrid::surf::LinkImpl;
// Links are created from the NetZone, and destroyed by their private implementation when the simulation ends
-/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2006-2018. 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. */
*
* @section s4u_mb_api The API
*/
-XBT_PUBLIC_CLASS Mailbox {
+class XBT_PUBLIC Mailbox {
friend Comm;
friend simgrid::kernel::activity::MailboxImpl;
-/* Copyright (c) 2006-2015. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2006-2018. 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. */
* Use createMutex() to get a ::MutexPtr to a newly created mutex and only manipulate ::MutexPtr.
*
*/
-XBT_PUBLIC_CLASS Mutex {
+class XBT_PUBLIC Mutex {
friend ConditionVariable;
friend simgrid::kernel::activity::MutexImpl;
simgrid::kernel::activity::MutexImpl* mutex_;
-/* Copyright (c) 2016-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2016-2018. 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. */
* netzones. In SimGrid, there is a hierarchy of netzones, with a unique root zone (that you can retrieve from the
* s4u::Engine).
*/
-XBT_PUBLIC_CLASS NetZone
-{
+class XBT_PUBLIC NetZone {
protected:
friend simgrid::kernel::routing::NetZoneImpl;
XBT_PUBLIC void getStorageList(std::map<std::string, Storage*>* whereTo);
-XBT_PUBLIC_CLASS Storage : public simgrid::xbt::Extendable<Storage>
-{
+class XBT_PUBLIC Storage : public simgrid::xbt::Extendable<Storage> {
friend s4u::Engine;
friend simgrid::surf::StorageImpl;
-/* Copyright (c) 2015-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2015-2018. 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. */
* The total computing power that the contained actors can get is constrained to the virtual machine size.
*
*/
-XBT_PUBLIC_CLASS VirtualMachine : public s4u::Host
-{
+class XBT_PUBLIC VirtualMachine : public s4u::Host {
simgrid::vm::VirtualMachineImpl* pimpl_vm_ = nullptr;
virtual ~VirtualMachine();
# define XBT_EXPORT_NO_IMPORT(type) __declspec(dllexport) type
# define XBT_IMPORT_NO_EXPORT(type) type
# define XBT_PUBLIC_DATA(type) extern __declspec(dllexport) type
-# define XBT_PUBLIC_CLASS class __declspec(dllexport)
# define XBT_PRIVATE
/* Link against the DLL */
# define XBT_EXPORT_NO_IMPORT(type) type
# define XBT_IMPORT_NO_EXPORT(type) __declspec(dllimport) type
# define XBT_PUBLIC_DATA(type) extern __declspec(dllimport) type
-# define XBT_PUBLIC_CLASS class __declspec(dllimport)
# define XBT_PRIVATE
#elif defined(__ELF__)
# define XBT_EXPORT_NO_IMPORT(type) __attribute__((visibility("default"))) type
# define XBT_IMPORT_NO_EXPORT(type) __attribute__((visibility("default"))) type
# define XBT_PUBLIC_DATA(type) extern __attribute__((visibility("default"))) type
-# define XBT_PUBLIC_CLASS class __attribute__((visibility("default")))
# define XBT_PRIVATE __attribute__((visibility("hidden")))
#else
# define XBT_EXPORT_NO_IMPORT(type) type
# define XBT_IMPORT_NO_EXPORT(type) type
# define XBT_PUBLIC_DATA(type) extern type
-# define XBT_PUBLIC_CLASS class
# define XBT_PRIVATE /** @private */
#endif
namespace simgrid {
namespace config {
-XBT_PUBLIC_CLASS missing_key_error : public std::runtime_error {
+class XBT_PUBLIC missing_key_error : public std::runtime_error {
public:
explicit missing_key_error(const std::string& what)
: std::runtime_error(what) {}
-/* Copyright (c) 2005-2017. The SimGrid Team.All rights reserved. */
+/* Copyright (c) 2005-2018. 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. */
* However, you can try `dynamic_cast` an exception to this type in order to
* get contextual information about the exception.
*/
-XBT_PUBLIC_CLASS WithContextException {
+class XBT_PUBLIC WithContextException {
public:
WithContextException() :
backtrace_(simgrid::xbt::backtrace()),
* * the [C++11-conforming implementation](https://gcc.gnu.org/gcc-5/changes.html)
* does not use refcouting/COW but has a small string optimization.
*/
-XBT_PUBLIC_CLASS string : private string_data {
+class XBT_PUBLIC string : private string_data {
static char NUL;
public:
namespace kernel {
namespace activity {
- XBT_PUBLIC_CLASS ActivityImpl {
- public:
- ActivityImpl();
- virtual ~ActivityImpl();
- e_smx_state_t state = SIMIX_WAITING; /* State of the activity */
- std::string name; /* Activity name if any */
- std::list<smx_simcall_t> simcalls; /* List of simcalls waiting for this activity */
-
- virtual void suspend()=0;
- virtual void resume()=0;
- virtual void post() =0; // What to do when a simcall terminates
-
- // boost::intrusive_ptr<ActivityImpl> support:
- friend XBT_PUBLIC void intrusive_ptr_add_ref(ActivityImpl * activity);
- friend XBT_PUBLIC void intrusive_ptr_release(ActivityImpl * activity);
-
- private:
- std::atomic_int_fast32_t refcount_{0};
- };
+class XBT_PUBLIC ActivityImpl {
+public:
+ ActivityImpl();
+ virtual ~ActivityImpl();
+ e_smx_state_t state = SIMIX_WAITING; /* State of the activity */
+ std::string name; /* Activity name if any */
+ std::list<smx_simcall_t> simcalls; /* List of simcalls waiting for this activity */
+
+ virtual void suspend() = 0;
+ virtual void resume() = 0;
+ virtual void post() = 0; // What to do when a simcall terminates
+
+ // boost::intrusive_ptr<ActivityImpl> support:
+ friend XBT_PUBLIC void intrusive_ptr_add_ref(ActivityImpl* activity);
+ friend XBT_PUBLIC void intrusive_ptr_release(ActivityImpl* activity);
+
+private:
+ std::atomic_int_fast32_t refcount_{0};
+};
}}} // namespace simgrid::kernel::activity
#endif /* SIMGRID_KERNEL_ACTIVITY_ACTIVITYIMPL_HPP */
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2018. 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. */
namespace kernel {
namespace activity {
-XBT_PUBLIC_CLASS CommImpl : public ActivityImpl
-{
+class XBT_PUBLIC CommImpl : public ActivityImpl {
~CommImpl() override;
public:
namespace kernel {
namespace activity {
-XBT_PUBLIC_CLASS ExecImpl : public ActivityImpl
-{
+class XBT_PUBLIC ExecImpl : public ActivityImpl {
~ExecImpl() override;
public:
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2018. 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. */
namespace kernel {
namespace activity {
-XBT_PUBLIC_CLASS SleepImpl : public ActivityImpl
-{
+class XBT_PUBLIC SleepImpl : public ActivityImpl {
public:
void suspend() override;
void resume() override;
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2018. 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. */
namespace kernel {
namespace activity {
-XBT_PUBLIC_CLASS IoImpl : public ActivityImpl
-{
+class XBT_PUBLIC IoImpl : public ActivityImpl {
public:
void suspend() override;
void resume() override;
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2018. 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. */
namespace activity {
/** Used to implement mutexes, semaphores and conditions */
-XBT_PUBLIC_CLASS RawImpl : public ActivityImpl
-{
+class XBT_PUBLIC RawImpl : public ActivityImpl {
public:
~RawImpl() override;
void suspend() override;
namespace kernel {
namespace context {
- XBT_PUBLIC_CLASS ContextFactory {
- private:
- std::string name_;
- public:
-
- explicit ContextFactory(std::string name) : name_(std::move(name)) {}
- virtual ~ContextFactory();
- virtual Context* create_context(std::function<void()> code,
- void_pfn_smxprocess_t cleanup, smx_actor_t process) = 0;
-
- // Optional methods for attaching main() as a context:
-
- /** Creates a context from the current context of execution
+class XBT_PUBLIC ContextFactory {
+private:
+ std::string name_;
+
+public:
+ explicit ContextFactory(std::string name) : name_(std::move(name)) {}
+ virtual ~ContextFactory();
+ virtual Context* create_context(std::function<void()> code, void_pfn_smxprocess_t cleanup, smx_actor_t process) = 0;
+
+ // Optional methods for attaching main() as a context:
+
+ /** Creates a context from the current context of execution
+ *
+ * This will not work on all implementation of `ContextFactory`.
+ */
+ virtual Context* attach(void_pfn_smxprocess_t cleanup_func, smx_actor_t process);
+ virtual Context* create_maestro(std::function<void()> code, smx_actor_t process);
+
+ virtual void run_all() = 0;
+ virtual Context* self();
+ std::string const& name() const { return name_; }
+private:
+ void declare_context(void* T, std::size_t size);
+
+protected:
+ template <class T, class... Args> T* new_context(Args&&... args)
+ {
+ T* context = new T(std::forward<Args>(args)...);
+ this->declare_context(context, sizeof(T));
+ return context;
+ }
+};
+
+class XBT_PUBLIC Context {
+private:
+ std::function<void()> code_;
+ void_pfn_smxprocess_t cleanup_func_ = nullptr;
+ smx_actor_t process_ = nullptr;
+
+public:
+ class StopRequest {
+ /** @brief Exception launched to kill a process, in order to properly unwind its stack and release RAII stuff
*
- * This will not work on all implementation of `ContextFactory`.
+ * Nope, Sonar, this should not inherit of std::exception.
+ * Otherwise, users may accidentally catch it with a try {} catch (std::exception)
*/
- virtual Context* attach(void_pfn_smxprocess_t cleanup_func, smx_actor_t process);
- virtual Context* create_maestro(std::function<void()> code, smx_actor_t process);
-
- virtual void run_all() = 0;
- virtual Context* self();
- std::string const& name() const
- {
- return name_;
- }
- private:
- void declare_context(void* T, std::size_t size);
- protected:
- template<class T, class... Args>
- T* new_context(Args&&... args)
- {
- T* context = new T(std::forward<Args>(args)...);
- this->declare_context(context, sizeof(T));
- return context;
- }
- };
-
- XBT_PUBLIC_CLASS Context {
- private:
- std::function<void()> code_;
- void_pfn_smxprocess_t cleanup_func_ = nullptr;
- smx_actor_t process_ = nullptr;
- public:
- class StopRequest {
- /** @brief Exception launched to kill a process, in order to properly unwind its stack and release RAII stuff
- *
- * Nope, Sonar, this should not inherit of std::exception.
- * Otherwise, users may accidentally catch it with a try {} catch (std::exception)
- */
- };
- bool iwannadie;
-
- Context(std::function<void()> code,
- void_pfn_smxprocess_t cleanup_func,
- smx_actor_t process);
- void operator()()
- {
- code_();
- }
- bool has_code() const
- {
- return static_cast<bool>(code_);
- }
- smx_actor_t process()
- {
- return this->process_;
- }
- void set_cleanup(void_pfn_smxprocess_t cleanup)
- {
- cleanup_func_ = cleanup;
- }
-
- // Virtual methods
- virtual ~Context();
- virtual void stop();
- virtual void suspend() = 0;
};
-
- XBT_PUBLIC_CLASS AttachContext : public Context {
- public:
-
- AttachContext(std::function<void()> code,
- void_pfn_smxprocess_t cleanup_func,
- smx_actor_t process)
+ bool iwannadie;
+
+ Context(std::function<void()> code, void_pfn_smxprocess_t cleanup_func, smx_actor_t process);
+ void operator()() { code_(); }
+ bool has_code() const { return static_cast<bool>(code_); }
+ smx_actor_t process() { return this->process_; }
+ void set_cleanup(void_pfn_smxprocess_t cleanup) { cleanup_func_ = cleanup; }
+
+ // Virtual methods
+ virtual ~Context();
+ virtual void stop();
+ virtual void suspend() = 0;
+};
+
+class XBT_PUBLIC AttachContext : public Context {
+public:
+ AttachContext(std::function<void()> code, void_pfn_smxprocess_t cleanup_func, smx_actor_t process)
: Context(std::move(code), cleanup_func, process)
- {}
+ {
+ }
- ~AttachContext() override;
+ ~AttachContext() override;
- /** Called by the context when it is ready to give control
- * to the maestro.
- */
- virtual void attach_start() = 0;
+ /** Called by the context when it is ready to give control
+ * to the maestro.
+ */
+ virtual void attach_start() = 0;
- /** Called by the context when it has finished its job */
- virtual void attach_stop() = 0;
- };
+ /** Called by the context when it has finished its job */
+ virtual void attach_stop() = 0;
+};
/* This allows Java to hijack the context factory (Java induces factories of factory :) */
typedef ContextFactory* (*ContextFactoryInitializer)();
* Then, it is used to list all variables involved in constraint through constraint's xxx_element_set lists, or
* vice-versa list all constraints for a given variable.
*/
-XBT_PUBLIC_CLASS Element
-{
+class XBT_PUBLIC Element {
public:
int get_concurrency() const;
void decrease_concurrency();
* \li Active elements which variable's weight is non-zero (i.e. it is enabled) AND its element value is non-zero.
* LMM_solve iterates over active elements during resolution, dynamically making them active or unactive.
*/
-XBT_PUBLIC_CLASS Constraint
-{
+class XBT_PUBLIC Constraint {
public:
Constraint() = delete;
Constraint(void* id_value, double bound_value);
* When something prevents us from enabling a variable, we "stage" the weight that we would have like to set, so that as
* soon as possible we enable the variable with desired weight
*/
-XBT_PUBLIC_CLASS Variable
-{
+class XBT_PUBLIC Variable {
public:
void initialize(simgrid::kernel::resource::Action * id_value, double sharing_weight_value, double bound_value,
int number_of_constraints, unsigned visited_value);
/**
* @brief LMM system
*/
-XBT_PUBLIC_CLASS System
-{
+class XBT_PUBLIC System {
public:
/**
* @brief Create a new Linear MaxMim system
* @brief SURF action interface class
* @details An action is an event generated by a resource (e.g.: a communication for the network)
*/
-XBT_PUBLIC_CLASS Action
-{
+class XBT_PUBLIC Action {
public:
boost::intrusive::list_member_hook<> modifiedSetHook_; /* Used by the lazy update to list the actions to track */
bool isLinkedModifiedSet() const { return modifiedSetHook_.is_linked(); }
* @brief SURF model interface class
* @details A model is an object which handle the interactions between its Resources and its Actions
*/
-XBT_PUBLIC_CLASS Model
-{
+class XBT_PUBLIC Model {
public:
Model();
virtual ~Model();
* @brief SURF resource interface class
* @details This is the ancestor class of every resources in SimGrid, such as links, CPU or storage
*/
-XBT_PUBLIC_CLASS Resource
-{
+class XBT_PUBLIC Resource {
public:
/**
* @brief Constructor of LMM Resources
* is also not realistic, as blue level can use more links than a single
* Aries can handle, thus it should use several routers.
*/
-XBT_PUBLIC_CLASS DragonflyZone : public ClusterZone {
+class XBT_PUBLIC DragonflyZone : public ClusterZone {
public:
explicit DragonflyZone(NetZone* father, std::string name);
~DragonflyZone() override;
* called Autonomous Systems in this article).
*
*/
-XBT_PUBLIC_CLASS NetZoneImpl : public s4u::NetZone
-{
+class XBT_PUBLIC NetZoneImpl : public s4u::NetZone {
friend simgrid::kernel::EngineImpl; // it destroys netRoot_
protected:
-/* Copyright (c) 2015-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2015-2018. 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. */
namespace simgrid {
namespace mc {
-XBT_PUBLIC_CLASS DeadlockError{};
-XBT_PUBLIC_CLASS TerminationError{};
-XBT_PUBLIC_CLASS LivenessError{};
+class XBT_PUBLIC DeadlockError {
+};
+class XBT_PUBLIC TerminationError {
+};
+class XBT_PUBLIC LivenessError {
+};
}
}
-/* Copyright (c) 2006-2015. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2006-2018. 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. */
* mountpoints.
* For now, you cannot change the mountpoints programatically, and must declare them from your platform file.
*/
-XBT_PUBLIC_CLASS File
-{
+class XBT_PUBLIC File {
public:
File(std::string fullpath, void* userdata);
File(std::string fullpath, sg_host_t host, void* userdata);
void* userdata_ = nullptr;
};
-XBT_PUBLIC_CLASS FileSystemStorageExt {
+class XBT_PUBLIC FileSystemStorageExt {
public:
static simgrid::xbt::Extension<Storage, FileSystemStorageExt> EXTENSION_ID;
explicit FileSystemStorageExt(Storage* ptr);
sg_size_t size_ = 0;
};
-XBT_PUBLIC_CLASS FileDescriptorHostExt
-{
+class XBT_PUBLIC FileDescriptorHostExt {
public:
static simgrid::xbt::Extension<Host, FileDescriptorHostExt> EXTENSION_ID;
FileDescriptorHostExt() = default;
* @brief SURF VM interface class
* @details A VM represent a virtual machine
*/
-XBT_PUBLIC_CLASS VirtualMachineImpl : public surf::HostImpl, public simgrid::xbt::Extendable<VirtualMachineImpl>
-{
+class XBT_PUBLIC VirtualMachineImpl : public surf::HostImpl, public simgrid::xbt::Extendable<VirtualMachineImpl> {
friend simgrid::s4u::VirtualMachine;
public:
* @brief SURF cpu model interface class
* @details A model is an object which handle the interactions between its Resources and its Actions
*/
-XBT_PUBLIC_CLASS CpuModel : public kernel::resource::Model
-{
+class XBT_PUBLIC CpuModel : public kernel::resource::Model {
public:
/**
* @brief Create a Cpu
* @brief SURF cpu resource interface class
* @details A Cpu represent a cpu associated to a host
*/
-XBT_PUBLIC_CLASS Cpu : public simgrid::kernel::resource::Resource
-{
+class XBT_PUBLIC Cpu : public simgrid::kernel::resource::Resource {
public:
/**
* @brief Cpu constructor
/** @ingroup SURF_cpu_interface
* @brief A CpuAction represents the execution of code on one or several Cpus
*/
-XBT_PUBLIC_CLASS CpuAction : public simgrid::kernel::resource::Action
-{
+class XBT_PUBLIC CpuAction : public simgrid::kernel::resource::Action {
friend XBT_PUBLIC Cpu* getActionCpu(CpuAction * action);
public:
* - #future_evt_set: makes it easy to find the next occuring event of all traces
*/
namespace trace_mgr {
-XBT_PUBLIC_CLASS DatedValue
-{
+class XBT_PUBLIC DatedValue {
public:
double date_ = 0;
double value_ = 0;
std::ostream& operator<<(std::ostream& out, const DatedValue& e);
/** @brief A trace_iterator links a trace to a resource */
-XBT_PUBLIC_CLASS trace_event{
-
+class XBT_PUBLIC trace_event {
};
/** @brief A trace is a set of timed values, encoding the value that a variable takes at what time *
* It is useful to model dynamic platforms, where an external load that makes the resource availability change over time.
* To model that, you have to set several traces per resource: one for the on/off state and one for each numerical value (computational speed, bandwidth and latency).
*/
-XBT_PUBLIC_CLASS trace {
+class XBT_PUBLIC trace {
public:
/** Creates an empty trace */
explicit trace();
/** @brief Future Event Set (collection of iterators over the traces)
* That's useful to quickly know which is the next occurring event in a set of traces. */
-XBT_PUBLIC_CLASS future_evt_set {
+class XBT_PUBLIC future_evt_set {
public:
future_evt_set();
virtual ~future_evt_set();