/* * Copyright(c) 2006 to 2020 ZettaScale Technology and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License * v. 1.0 which is available at * http://www.eclipse.org/org/documents/edl-v10.php. * * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause */ #ifndef CYCLONEDDS_DDS_TOPIC_TOPICINSTANCE_HPP_ #define CYCLONEDDS_DDS_TOPIC_TOPICINSTANCE_HPP_ /** * @file */ /* * OMG PSM class declaration */ #include // Implementation namespace dds { namespace topic { template TopicInstance::TopicInstance() : h_(dds::core::null) {} template TopicInstance::TopicInstance(const ::dds::core::InstanceHandle& h) : h_(h), sample_() {} template TopicInstance::TopicInstance(const ::dds::core::InstanceHandle& h, const T& sample) : h_(h), sample_(sample) { } template TopicInstance::operator const ::dds::core::InstanceHandle() const { return h_; } template const ::dds::core::InstanceHandle TopicInstance::handle() const { return h_; } template void TopicInstance::handle(const ::dds::core::InstanceHandle& h) { h_ = h; } template const T& TopicInstance::sample() const { return sample_; } template T& TopicInstance::sample() { return sample_; } template void TopicInstance::sample(const T& sample) { sample_ = sample; } } } // End of implementation #endif /* CYCLONEDDS_DDS_TOPIC_TOPICINSTANCE_HPP_ */