DDS-PSM-C++  1.0
ISO C++ API for OpenSplice DDS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
LoanedSamples.hpp
Go to the documentation of this file.
1 #ifndef OMG_DDS_SUB_TLOANED_SAMPLES_HPP_
2 #define OMG_DDS_SUB_TLOANED_SAMPLES_HPP_
3 
5 #include <dds/sub/Sample.hpp>
6 
8 
9 namespace dds {
10  namespace sub {
11  template <typename T,
12  template <typename Q> class DELEGATE = detail::LoanedSamples>
14 
15  // Used by C++11 compilers to allow for using LoanedSamples
16  // and SharedSamples in a range based for-loop.
17  template <typename T> typename T::iterator begin(T& t);
18  template <typename T> typename T::iterator end(T& t);
19 
20  template <typename T> typename T::const_iterator cbegin(const T& t);
21  template <typename T> typename T::const_iterator cend(const T& t);
22  }
23 
24 }
25 
32 template <typename T,
33 template <typename Q> class DELEGATE>
35 {
36 public:
37  typedef T DataType;
38  typedef typename DELEGATE<T>::iterator iterator;
39  typedef typename DELEGATE<T>::const_iterator const_iterator;
40 
42 
43 public:
44  LoanedSamples();
45 
50 
51 
52 public:
53  const_iterator begin() const;
54 
55  const_iterator end() const;
56 
57  const DELEGATE_REF_T& delegate() const;
58 
60 
61  uint32_t length() const;
62 
63 private:
64  DELEGATE_REF_T delegate_;
65 };
66 
67 namespace dds {
68  namespace sub {
69  template <typename T, template <typename Q> class D>
71  move(LoanedSamples<T, D<T> >& a);
72  }
73 }
74 #endif /* OMG_DDS_SUB_TLOANED_SAMPLES_HPP_ */