FairMQ  1.4.14
C++ Message Queuing Library and Framework
DDSTask.h
1 /********************************************************************************
2  * Copyright (C) 2019 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 
9 #ifndef FAIR_MQ_SDK_DDSTASK_H
10 #define FAIR_MQ_SDK_DDSTASK_H
11 
12 #include <fairmq/sdk/DDSCollection.h>
13 
14 #include <ostream>
15 #include <cstdint>
16 
17 namespace fair {
18 namespace mq {
19 namespace sdk {
20 
25 class DDSTask
26 {
27  public:
28  using Id = std::uint64_t;
29 
30  explicit DDSTask(Id id, Id collectionId)
31  : fId(id)
32  , fCollectionId(collectionId)
33  {}
34 
35  Id GetId() const { return fId; }
36  DDSCollection::Id GetCollectionId() const { return fCollectionId; }
37 
38  friend auto operator<<(std::ostream& os, const DDSTask& task) -> std::ostream&
39  {
40  return os << "DDSTask id: " << task.fId << ", collection id: " << task.fCollectionId;
41  }
42 
43  private:
44  Id fId;
45  DDSCollection::Id fCollectionId;
46 };
47 
48 } // namespace sdk
49 } // namespace mq
50 } // namespace fair
51 
52 #endif /* FAIR_MQ_SDK_DDSTASK_H */
Represents a DDS task.
Definition: DDSTask.h:25
Tools for interfacing containers to the transport via polymorphic allocators.
Definition: DeviceRunner.h:23

privacy