From 456b65871a25f6444cd948a7a1d4ba38ef559f8a Mon Sep 17 00:00:00 2001 From: Alexey Rybalchenko Date: Thu, 5 Sep 2019 14:31:40 +0200 Subject: [PATCH] sdk: Add DDSCollection class --- fairmq/sdk/CMakeLists.txt | 1 + fairmq/sdk/DDSCollection.h | 49 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 fairmq/sdk/DDSCollection.h diff --git a/fairmq/sdk/CMakeLists.txt b/fairmq/sdk/CMakeLists.txt index 694db1ac..883366c2 100644 --- a/fairmq/sdk/CMakeLists.txt +++ b/fairmq/sdk/CMakeLists.txt @@ -18,6 +18,7 @@ set(SDK_PUBLIC_HEADER_FILES AsioAsyncOp.h AsioBase.h DDSAgent.h + DDSCollection.h DDSEnvironment.h DDSSession.h DDSTask.h diff --git a/fairmq/sdk/DDSCollection.h b/fairmq/sdk/DDSCollection.h new file mode 100644 index 00000000..a17a7d94 --- /dev/null +++ b/fairmq/sdk/DDSCollection.h @@ -0,0 +1,49 @@ +/******************************************************************************** + * Copyright (C) 2019 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH * + * * + * This software is distributed under the terms of the * + * GNU Lesser General Public Licence (LGPL) version 3, * + * copied verbatim in the file "LICENSE" * + ********************************************************************************/ + +#ifndef FAIR_MQ_SDK_DDSCOLLECTION_H +#define FAIR_MQ_SDK_DDSCOLLECTION_H + +// #include + +#include +#include + +namespace fair { +namespace mq { +namespace sdk { + +/** + * @class DDSCollection + * @brief Represents a DDS collection + */ +class DDSCollection +{ + public: + using Id = std::uint64_t; + + explicit DDSCollection(Id id) + : fId(id) + {} + + Id GetId() const { return fId; } + + friend auto operator<<(std::ostream& os, const DDSCollection& collection) -> std::ostream& + { + return os << "DDSCollection id: " << collection.fId; + } + + private: + Id fId; +}; + +} // namespace sdk +} // namespace mq +} // namespace fair + +#endif /* FAIR_MQ_SDK_DDSCOLLECTION_H */