Skip to content

Commit

Permalink
Merge pull request #2061 from eclipse-iceoryx/iox-1391-move-list-to-c…
Browse files Browse the repository at this point in the history
…ontainer-module

[Stacked on #2059] iox-#1391 Move list to container module
  • Loading branch information
elBoberido authored Oct 25, 2023
2 parents 765cfd9 + f0e20a2 commit 2a0be7b
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
push:
branches: [ master ]
pull_request:
branches: [ master, release* ]
branches: [ master, release*, iox-* ]

jobs:
pre-flight-check:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Code Linting on Pull-Requests

on:
pull_request:
branches: [ master, release* ]
branches: [ master, release*, iox-* ]

jobs:
clang-tidy-review:
Expand Down
2 changes: 1 addition & 1 deletion iceoryx_examples/complexdata/topic_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#define IOX_EXAMPLES_COMPLEXDATA_TOPIC_DATA_HPP

#include "iceoryx_dust/cxx/forward_list.hpp"
#include "iceoryx_hoofs/cxx/list.hpp"
#include "iox/list.hpp"
#include "iox/optional.hpp"
#include "iox/stack.hpp"
#include "iox/string.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,14 @@
//
// SPDX-License-Identifier: Apache-2.0

#ifndef IOX_HOOFS_CXX_LIST_INL
#define IOX_HOOFS_CXX_LIST_INL
#ifndef IOX_HOOFS_CONTAINER_LIST_INL
#define IOX_HOOFS_CONTAINER_LIST_INL


#include "iceoryx_hoofs/cxx/list.hpp"
#include "iox/list.hpp"
#include "iox/logging.hpp"


namespace iox
{
namespace cxx
{
/// @NOLINTJUSTIFICATION m_data fields are explicitly initialized whenever a new element is inserted
/// into the list
/// @NOLINTNEXTLINE(cppcoreguidelines-pro-type-member-init,hicpp-member-init)
Expand Down Expand Up @@ -699,7 +695,6 @@ inline bool list<T, Capacity>::isInvalidIterOrDifferentLists(const const_iterato
return isInvalidIterator(iter);
}

} // namespace cxx
} // namespace iox

#endif // IOX_HOOFS_CXX_LIST_INL
#endif // IOX_HOOFS_CONTAINER_LIST_INL
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
//
// SPDX-License-Identifier: Apache-2.0

#ifndef IOX_HOOFS_CXX_LIST_HPP
#define IOX_HOOFS_CXX_LIST_HPP
#ifndef IOX_HOOFS_CONTAINER_LIST_HPP
#define IOX_HOOFS_CONTAINER_LIST_HPP

#include "iceoryx_hoofs/cxx/requires.hpp"
#include "iox/uninitialized_array.hpp"
Expand All @@ -28,8 +28,6 @@

namespace iox
{
namespace cxx
{
/// @brief C++11 compatible bi-directional list implementation.
/// @details Adjustments in the API were done to not use exceptions and serve the requirement of
/// a data structure movable over shared memory.
Expand Down Expand Up @@ -386,9 +384,8 @@ class list
size_type m_size{0U};
}; // list

} // namespace cxx
} // namespace iox

#include "iceoryx_hoofs/internal/cxx/list.inl"
#include "iox/detail/list.inl"

#endif // IOX_HOOFS_CXX_LIST_HPP
#endif // IOX_HOOFS_CONTAINER_LIST_HPP
34 changes: 34 additions & 0 deletions iceoryx_hoofs/legacy/include/iceoryx_hoofs/cxx/list.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Copyright (c) 2023 by Mathias Kraus <[email protected]>. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0

#ifndef IOX_HOOFS_CXX_LIST_HPP
#define IOX_HOOFS_CXX_LIST_HPP

#include "iox/detail/deprecation_marker.hpp"
#include "iox/list.hpp"

IOX_DEPRECATED_HEADER_SINCE(3, "Please include 'iox/list.hpp' instead.")

namespace iox
{
namespace cxx
{
/// @deprecated use 'iox::list' instead of 'iox::cxx::list'
using iox::list;
} // namespace cxx
} // namespace iox

#endif // IOX_HOOFS_CXX_LIST_HPP
4 changes: 2 additions & 2 deletions iceoryx_hoofs/test/moduletests/test_cxx_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@
//
// SPDX-License-Identifier: Apache-2.0

#include "iceoryx_hoofs/cxx/list.hpp"
#include "iceoryx_hoofs/error_handling/error_handling.hpp"
#include "iceoryx_hoofs/testing/ctor_and_assignment_operator_test_class.hpp"
#include "iceoryx_hoofs/testing/fatal_failure.hpp"
#include "iox/attributes.hpp"
#include "iox/list.hpp"
#include "iox/logging.hpp"
#include "test.hpp"


namespace
{
using namespace ::testing;
using namespace iox::cxx;
using namespace iox;
using namespace iox::testing;

constexpr uint64_t TESTLISTCAPACITY{10U};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
#ifndef IOX_POSH_ROUDI_INTROSPECTION_PROCESS_INTROSPECTION_HPP
#define IOX_POSH_ROUDI_INTROSPECTION_PROCESS_INTROSPECTION_HPP

#include "iceoryx_hoofs/cxx/list.hpp"
#include "iceoryx_hoofs/internal/concurrent/periodic_task.hpp"
#include "iceoryx_posh/iceoryx_posh_types.hpp"
#include "iceoryx_posh/internal/popo/ports/publisher_port_user.hpp"
#include "iceoryx_posh/roudi/introspection_types.hpp"
#include "iox/function.hpp"
#include "iox/list.hpp"

#include <mutex>

Expand Down Expand Up @@ -94,7 +94,7 @@ class ProcessIntrospection
void send() noexcept;

private:
using ProcessList_t = cxx::list<ProcessIntrospectionData, MAX_PROCESS_NUMBER>;
using ProcessList_t = iox::list<ProcessIntrospectionData, MAX_PROCESS_NUMBER>;
ProcessList_t m_processList;
bool m_processListNewData{true}; // true because we want to have a valid field, even with an empty list

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#ifndef IOX_POSH_ROUDI_PROCESS_MANAGER_HPP
#define IOX_POSH_ROUDI_PROCESS_MANAGER_HPP

#include "iceoryx_hoofs/cxx/list.hpp"
#include "iceoryx_hoofs/posix_wrapper/posix_access_rights.hpp"
#include "iceoryx_posh/internal/mepoo/segment_manager.hpp"
#include "iceoryx_posh/internal/roudi/introspection/process_introspection.hpp"
Expand All @@ -27,6 +26,7 @@
#include "iceoryx_posh/mepoo/chunk_header.hpp"
#include "iceoryx_posh/version/compatibility_check_level.hpp"
#include "iceoryx_posh/version/version_info.hpp"
#include "iox/list.hpp"

#include <cstdint>
#include <ctime>
Expand All @@ -46,7 +46,7 @@ class ProcessManagerInterface
class ProcessManager : public ProcessManagerInterface
{
public:
using ProcessList_t = cxx::list<Process, MAX_PROCESS_NUMBER>;
using ProcessList_t = iox::list<Process, MAX_PROCESS_NUMBER>;
using PortConfigInfo = iox::runtime::PortConfigInfo;

enum class TerminationFeedback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
// SPDX-License-Identifier: Apache-2.0

#include "iceoryx_dust/cxx/forward_list.hpp"
#include "iceoryx_hoofs/cxx/list.hpp"
#include "iceoryx_hoofs/testing/barrier.hpp"
#include "iceoryx_hoofs/testing/watch_dog.hpp"
#include "iceoryx_posh/popo/publisher.hpp"
#include "iceoryx_posh/popo/subscriber.hpp"
#include "iceoryx_posh/roudi_env/minimal_roudi_config.hpp"
#include "iceoryx_posh/runtime/posh_runtime.hpp"
#include "iceoryx_posh/testing/roudi_gtest.hpp"
#include "iox/list.hpp"
#include "iox/optional.hpp"
#include "iox/stack.hpp"
#include "iox/string.hpp"
Expand Down

0 comments on commit 2a0be7b

Please sign in to comment.