From 8f685bc8f50931c6b957e66f7a024af24714876b Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sat, 14 Apr 2018 22:10:53 +0200 Subject: [PATCH 1/1] inline s4u/forward.hpp to its only include location --- include/simgrid/forward.h | 36 +++++++++++++++++++++++- include/simgrid/s4u/forward.hpp | 48 -------------------------------- tools/cmake/DefinePackages.cmake | 1 - 3 files changed, 35 insertions(+), 50 deletions(-) delete mode 100644 include/simgrid/s4u/forward.hpp diff --git a/include/simgrid/forward.h b/include/simgrid/forward.h index 5fbff2165d..f45e35e639 100644 --- a/include/simgrid/forward.h +++ b/include/simgrid/forward.h @@ -6,11 +6,44 @@ #ifndef SIMGRID_TYPES_H #define SIMGRID_TYPES_H +#include + #ifdef __cplusplus -#include +#include namespace simgrid { + +namespace s4u { +class Activity; +class Actor; +using ActorPtr = boost::intrusive_ptr; +XBT_PUBLIC void intrusive_ptr_release(Actor* actor); +XBT_PUBLIC void intrusive_ptr_add_ref(Actor* actor); +class Comm; +using CommPtr = boost::intrusive_ptr; +XBT_PUBLIC void intrusive_ptr_release(Comm* c); +XBT_PUBLIC void intrusive_ptr_add_ref(Comm* c); +class Engine; +class Exec; +using ExecPtr = boost::intrusive_ptr; +XBT_PUBLIC void intrusive_ptr_release(Exec* e); +XBT_PUBLIC void intrusive_ptr_add_ref(Exec* e); +class Host; +class Link; +class Mailbox; +using MailboxPtr = boost::intrusive_ptr; +XBT_PUBLIC void intrusive_ptr_release(Mailbox* m); +XBT_PUBLIC void intrusive_ptr_add_ref(Mailbox* m); +class Mutex; +XBT_PUBLIC void intrusive_ptr_release(Mutex* m); +XBT_PUBLIC void intrusive_ptr_add_ref(Mutex* m); +class NetZone; +class VirtualMachine; +class File; +class Storage; +} // namespace s4u + namespace config { template class Flag; } @@ -21,6 +54,7 @@ namespace actor { class ActorImpl; using ActorImplPtr = boost::intrusive_ptr; } // namespace actor + namespace activity { class ActivityImpl; using ActivityImplPtr = boost::intrusive_ptr; diff --git a/include/simgrid/s4u/forward.hpp b/include/simgrid/s4u/forward.hpp deleted file mode 100644 index 627cb196c3..0000000000 --- a/include/simgrid/s4u/forward.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/* 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. */ - -#ifndef SIMGRID_S4U_FORWARD_HPP -#define SIMGRID_S4U_FORWARD_HPP - -#include -#include - -namespace simgrid { -namespace s4u { - -class Activity; -class Actor; -using ActorPtr = boost::intrusive_ptr; -XBT_PUBLIC void intrusive_ptr_release(Actor* actor); -XBT_PUBLIC void intrusive_ptr_add_ref(Actor* actor); - -class Comm; -using CommPtr = boost::intrusive_ptr; -XBT_PUBLIC void intrusive_ptr_release(Comm* c); -XBT_PUBLIC void intrusive_ptr_add_ref(Comm* c); - -class Engine; -class Exec; -using ExecPtr = boost::intrusive_ptr; -XBT_PUBLIC void intrusive_ptr_release(Exec* e); -XBT_PUBLIC void intrusive_ptr_add_ref(Exec* e); - -class Host; -class Link; -class Mailbox; -using MailboxPtr = boost::intrusive_ptr; -XBT_PUBLIC void intrusive_ptr_release(Mailbox* m); -XBT_PUBLIC void intrusive_ptr_add_ref(Mailbox* m); -class Mutex; -XBT_PUBLIC void intrusive_ptr_release(Mutex* m); -XBT_PUBLIC void intrusive_ptr_add_ref(Mutex* m); -class NetZone; -class VirtualMachine; -class File; -class Storage; -} -} - -#endif diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index 2650faf330..fed584c885 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -680,7 +680,6 @@ set(headers_to_install include/simgrid/storage.h include/simgrid/vm.h include/simgrid/zone.h - include/simgrid/s4u/forward.hpp include/simgrid/s4u/Activity.hpp include/simgrid/s4u/Actor.hpp include/simgrid/s4u/Comm.hpp -- 2.20.1