Skip to content

Commit

Permalink
iox-eclipse-iceoryx#1391 Move PolymorphicHandler to design
Browse files Browse the repository at this point in the history
  • Loading branch information
FerdinandSpitzschnueffler committed Feb 21, 2023
1 parent 432a6ee commit 34f6dcb
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 23 deletions.
5 changes: 0 additions & 5 deletions .clang-tidy-diff-scans.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@
./iceoryx_hoofs/source/posix_wrapper/*
./iceoryx_hoofs/source/posix_wrapper/shared_memory_object/*
./iceoryx_hoofs/test/moduletests/test_posix*
./iceoryx_hoofs/include/iceoryx_hoofs/design_pattern/polymorphic_handler.hpp

./iceoryx_hoofs/include/iceoryx_hoofs/internal/design_pattern/polymorphic_handler.inl

./iceoryx_hoofs/test/moduletests/test_polymorphic_handler.cpp

./iceoryx_hoofs/posix/**/*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,17 @@
//
// SPDX-License-Identifier: Apache-2.0

#ifndef IOX_HOOFS_DESIGN_PATTERN_POLYMORPHIC_HANDLER_INL
#define IOX_HOOFS_DESIGN_PATTERN_POLYMORPHIC_HANDLER_INL
#ifndef IOX_HOOFS_DESIGN_POLYMORPHIC_HANDLER_INL
#define IOX_HOOFS_DESIGN_POLYMORPHIC_HANDLER_INL

#include "iceoryx_hoofs/design_pattern/polymorphic_handler.hpp"
#include "iox/polymorphic_handler.hpp"
#include "iox/static_lifetime_guard.hpp"
#include <atomic>
#include <cstdlib>
#include <type_traits>

namespace iox
{
namespace design_pattern
{

namespace detail
{

Expand Down Expand Up @@ -176,7 +173,6 @@ PolymorphicHandler<Interface, Default, Hooks>::guard() noexcept
return StaticLifetimeGuard<Self>();
}

} // namespace design_pattern
} // namespace iox

#endif // IOX_HOOFS_DESIGN_PATTERN_POLYMORPHIC_HANDLER_INL
#endif // IOX_HOOFS_DESIGN_POLYMORPHIC_HANDLER_INL
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
//
// SPDX-License-Identifier: Apache-2.0

#ifndef IOX_HOOFS_DESIGN_PATTERN_POLYMORPHIC_HANDLER_HPP
#define IOX_HOOFS_DESIGN_PATTERN_POLYMORPHIC_HANDLER_HPP
#ifndef IOX_HOOFS_DESIGN_POLYMORPHIC_HANDLER_HPP
#define IOX_HOOFS_DESIGN_POLYMORPHIC_HANDLER_HPP

#include <atomic>
#include <type_traits>
Expand All @@ -24,8 +24,6 @@

namespace iox
{
namespace design_pattern
{
namespace detail
{

Expand Down Expand Up @@ -124,9 +122,8 @@ class PolymorphicHandler
std::atomic<Interface*> m_current{nullptr};
};

} // namespace design_pattern
} // namespace iox

#include "iceoryx_hoofs/internal/design_pattern/polymorphic_handler.inl"
#include "iox/detail/polymorphic_handler.inl"

#endif // IOX_HOOFS_DESIGN_PATTERN_POLYMORPHIC_HANDLER_HPP
#endif // IOX_HOOFS_DESIGN_POLYMORPHIC_HANDLER_HPP
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
//
// SPDX-License-Identifier: Apache-2.0

#include "iceoryx_hoofs/design_pattern/polymorphic_handler.hpp"
#include "iox/polymorphic_handler.hpp"
#include "iox/static_lifetime_guard.hpp"

#include "test.hpp"
Expand Down Expand Up @@ -82,7 +82,7 @@ struct Hooks
}
};

using Handler = iox::design_pattern::PolymorphicHandler<Interface, Default, Hooks>;
using Handler = iox::PolymorphicHandler<Interface, Default, Hooks>;

class PolymorphicHandler_test : public Test
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "iox/optional.hpp"
#include "iox/scoped_static.hpp"


namespace iox
{
namespace roudi
Expand Down

0 comments on commit 34f6dcb

Please sign in to comment.