ADTF
sampleinstream_intf.h
Go to the documentation of this file.
1 
7 #pragma once
9 #include "streamitem_intf.h"
10 
11 #include <adtfucom3/adtf_ucom3.h>
12 
13 namespace adtf
14 {
15  namespace streaming
16  {
17  namespace ant
18  {
27  {
28  protected:
30  ~ISampleInStream() = default;
31  public:
33  ADTF_IID(ISampleInStream, "sampleinstream.ant.streaming.adtf.iid");
34 
35  public:
37  template <typename T>
39 
40  public:
45  virtual ISampleStreamAccess::tMode GetMode() const = 0;
46 
52  virtual tResult SetStreamError(const tResult& oError) = 0;
53 
68  virtual tResult Read(IStreamItem& oItem, tTimeStamp tmTimeOut = 0) const = 0;
69  };
70 
80  inline const ISampleInStream& operator >> (const ISampleInStream& oStreamReader,
81  IStreamItem& oItem)
82  {
83  oStreamReader.Read(oItem, 0);
84  return oStreamReader;
85  }
86  } //namespace ant
87 
89  using ant::ISampleInStream;
90 
91  } //namespac streaming
92 } //namespace adtf
Copyright © Audi Electronics Venture GmbH.
The ISampleInStream interface is return by the ISampleStream::Open call which allows to read from a c...
virtual ISampleStreamAccess::tMode GetMode() const =0
Returns the reading mode of ISampleStream (depend on the ISampleStream::Open).
virtual tResult SetStreamError(const tResult &oError)=0
Forward an error to the corresponding stream.
~ISampleInStream()=default
not destructable
ADTF_IID(ISampleInStream, "sampleinstream.ant.streaming.adtf.iid")
Definition of interface id.
virtual tResult Read(IStreamItem &oItem, tTimeStamp tmTimeOut=0) const =0
This will read one Queue Item from the readers queue.
The IStreamItem interface is the base type for all object which are passed through a stream.
Base class for every interface type within the uCOM.
Definition: object_intf.h:31
Base object pointer to realize binary compatible reference counting in interface methods.
const ISampleInStream & operator>>(const ISampleInStream &oStreamReader, IStreamItem &oItem)
Streaming Operator>> to read a sample from the readers queue.
Namespace for entire ADTF SDK.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.