diff --git a/examples/cxx/publish_subscribe/src/publisher.cpp b/examples/cxx/publish_subscribe/src/publisher.cpp index 2688d1223..8ad3bfe70 100644 --- a/examples/cxx/publish_subscribe/src/publisher.cpp +++ b/examples/cxx/publish_subscribe/src/publisher.cpp @@ -15,9 +15,16 @@ int main() { using namespace iox2; - auto node = NodeBuilder().template create().expect( + auto node = NodeBuilder().template create().expect( "successful node creation"); + auto service = + node.service_builder(ServiceName::create("My/Funk/ServiceName") + .expect("valid service name")) + .publish_subscribe() + .open_or_create() + .expect("successful service creation/opening"); + // Node::list( // Config{}, [](auto) { return iox::ok(CallbackProgression::Continue); // }); diff --git a/iceoryx2-ffi/cxx/include/iox2/attribute.hpp b/iceoryx2-ffi/cxx/include/iox2/attribute.hpp new file mode 100644 index 000000000..efc742cf4 --- /dev/null +++ b/iceoryx2-ffi/cxx/include/iox2/attribute.hpp @@ -0,0 +1,25 @@ +// Copyright (c) 2024 Contributors to the Eclipse Foundation +// +// See the NOTICE file(s) distributed with this work for additional +// information regarding copyright ownership. +// +// This program and the accompanying materials are made available under the +// terms of the Apache Software License 2.0 which is available at +// https://www.apache.org/licenses/LICENSE-2.0, or the MIT license +// which is available at https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: Apache-2.0 OR MIT +#ifndef IOX2_ATTRIBUTE_HPP_ +#define IOX2_ATTRIBUTE_HPP_ + +#include + +namespace iox2 { +class Attribute { + public: + const std::string& key() const {} + const std::string& value() const {} +}; +} // namespace iox2 + +#endif diff --git a/iceoryx2-ffi/cxx/include/iox2/attribute_set.hpp b/iceoryx2-ffi/cxx/include/iox2/attribute_set.hpp new file mode 100644 index 000000000..7636aeac6 --- /dev/null +++ b/iceoryx2-ffi/cxx/include/iox2/attribute_set.hpp @@ -0,0 +1,25 @@ +// Copyright (c) 2024 Contributors to the Eclipse Foundation +// +// See the NOTICE file(s) distributed with this work for additional +// information regarding copyright ownership. +// +// This program and the accompanying materials are made available under the +// terms of the Apache Software License 2.0 which is available at +// https://www.apache.org/licenses/LICENSE-2.0, or the MIT license +// which is available at https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: Apache-2.0 OR MIT +#ifndef IOX2_ATTRIBUTE_SET_HPP_ +#define IOX2_ATTRIBUTE_SET_HPP_ + +#include +#include + +namespace iox2 { +class AttributeSet { + public: + std::vector get(const std::string& key) const {} +}; +} // namespace iox2 + +#endif diff --git a/iceoryx2-ffi/cxx/include/iox2/attribute_specifier.hpp b/iceoryx2-ffi/cxx/include/iox2/attribute_specifier.hpp new file mode 100644 index 000000000..e06638c0b --- /dev/null +++ b/iceoryx2-ffi/cxx/include/iox2/attribute_specifier.hpp @@ -0,0 +1,29 @@ +// Copyright (c) 2024 Contributors to the Eclipse Foundation +// +// See the NOTICE file(s) distributed with this work for additional +// information regarding copyright ownership. +// +// This program and the accompanying materials are made available under the +// terms of the Apache Software License 2.0 which is available at +// https://www.apache.org/licenses/LICENSE-2.0, or the MIT license +// which is available at https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: Apache-2.0 OR MIT +#ifndef IOX2_ATTRIBUTE_SPECIFIER_HPP_ +#define IOX2_ATTRIBUTE_SPECIFIER_HPP_ + +#include + +#include "attribute_set.hpp" + +namespace iox2 { +class AttributeSpecifier { + public: + AttributeSpecifier() = default; + AttributeSpecifier& define(const std::string& key, + const std::string& value) {} + AttributeSet& attributes() const {} +}; +} // namespace iox2 + +#endif diff --git a/iceoryx2-ffi/cxx/include/iox2/attribute_verifier.hpp b/iceoryx2-ffi/cxx/include/iox2/attribute_verifier.hpp new file mode 100644 index 000000000..b8cbb12b9 --- /dev/null +++ b/iceoryx2-ffi/cxx/include/iox2/attribute_verifier.hpp @@ -0,0 +1,36 @@ +// Copyright (c) 2024 Contributors to the Eclipse Foundation +// +// See the NOTICE file(s) distributed with this work for additional +// information regarding copyright ownership. +// +// This program and the accompanying materials are made available under the +// terms of the Apache Software License 2.0 which is available at +// https://www.apache.org/licenses/LICENSE-2.0, or the MIT license +// which is available at https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: Apache-2.0 OR MIT +#ifndef IOX2_ATTRIBUTE_VERIFIER_HPP_ +#define IOX2_ATTRIBUTE_VERIFIER_HPP_ + +#include +#include +#include + +#include "attribute_set.hpp" + +namespace iox2 { +class AttributeVerifier { + public: + AttributeVerifier() = default; + AttributeVerifier& require(const std::string& key, + const std::string& value) {} + AttributeVerifier& require_key(const std::string& key) {} + const AttributeSet& attributes() const {} + std::vector keys() const {} + + iox::expected verify_requirements( + const AttributeSet& rhs) const {} +}; +} // namespace iox2 + +#endif diff --git a/iceoryx2-ffi/cxx/include/iox2/iceoryx2.hpp b/iceoryx2-ffi/cxx/include/iox2/iceoryx2.hpp deleted file mode 100644 index e69de29bb..000000000 diff --git a/iceoryx2-ffi/cxx/include/iox2/node.hpp b/iceoryx2-ffi/cxx/include/iox2/node.hpp index 476204888..763f9b627 100644 --- a/iceoryx2-ffi/cxx/include/iox2/node.hpp +++ b/iceoryx2-ffi/cxx/include/iox2/node.hpp @@ -21,6 +21,9 @@ #include "config.hpp" #include "internal/iceoryx2.hpp" #include "node_name.hpp" +#include "service_builder.hpp" +#include "service_name.hpp" +#include "service_type.hpp" namespace iox2 { enum class NodeListFailure {}; @@ -29,33 +32,21 @@ enum class NodeCreationFailure { InsufficientPermissions, InternalError }; enum class NodeCleanupFailure {}; -enum class NodeType { PROCESS_LOCAL, ZERO_COPY }; - class NodeId {}; -class ServiceName { - public: - static iox::expected create( - const char* value); - const std::string& as_string() const; -}; - -template -class Builder {}; - class NodeDetails { public: const NodeName& name() const; const Config& config() const; }; -template +template class AliveNodeView { public: const NodeId& id() const; const iox::optional details() const; }; -template +template class DeadNodeView { public: const NodeId& id() const; @@ -63,7 +54,7 @@ class DeadNodeView { iox::expected remove_stale_resources(); }; -template +template class NodeState { public: NodeState& if_alive(const iox::function&)>& callback); @@ -72,12 +63,12 @@ class NodeState { NodeState& is_undefined(const iox::function& callback); }; -template +template class Node { public: - NodeName& name() const; - NodeId& id() const; - Builder service_builder(const ServiceName& name) const; + NodeName& name() const {} + NodeId& id() const {} + ServiceBuilder service_builder(const ServiceName& name) const {} static iox::expected list( const Config& config, @@ -98,7 +89,7 @@ class NodeBuilder { public: NodeBuilder(); - template + template iox::expected, NodeCreationFailure> create() const&&; private: diff --git a/iceoryx2-ffi/cxx/include/iox2/port_factory_event.hpp b/iceoryx2-ffi/cxx/include/iox2/port_factory_event.hpp new file mode 100644 index 000000000..84f956bdd --- /dev/null +++ b/iceoryx2-ffi/cxx/include/iox2/port_factory_event.hpp @@ -0,0 +1,22 @@ +// Copyright (c) 2024 Contributors to the Eclipse Foundation +// +// See the NOTICE file(s) distributed with this work for additional +// information regarding copyright ownership. +// +// This program and the accompanying materials are made available under the +// terms of the Apache Software License 2.0 which is available at +// https://www.apache.org/licenses/LICENSE-2.0, or the MIT license +// which is available at https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: Apache-2.0 OR MIT +#ifndef IOX2_PORTFACTORY_EVENT_HPP_ +#define IOX2_PORTFACTORY_EVENT_HPP_ + +#include "service_type.hpp" + +namespace iox2 { +template +class PortFactoryEvent {}; +} // namespace iox2 + +#endif diff --git a/iceoryx2-ffi/cxx/include/iox2/port_factory_publish_subscribe.hpp b/iceoryx2-ffi/cxx/include/iox2/port_factory_publish_subscribe.hpp new file mode 100644 index 000000000..195a63f6d --- /dev/null +++ b/iceoryx2-ffi/cxx/include/iox2/port_factory_publish_subscribe.hpp @@ -0,0 +1,22 @@ +// Copyright (c) 2024 Contributors to the Eclipse Foundation +// +// See the NOTICE file(s) distributed with this work for additional +// information regarding copyright ownership. +// +// This program and the accompanying materials are made available under the +// terms of the Apache Software License 2.0 which is available at +// https://www.apache.org/licenses/LICENSE-2.0, or the MIT license +// which is available at https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: Apache-2.0 OR MIT +#ifndef IOX2_PORTFACTORY_PUBLISH_SUBSCRIBE_HPP_ +#define IOX2_PORTFACTORY_PUBLISH_SUBSCRIBE_HPP_ + +#include "service_type.hpp" + +namespace iox2 { +template +class PortFactoryPublishSubscribe {}; +} // namespace iox2 + +#endif diff --git a/iceoryx2-ffi/cxx/include/iox2/service_builder.hpp b/iceoryx2-ffi/cxx/include/iox2/service_builder.hpp new file mode 100644 index 000000000..de3226f83 --- /dev/null +++ b/iceoryx2-ffi/cxx/include/iox2/service_builder.hpp @@ -0,0 +1,31 @@ +// Copyright (c) 2024 Contributors to the Eclipse Foundation +// +// See the NOTICE file(s) distributed with this work for additional +// information regarding copyright ownership. +// +// This program and the accompanying materials are made available under the +// terms of the Apache Software License 2.0 which is available at +// https://www.apache.org/licenses/LICENSE-2.0, or the MIT license +// which is available at https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: Apache-2.0 OR MIT +#ifndef IOX2_SERVICE_BUILDER_HPP_ +#define IOX2_SERVICE_BUILDER_HPP_ + +#include "service_builder_event.hpp" +#include "service_builder_publish_subscribe.hpp" +#include "service_type.hpp" + +namespace iox2 { + +template +class ServiceBuilder { + public: + template + ServiceBuilderPublishSubscribe publish_subscribe() {} + + ServiceBuilderEvent event() {} +}; + +} // namespace iox2 +#endif diff --git a/iceoryx2-ffi/cxx/include/iox2/service_builder_event.hpp b/iceoryx2-ffi/cxx/include/iox2/service_builder_event.hpp new file mode 100644 index 000000000..b2dc7d595 --- /dev/null +++ b/iceoryx2-ffi/cxx/include/iox2/service_builder_event.hpp @@ -0,0 +1,123 @@ +// Copyright (c) 2024 Contributors to the Eclipse Foundation +// +// See the NOTICE file(s) distributed with this work for additional +// information regarding copyright ownership. +// +// This program and the accompanying materials are made available under the +// terms of the Apache Software License 2.0 which is available at +// https://www.apache.org/licenses/LICENSE-2.0, or the MIT license +// which is available at https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: Apache-2.0 OR MIT +#ifndef IOX2_SERVICE_EVENT_BUILDER_HPP_ +#define IOX2_SERVICE_EVENT_BUILDER_HPP_ + +#include +#include +#include + +#include "attribute_specifier.hpp" +#include "attribute_verifier.hpp" +#include "port_factory_event.hpp" +#include "service_type.hpp" + +namespace iox2 { +enum class EventOpenError { + /// The [`Service`] does not exist. + DoesNotExist, + /// The process has not enough permissions to open the [`Service`] + InsufficientPermissions, + /// Some underlying resources of the [`Service`] do not exist which indicate + /// a corrupted + /// [`Service`]state. + ServiceInCorruptedState, + /// The [`Service`] has the wrong messaging pattern. + IncompatibleMessagingPattern, + /// The [`AttributeVerifier`] required attributes that the [`Service`] does + /// not satisfy. + IncompatibleAttributes, + /// Errors that indicate either an implementation issue or a wrongly + /// configured system. + InternalFailure, + /// The [`Service`]s creation timeout has passed and it is still not + /// initialized. Can be caused + /// by a process that crashed during [`Service`] creation. + HangsInCreation, + /// The [`Service`] supports less + /// [`Notifier`](crate::port::notifier::Notifier)s than requested. + DoesNotSupportRequestedAmountOfNotifiers, + /// The [`Service`] supports less + /// [`Listener`](crate::port::listener::Listener)s than requested. + DoesNotSupportRequestedAmountOfListeners, + /// The [`Service`] supported [`EventId`] is smaller than the requested max + /// [`EventId`]. + DoesNotSupportRequestedMaxEventId, + /// The [`Service`] supports less [`Node`](crate::node::Node)s than + /// requested. + DoesNotSupportRequestedAmountOfNodes, + /// The maximum number of [`Node`](crate::node::Node)s have already opened + /// the [`Service`]. + ExceedsMaxNumberOfNodes, + /// The [`Service`] is marked for destruction and currently cleaning up + /// since no one is using it anymore. + /// When the call creation call is repeated with a little delay the + /// [`Service`] should be + /// recreatable. + IsMarkedForDestruction, +}; + +enum class EventCreateError { + /// Some underlying resources of the [`Service`] are either missing, + /// corrupted or unaccessible. + ServiceInCorruptedState, + /// Errors that indicate either an implementation issue or a wrongly + /// configured system. + InternalFailure, + /// Multiple processes are trying to create the same [`Service`]. + IsBeingCreatedByAnotherInstance, + /// The [`Service`] already exists. + AlreadyExists, + /// The [`Service`]s creation timeout has passed and it is still not + /// initialized. Can be caused + /// by a process that crashed during [`Service`] creation. + HangsInCreation, + /// The process has insufficient permissions to create the [`Service`]. + InsufficientPermissions, + /// The system has cleaned up the [`Service`] but there are still endpoints + /// like + /// [`Publisher`](crate::port::publisher::Publisher) or + /// [`Subscriber`](crate::port::subscriber::Subscriber) alive or + /// [`Sample`](crate::sample::Sample) or + /// [`SampleMut`](crate::sample_mut::SampleMut) in use. + OldConnectionsStillActive, +}; + +enum class EventOpenOrCreateError {}; + +template +class ServiceBuilderEvent { + IOX_BUILDER_PARAMETER(int64_t, max_nodes, -1) + IOX_BUILDER_PARAMETER(int64_t, event_id_max_value, -1) + IOX_BUILDER_PARAMETER(int64_t, max_notifiers, -1) + IOX_BUILDER_PARAMETER(int64_t, max_listeners, -1) + + public: + iox::expected, EventOpenOrCreateError> + open_or_create() && {} + + iox::expected, EventOpenOrCreateError> + open_or_create_with_attributes( + const AttributeVerifier& required_attributes) && {} + + iox::expected, EventOpenError> open() && {} + iox::expected, EventOpenError> open_with_attributes( + const AttributeVerifier& required_attributes) && {} + + iox::expected, EventOpenError> create() && {} + iox::expected, EventOpenError> create_with_attributes( + const AttributeSpecifier& attributes) && {} +}; + +} // namespace iox2 + +#endif diff --git a/iceoryx2-ffi/cxx/include/iox2/service_builder_publish_subscribe.hpp b/iceoryx2-ffi/cxx/include/iox2/service_builder_publish_subscribe.hpp new file mode 100644 index 000000000..271689146 --- /dev/null +++ b/iceoryx2-ffi/cxx/include/iox2/service_builder_publish_subscribe.hpp @@ -0,0 +1,148 @@ +// Copyright (c) 2024 Contributors to the Eclipse Foundation +// +// See the NOTICE file(s) distributed with this work for additional +// information regarding copyright ownership. +// +// This program and the accompanying materials are made available under the +// terms of the Apache Software License 2.0 which is available at +// https://www.apache.org/licenses/LICENSE-2.0, or the MIT license +// which is available at https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: Apache-2.0 OR MIT +#ifndef IOX2_SERVICE_BUILDER_PUBLISH_SUBSCRIBE_HPP_ +#define IOX2_SERVICE_BUILDER_PUBLISH_SUBSCRIBE_HPP_ + +#include +#include + +#include "attribute_specifier.hpp" +#include "attribute_verifier.hpp" +#include "port_factory_publish_subscribe.hpp" +#include "service_type.hpp" + +namespace iox2 { +enum class PublishSubscribeOpenError { + /// Service could not be openen since it does not exist + DoesNotExist, + /// Errors that indicate either an implementation issue or a wrongly + /// configured system. + InternalFailure, + /// The [`Service`] has the wrong payload type. + IncompatibleTypes, + /// The [`Service`] has the wrong messaging pattern. + IncompatibleMessagingPattern, + /// The [`AttributeVerifier`] required attributes that the [`Service`] does + /// not satisfy. + IncompatibleAttributes, + /// The [`Service`] has a lower minimum buffer size than requested. + DoesNotSupportRequestedMinBufferSize, + /// The [`Service`] has a lower minimum history size than requested. + DoesNotSupportRequestedMinHistorySize, + /// The [`Service`] has a lower minimum subscriber borrow size than + /// requested. + DoesNotSupportRequestedMinSubscriberBorrowedSamples, + /// The [`Service`] supports less + /// [`Publisher`](crate::port::publisher::Publisher)s than requested. + DoesNotSupportRequestedAmountOfPublishers, + /// The [`Service`] supports less + /// [`Subscriber`](crate::port::subscriber::Subscriber)s than requested. + DoesNotSupportRequestedAmountOfSubscribers, + /// The [`Service`] supports less [`Node`](crate::node::Node)s than + /// requested. + DoesNotSupportRequestedAmountOfNodes, + /// The [`Service`] required overflow behavior is not compatible. + IncompatibleOverflowBehavior, + /// The process has not enough permissions to open the [`Service`] + InsufficientPermissions, + /// Some underlying resources of the [`Service`] are either missing, + /// corrupted or unaccessible. + ServiceInCorruptedState, + /// The [`Service`]s creation timeout has passed and it is still not + /// initialized. Can be caused + /// by a process that crashed during [`Service`] creation. + HangsInCreation, + /// The maximum number of [`Node`](crate::node::Node)s have already opened + /// the [`Service`]. + ExceedsMaxNumberOfNodes, + /// The [`Service`] is marked for destruction and currently cleaning up + /// since no one is using it anymore. + /// When the call creation call is repeated with a little delay the + /// [`Service`] should be + /// recreatable. + IsMarkedForDestruction, +}; + +enum class PublishSubscribeCreateError { + /// Some underlying resources of the [`Service`] are either missing, + /// corrupted or unaccessible. + ServiceInCorruptedState, + /// Invalid [`Service`] configuration provided. The + /// [`Subscriber`](crate::port::subscriber::Subscriber)s buffer size must be + /// at least the size + /// of the history. Otherwise, how could it hold the whole history? + SubscriberBufferMustBeLargerThanHistorySize, + /// The [`Service`] already exists. + AlreadyExists, + /// The process has insufficient permissions to create the [`Service`]. + InsufficientPermissions, + /// Errors that indicate either an implementation issue or a wrongly + /// configured system. + InternalFailure, + /// Multiple processes are trying to create the same [`Service`]. + IsBeingCreatedByAnotherInstance, + /// The system has cleaned up the [`Service`] but there are still endpoints + /// like + /// [`Publisher`](crate::port::publisher::Publisher) or + /// [`Subscriber`](crate::port::subscriber::Subscriber) alive or + /// [`Sample`](crate::sample::Sample) or + /// [`SampleMut`](crate::sample_mut::SampleMut) in use. + OldConnectionsStillActive, + /// The [`Service`]s creation timeout has passed and it is still not + /// initialized. Can be caused + /// by a process that crashed during [`Service`] creation. + HangsInCreation, +}; + +enum class PublishSubscribeOpenOrCreateError {}; + +template +class ServiceBuilderPublishSubscribe { + IOX_BUILDER_PARAMETER(int64_t, payload_alignment, -1) + IOX_BUILDER_PARAMETER(bool, enable_safe_overflow, true) + IOX_BUILDER_PARAMETER(int64_t, subscriber_max_borrowed_samples, -1) + IOX_BUILDER_PARAMETER(int64_t, history_size, -1) + IOX_BUILDER_PARAMETER(int64_t, subscriber_max_buffer_size, -1) + IOX_BUILDER_PARAMETER(int64_t, max_subscribers, -1) + IOX_BUILDER_PARAMETER(int64_t, max_publishers, -1) + IOX_BUILDER_PARAMETER(int64_t, max_nodes, -1) + + public: + template + ServiceBuilderPublishSubscribe user_header() {} + + iox::expected, + PublishSubscribeOpenOrCreateError> + open_or_create() && {} + + iox::expected, + PublishSubscribeOpenOrCreateError> + open_or_create_with_attributes( + const AttributeVerifier& required_attributes) && {} + + iox::expected, + PublishSubscribeOpenError> + open() && {} + iox::expected, + PublishSubscribeOpenError> + open_with_attributes(const AttributeVerifier& required_attributes) && {} + + iox::expected, + PublishSubscribeOpenError> + create() && {} + iox::expected, + PublishSubscribeOpenError> + create_with_attributes(const AttributeSpecifier& attributes) && {} +}; +} // namespace iox2 + +#endif diff --git a/iceoryx2-ffi/cxx/include/iox2/service_name.hpp b/iceoryx2-ffi/cxx/include/iox2/service_name.hpp new file mode 100644 index 000000000..ee957f8be --- /dev/null +++ b/iceoryx2-ffi/cxx/include/iox2/service_name.hpp @@ -0,0 +1,30 @@ +// Copyright (c) 2024 Contributors to the Eclipse Foundation +// +// See the NOTICE file(s) distributed with this work for additional +// information regarding copyright ownership. +// +// This program and the accompanying materials are made available under the +// terms of the Apache Software License 2.0 which is available at +// https://www.apache.org/licenses/LICENSE-2.0, or the MIT license +// which is available at https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: Apache-2.0 OR MIT +#ifndef IOX2_SERVICE_NAME_HPP_ +#define IOX2_SERVICE_NAME_HPP_ + +#include + +#include "semantic_string.hpp" + +namespace iox2 { + +class ServiceName { + public: + static iox::expected create( + const char* value) {} + const std::string& as_string() const {} +}; + +} // namespace iox2 + +#endif diff --git a/iceoryx2-ffi/cxx/include/iox2/service_type.hpp b/iceoryx2-ffi/cxx/include/iox2/service_type.hpp new file mode 100644 index 000000000..df4f00b1c --- /dev/null +++ b/iceoryx2-ffi/cxx/include/iox2/service_type.hpp @@ -0,0 +1,19 @@ +// Copyright (c) 2024 Contributors to the Eclipse Foundation +// +// See the NOTICE file(s) distributed with this work for additional +// information regarding copyright ownership. +// +// This program and the accompanying materials are made available under the +// terms of the Apache Software License 2.0 which is available at +// https://www.apache.org/licenses/LICENSE-2.0, or the MIT license +// which is available at https://opensource.org/licenses/MIT. +// +// SPDX-License-Identifier: Apache-2.0 OR MIT +#ifndef IOX2_SERVICE_TYPE_HPP_ +#define IOX2_SERVICE_TYPE_HPP_ + +namespace iox2 { +enum class ServiceType { Local, Ipc }; +} + +#endif diff --git a/iceoryx2-ffi/cxx/src/node.cpp b/iceoryx2-ffi/cxx/src/node.cpp index f74c0dbdb..32cdec0f7 100644 --- a/iceoryx2-ffi/cxx/src/node.cpp +++ b/iceoryx2-ffi/cxx/src/node.cpp @@ -34,12 +34,12 @@ from( } // namespace iox namespace iox2 { -template +template Node::Node(iox2_node_h handle) : m_handle{handle} {} NodeBuilder::NodeBuilder() : m_handle{iox2_node_builder_new(nullptr)} {} -template +template iox::expected, NodeCreationFailure> NodeBuilder::create() const&& { iox2_node_h node_handle; int ret_val = iox2_node_builder_create( @@ -54,9 +54,9 @@ iox::expected, NodeCreationFailure> NodeBuilder::create() const&& { return iox::ok(Node(node_handle)); } -template iox::expected, NodeCreationFailure> +template iox::expected, NodeCreationFailure> NodeBuilder::create() const&&; -template iox::expected, NodeCreationFailure> +template iox::expected, NodeCreationFailure> NodeBuilder::create() const&&; } // namespace iox2