Skip to content

Commit 998b5a4

Browse files
Merge pull request #1881 from ApexAI/iox-1391-move-buffer-and-container-classes
iox-1391 move buffer and container classes
2 parents 53ee7c0 + a16d257 commit 998b5a4

File tree

69 files changed

+248
-194
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+248
-194
lines changed

.clang-tidy-diff-scans.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@
6464
./iceoryx_hoofs/time/**/*
6565
./iceoryx_hoofs/test/moduletests/test_time_*
6666

67+
./iceoryx_hoofs/buffer/**/*
68+
./iceoryx_hoofs/test/moduletests/test_buffer_*
69+
6770
# IMPORTANT:
6871
# after the first # everything is considered a comment, add new files and
6972
# directories only at the top of this file

doc/website/release-notes/iceoryx-unreleased.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
- Add check in `RelativePointer::get` to avoid `nullptr` dereferencing [\#1596](https://github.com/eclipse-iceoryx/iceoryx/issues/1596)
5757
- iceoryx_posh_testing cannot find iceoryx_hoofs_testing in CMake [\#1602](https://github.com/eclipse-iceoryx/iceoryx/issues/1602)
5858
- locking_policy.cpp calls error handler without log message [\#1609](https://github.com/eclipse-iceoryx/iceoryx/issues/1609)
59-
- Implement destructor, copy and move operations in `cxx::stack` [\#1469](https://github.com/eclipse-iceoryx/iceoryx/issues/1469)
59+
- Implement destructor, copy and move operations in `iox::stack` [\#1469](https://github.com/eclipse-iceoryx/iceoryx/issues/1469)
6060
- `gw::GatewayGeneric` sometimes terminates discovery and forward threads immediately [\#1666](https://github.com/eclipse-iceoryx/iceoryx/issues/1666)
6161
- `m_originId` in `mepoo::ChunkHeader` sometimes not set [\#1668](https://github.com/eclipse-iceoryx/iceoryx/issues/1668)
6262
- Remove `cxx::unique_ptr::reset` [\#1655](https://github.com/eclipse-iceoryx/iceoryx/issues/1655)
@@ -104,7 +104,7 @@
104104
- Extract `iceoryx_hoofs/platform` into separate package `iceoryx_platform` [\#1615](https://github.com/eclipse-iceoryx/iceoryx/issues/1615)
105105
- `cxx::unique_ptr` is no longer nullable [\#1104](https://github.com/eclipse-iceoryx/iceoryx/issues/1104)
106106
- Use builder pattern in mutex [\#1036](https://github.com/eclipse-iceoryx/iceoryx/issues/1036)
107-
- Change return type of `cxx::vector::erase` to bool [\#1662](https://github.com/eclipse-iceoryx/iceoryx/issues/1662)
107+
- Change return type of `vector::erase` to bool [\#1662](https://github.com/eclipse-iceoryx/iceoryx/issues/1662)
108108
- `ReleativePointer::registerPtr` returns `iox::optional` [\#605](https://github.com/eclipse-iceoryx/iceoryx/issues/605)
109109
- `cxx::function` is no longer nullable [\#1104](https://github.com/eclipse-iceoryx/iceoryx/issues/1104)
110110
- Rename `BaseRelativePointer` to `UntypedRelativePointer` [\#605](https://github.com/eclipse-iceoryx/iceoryx/issues/605)
@@ -594,7 +594,7 @@
594594
myMutex->lock();
595595
```
596596

597-
26. Change return type of `cxx::vector::erase` from iterator to bool
597+
26. Change return type of `vector::erase` from iterator to bool
598598

599599
```cpp
600600
// before

iceoryx_binding_c/test/moduletests/test_listener.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ class iox_listener_test : public Test
192192
std::unique_ptr<PoshRuntimeMock> runtimeMock = PoshRuntimeMock::create("long_live_lord_buckethead");
193193

194194
iox_user_trigger_storage_t m_userTriggerStorage[MAX_NUMBER_OF_EVENTS_PER_LISTENER + 1U];
195-
cxx::vector<iox_user_trigger_t, MAX_NUMBER_OF_EVENTS_PER_LISTENER + 1U> m_userTrigger;
195+
vector<iox_user_trigger_t, MAX_NUMBER_OF_EVENTS_PER_LISTENER + 1U> m_userTrigger;
196196

197197
static constexpr uint32_t NUM_CHUNKS_IN_POOL = MAX_CHUNKS_HELD_PER_SUBSCRIBER_SIMULTANEOUSLY + 2U;
198198
static constexpr uint32_t CHUNK_SIZE = 128U;
@@ -210,10 +210,9 @@ class iox_listener_test : public Test
210210
{"ServiceA", "InstanceA", "EventA"}, "der_wilde_bert", ServerOptions(), &m_memoryManager};
211211
ClientPortData clientPortData{
212212
{"ServiceA", "InstanceA", "EventA"}, "rudi_ruessel", ClientOptions(), &m_memoryManager};
213-
cxx::vector<iox::popo::SubscriberPortData, MAX_NUMBER_OF_EVENTS_PER_LISTENER + 1> m_subscriberPortData;
214-
cxx::vector<cpp2c_Subscriber, MAX_NUMBER_OF_EVENTS_PER_LISTENER + 1> m_subscriber;
215-
cxx::vector<ChunkQueuePusher<SubscriberPortData::ChunkQueueData_t>, MAX_NUMBER_OF_EVENTS_PER_LISTENER + 1>
216-
m_chunkPusher;
213+
vector<iox::popo::SubscriberPortData, MAX_NUMBER_OF_EVENTS_PER_LISTENER + 1> m_subscriberPortData;
214+
vector<cpp2c_Subscriber, MAX_NUMBER_OF_EVENTS_PER_LISTENER + 1> m_subscriber;
215+
vector<ChunkQueuePusher<SubscriberPortData::ChunkQueueData_t>, MAX_NUMBER_OF_EVENTS_PER_LISTENER + 1> m_chunkPusher;
217216
static constexpr std::chrono::milliseconds TIMEOUT = std::chrono::milliseconds(100);
218217
};
219218
constexpr std::chrono::milliseconds iox_listener_test::TIMEOUT;

iceoryx_binding_c/test/moduletests/test_service_discovery.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ extern "C" {
3131
namespace
3232
{
3333
using namespace ::testing;
34-
using description_vector = cxx::vector<iox_service_description_t, MAX_FINDSERVICE_RESULT_SIZE>;
34+
using description_vector = vector<iox_service_description_t, MAX_FINDSERVICE_RESULT_SIZE>;
3535

3636
class iox_service_discovery_test : public RouDi_GTest
3737
{

iceoryx_binding_c/test/moduletests/test_wait_set.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,14 @@ class iox_ws_test : public Test
8686
std::unique_ptr<PoshRuntimeMock> runtimeMock = PoshRuntimeMock::create("rudi_ruessel");
8787
const iox::capro::ServiceDescription TEST_SERVICE_DESCRIPTION{"a", "b", "c"};
8888
iox::popo::SubscriberOptions m_subscriberOptions{MAX_CHUNKS_HELD_PER_SUBSCRIBER_SIMULTANEOUSLY, 0U};
89-
cxx::vector<iox::popo::SubscriberPortData, MAX_NUMBER_OF_ATTACHMENTS_PER_WAITSET + 1U> m_portDataVector;
90-
cxx::vector<cpp2c_Subscriber, MAX_NUMBER_OF_ATTACHMENTS_PER_WAITSET + 1U> m_subscriberVector;
89+
vector<iox::popo::SubscriberPortData, MAX_NUMBER_OF_ATTACHMENTS_PER_WAITSET + 1U> m_portDataVector;
90+
vector<cpp2c_Subscriber, MAX_NUMBER_OF_ATTACHMENTS_PER_WAITSET + 1U> m_subscriberVector;
9191

9292
ConditionVariableData m_condVar{"Horscht"};
9393
WaitSetMock* m_sut = new WaitSetMock{m_condVar};
9494

9595
iox_user_trigger_storage_t m_userTriggerStorage[MAX_NUMBER_OF_ATTACHMENTS_PER_WAITSET + 1];
96-
cxx::vector<iox_user_trigger_t, MAX_NUMBER_OF_ATTACHMENTS_PER_WAITSET + 1> m_userTrigger;
96+
vector<iox_user_trigger_t, MAX_NUMBER_OF_ATTACHMENTS_PER_WAITSET + 1> m_userTrigger;
9797

9898
iox_notification_info_t m_eventInfoStorage[MAX_NUMBER_OF_ATTACHMENTS_PER_WAITSET];
9999
uint64_t m_missedElements = 0U;

iceoryx_dust/include/iceoryx_dust/internal/cli/arguments.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
#include "iceoryx_dust/cli/types.hpp"
2020
#include "iceoryx_dust/cxx/convert.hpp"
2121
#include "iceoryx_dust/internal/cli/option.hpp"
22-
#include "iceoryx_hoofs/cxx/vector.hpp"
2322
#include "iox/expected.hpp"
23+
#include "iox/vector.hpp"
2424

2525
namespace iox
2626
{
@@ -67,7 +67,7 @@ class Arguments
6767

6868
private:
6969
const char* m_binaryName;
70-
cxx::vector<Option, MAX_NUMBER_OF_ARGUMENTS> m_arguments;
70+
vector<Option, MAX_NUMBER_OF_ARGUMENTS> m_arguments;
7171
};
7272
} // namespace internal
7373
} // namespace cli

iceoryx_dust/include/iceoryx_dust/internal/cli/option_definition.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include "iceoryx_dust/cli/types.hpp"
2121
#include "iceoryx_dust/internal/cli/arguments.hpp"
2222
#include "iceoryx_hoofs/cxx/function.hpp"
23-
#include "iceoryx_hoofs/cxx/vector.hpp"
23+
#include "iox/vector.hpp"
2424
#include <cstdint>
2525

2626
namespace iox
@@ -89,7 +89,7 @@ class OptionDefinition
8989

9090
private:
9191
OptionDescription_t m_programDescription;
92-
cxx::vector<OptionWithDetails, MAX_NUMBER_OF_ARGUMENTS> m_availableOptions;
92+
vector<OptionWithDetails, MAX_NUMBER_OF_ARGUMENTS> m_availableOptions;
9393
cxx::function<void()> m_onFailureCallback;
9494
};
9595

iceoryx_dust/include/iceoryx_dust/internal/cli/option_manager.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
#include "iceoryx_dust/internal/cli/command_line_parser.hpp"
2121
#include "iceoryx_dust/internal/cli/option_definition.hpp"
2222
#include "iceoryx_hoofs/cxx/function.hpp"
23-
#include "iceoryx_hoofs/cxx/vector.hpp"
23+
#include "iox/vector.hpp"
2424

2525
namespace iox
2626
{
2727
namespace cli
2828
{
2929
namespace internal
3030
{
31-
using CmdAssignments_t = cxx::vector<cxx::function<void(Arguments&)>, MAX_NUMBER_OF_ARGUMENTS>;
31+
using CmdAssignments_t = vector<cxx::function<void(Arguments&)>, MAX_NUMBER_OF_ARGUMENTS>;
3232

3333
/// @brief Manages command line options which were defined via the IOX_CLI_ macros in a
3434
/// user defined struct.

iceoryx_examples/complexdata/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ To implement zero-copy data transfer we use a shared memory approach. This requi
66
contained in the shared memory and must not internally use pointers or references. The complete list of restrictions can be found
77
[here](../../doc/website/getting-started/overview.md#restrictions). Therefore, most of the STL types cannot be used, but we
88
reimplemented some [constructs](../../iceoryx_hoofs/README.md#cxx). This example shows how
9-
to send/receive a iox::cxx::vector and how to send/receive a complex data structure containing some of our STL container surrogates.
9+
to send/receive a iox::vector and how to send/receive a complex data structure containing some of our STL container surrogates.
1010

1111
## Expected Output
1212

@@ -17,14 +17,14 @@ to send/receive a iox::cxx::vector and how to send/receive a complex data struct
1717
The following examples demonstrate how to send/receive the STL containers that were reimplemented in iceoryx so that they meet
1818
our requirements.
1919

20-
### Publisher application sending a `iox::cxx::vector`
20+
### Publisher application sending a `iox::vector`
2121

2222
In this example we want our publisher to send a vector containing double. Since we cannot use dynamic memory, we use the
23-
`iox::cxx::vector` with a capacity of 5.
23+
`iox::vector` with a capacity of 5.
2424

2525
<!--[geoffrey][iceoryx_examples/complexdata/iox_publisher_vector.cpp][create publisher]-->
2626
```cpp
27-
iox::popo::Publisher<iox::cxx::vector<double, 5>> publisher({"Radar", "FrontRight", "VectorData"});
27+
iox::popo::Publisher<iox::vector<double, 5>> publisher({"Radar", "FrontRight", "VectorData"});
2828
```
2929
3030
We use a while-loop similar to the one described in the
@@ -45,7 +45,7 @@ The only difference here to the `std::vector` is that `emplace_back` returns a b
4545
false otherwise. `emplace_back` fails when the vector is already full. In our case, we can omit the check of the return value
4646
since the for-loop doesn't exceed the capacity of the vector.
4747

48-
### Subscriber application receiving a `iox::cxx::vector`
48+
### Subscriber application receiving a `iox::vector`
4949

5050
Our subscriber application iterates over the received vector to print its entries to the console. Note that the `separator` is only
5151
used for a easy to read output.

iceoryx_examples/complexdata/iox_publisher_vector.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//
1515
// SPDX-License-Identifier: Apache-2.0
1616

17-
#include "iceoryx_hoofs/cxx/vector.hpp"
17+
#include "iox/vector.hpp"
1818

1919
#include "iceoryx_dust/posix_wrapper/signal_watcher.hpp"
2020
#include "iceoryx_posh/popo/publisher.hpp"
@@ -29,7 +29,7 @@ int main()
2929

3030
// initialize publisher
3131
//! [create publisher]
32-
iox::popo::Publisher<iox::cxx::vector<double, 5>> publisher({"Radar", "FrontRight", "VectorData"});
32+
iox::popo::Publisher<iox::vector<double, 5>> publisher({"Radar", "FrontRight", "VectorData"});
3333
//! [create publisher]
3434

3535
uint64_t ct = 0;

0 commit comments

Comments
 (0)