Skip to content

Commit

Permalink
Move almost all top-level headers into ureact/detail/; leave redirect…
Browse files Browse the repository at this point in the history
…ing headers instead

It allows to have corresponding .hpp/.inl pairs together.
Also, it allows to separate content of actual bloated headers, leaving public headers intact.
  • Loading branch information
YarikTH committed Oct 28, 2023
1 parent 8be1745 commit 052f4d0
Show file tree
Hide file tree
Showing 15 changed files with 99 additions and 24 deletions.
15 changes: 15 additions & 0 deletions include/ureact/context.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// Copyright (C) 2014-2017 Sebastian Jeckel.
// Copyright (C) 2020-2023 Krylov Yaroslav.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef UREACT_CONTEXT_HPP
#define UREACT_CONTEXT_HPP

#include <ureact/detail/context.hpp>

#endif //UREACT_CONTEXT_HPP
6 changes: 3 additions & 3 deletions include/ureact/detail/context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
// http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef UREACT_CONTEXT_HPP
#define UREACT_CONTEXT_HPP
#ifndef UREACT_DETAIL_CONTEXT_HPP
#define UREACT_DETAIL_CONTEXT_HPP

#include <memory>

Expand Down Expand Up @@ -111,4 +111,4 @@ UREACT_END_NAMESPACE
# include <ureact/detail/context.inl>
#endif

#endif //UREACT_CONTEXT_HPP
#endif //UREACT_DETAIL_CONTEXT_HPP
2 changes: 1 addition & 1 deletion include/ureact/detail/context.inl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include <memory>

#include <ureact/context.hpp>
#include <ureact/detail/context.hpp>
#include <ureact/detail/defines.hpp>
#include <ureact/detail/graph_impl.hpp>

Expand Down
8 changes: 4 additions & 4 deletions include/ureact/detail/events.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
// http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef UREACT_EVENTS_HPP
#define UREACT_EVENTS_HPP
#ifndef UREACT_DETAIL_EVENTS_HPP
#define UREACT_DETAIL_EVENTS_HPP

#include <cassert>
#include <type_traits>

#include <ureact/context.hpp>
#include <ureact/detail/context.hpp>
#include <ureact/detail/node.hpp>
#include <ureact/utility/event_range.hpp> // event ranges often needed along with events.hpp header
#include <ureact/utility/unit.hpp>
Expand Down Expand Up @@ -571,4 +571,4 @@ UREACT_WARN_UNUSED_RESULT auto make_never() -> events<E>

UREACT_END_NAMESPACE

#endif //UREACT_EVENTS_HPP
#endif //UREACT_DETAIL_EVENTS_HPP
2 changes: 1 addition & 1 deletion include/ureact/detail/node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <tuple>
#include <utility>

#include <ureact/context.hpp>
#include <ureact/detail/context.hpp>
#include <ureact/detail/graph_impl.hpp>
#include <ureact/detail/graph_interface.hpp>
#include <ureact/detail/node_id_vector.hpp>
Expand Down
6 changes: 3 additions & 3 deletions include/ureact/detail/observer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
// http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef UREACT_OBSERVER_HPP
#define UREACT_OBSERVER_HPP
#ifndef UREACT_DETAIL_OBSERVER_HPP
#define UREACT_DETAIL_OBSERVER_HPP

#include <utility>

Expand Down Expand Up @@ -104,4 +104,4 @@ UREACT_END_NAMESPACE
# include <ureact/detail/observer.inl>
#endif

#endif //UREACT_OBSERVER_HPP
#endif //UREACT_DETAIL_OBSERVER_HPP
2 changes: 1 addition & 1 deletion include/ureact/detail/observer.inl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <cassert>

#include <ureact/detail/defines.hpp>
#include <ureact/observer.hpp>
#include <ureact/detail/observer.hpp>

UREACT_BEGIN_NAMESPACE

Expand Down
8 changes: 4 additions & 4 deletions include/ureact/detail/signal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
// http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef UREACT_SIGNAL_HPP
#define UREACT_SIGNAL_HPP
#ifndef UREACT_DETAIL_SIGNAL_HPP
#define UREACT_DETAIL_SIGNAL_HPP

#include <cassert>

#include <ureact/context.hpp>
#include <ureact/detail/context.hpp>
#include <ureact/detail/has_changed.hpp>
#include <ureact/detail/node.hpp>
#include <ureact/utility/type_traits.hpp>
Expand Down Expand Up @@ -651,4 +651,4 @@ UREACT_WARN_UNUSED_RESULT auto make_const( V&& value )

UREACT_END_NAMESPACE

#endif //UREACT_SIGNAL_HPP
#endif //UREACT_DETAIL_SIGNAL_HPP
2 changes: 1 addition & 1 deletion include/ureact/detail/temp_signal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include <cassert>

#include <ureact/signal.hpp>
#include <ureact/detail/signal.hpp>

UREACT_BEGIN_NAMESPACE

Expand Down
8 changes: 4 additions & 4 deletions include/ureact/detail/transaction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
// http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef UREACT_TRANSACTION_HPP
#define UREACT_TRANSACTION_HPP
#ifndef UREACT_DETAIL_TRANSACTION_HPP
#define UREACT_DETAIL_TRANSACTION_HPP

#include <ureact/context.hpp>
#include <ureact/detail/context.hpp>
#include <ureact/detail/defines.hpp>

UREACT_BEGIN_NAMESPACE
Expand Down Expand Up @@ -61,4 +61,4 @@ UREACT_END_NAMESPACE
# include <ureact/detail/transaction.inl>
#endif

#endif // UREACT_TRANSACTION_HPP
#endif // UREACT_DETAIL_TRANSACTION_HPP
4 changes: 2 additions & 2 deletions include/ureact/detail/transaction.inl
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

#include <cassert>

#include <ureact/context.hpp>
#include <ureact/detail/context.hpp>
#include <ureact/detail/defines.hpp>
#include <ureact/detail/graph_impl.hpp>
#include <ureact/transaction.hpp>
#include <ureact/detail/transaction.hpp>

UREACT_BEGIN_NAMESPACE

Expand Down
15 changes: 15 additions & 0 deletions include/ureact/events.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// Copyright (C) 2014-2017 Sebastian Jeckel.
// Copyright (C) 2020-2023 Krylov Yaroslav.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef UREACT_EVENTS_HPP
#define UREACT_EVENTS_HPP

#include <ureact/detail/events.hpp>

#endif //UREACT_EVENTS_HPP
15 changes: 15 additions & 0 deletions include/ureact/observer.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// Copyright (C) 2014-2017 Sebastian Jeckel.
// Copyright (C) 2020-2023 Krylov Yaroslav.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef UREACT_OBSERVER_HPP
#define UREACT_OBSERVER_HPP

#include <ureact/detail/observer.hpp>

#endif //UREACT_OBSERVER_HPP
15 changes: 15 additions & 0 deletions include/ureact/signal.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// Copyright (C) 2014-2017 Sebastian Jeckel.
// Copyright (C) 2020-2023 Krylov Yaroslav.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef UREACT_SIGNAL_HPP
#define UREACT_SIGNAL_HPP

#include <ureact/detail/signal.hpp>

#endif //UREACT_SIGNAL_HPP
15 changes: 15 additions & 0 deletions include/ureact/transaction.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// Copyright (C) 2014-2017 Sebastian Jeckel.
// Copyright (C) 2020-2023 Krylov Yaroslav.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef UREACT_TRANSACTION_HPP
#define UREACT_TRANSACTION_HPP

#include <ureact/detail/transaction.hpp>

#endif // UREACT_TRANSACTION_HPP

0 comments on commit 052f4d0

Please sign in to comment.