ADTF
Loading...
Searching...
No Matches
stream_intf.h
Go to the documentation of this file.
1
7
8#ifndef _ADTF_UCOM_ANT_STREAM_INTERFACE_INCLUDES_HEADER_
9#define _ADTF_UCOM_ANT_STREAM_INTERFACE_INCLUDES_HEADER_
10
11namespace adtf
12{
13namespace ucom
14{
15namespace ant
16{
17
23class DOEXPORT IInputStream : public IObject
24{
25 public:
30 ADTF_IID(IInputStream, "input_stream.ant.ucom.adtf.iid");
31
32 public:
45 virtual tResult Read(void* pvBuffer, size_t nBufferSize, size_t* pnBytesRead = nullptr) const = 0;
46};
47
53class DOEXPORT IOutputStream: public IObject
54{
55 public:
60 ADTF_IID(IOutputStream, "output_stream.ant.ucom.adtf.iid");
61
62 public:
75 virtual tResult Write(const void* pvBuffer, size_t nBufferSize, size_t* pnBytesWritten = nullptr) = 0;
76};
77
83class DOEXPORT IStream : public IInputStream, public IOutputStream
84{
85public:
90 ADTF_IID(IStream, "stream.ant.ucom.adtf.iid");
91
93
94 public:
95 static const uint8_t m_ui8PlatformByteOrder;
96
97 public:
99 typedef enum : uint8_t
100 {
103
106
109 } tSeekOrigin;
110
112 typedef enum
113 {
115 SF_NONE = 0x00
116 } tStreamFlags;
117
118 public:
119
132 virtual tResult Seek(tFilePos nPos, tSeekOrigin eOrigin, tFilePos* pNewPos=nullptr) const = 0;
133
141 virtual tResult Reset() = 0;
142
150 virtual tResult Flush() = 0;
151
152 protected:
154 ~IStream() = default;
155};
156
157}//namespace ant
158
160using ant::IStream;
163
164
165}//namespace ucom
166}//namespace adtf
167
168//*************************************************************************************************
169#endif //_ADTF_UCOM_ANT_STREAM_INTERFACE_INCLUDES_HEADER_
#define UCOM_RESOLVE(...)
Resolve a path to a base class which is inherited multiple times.
Definition adtf_iid.h:46
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:736
Definition stream_intf.h:24
ADTF_IID(IInputStream, "input_stream.ant.ucom.adtf.iid")
virtual tResult Read(void *pvBuffer, size_t nBufferSize, size_t *pnBytesRead=nullptr) const =0
Definition object_intf.h:33
Definition stream_intf.h:54
ADTF_IID(IOutputStream, "output_stream.ant.ucom.adtf.iid")
virtual tResult Write(const void *pvBuffer, size_t nBufferSize, size_t *pnBytesWritten=nullptr)=0
Definition stream_intf.h:84
~IStream()=default
Protected destructor --> Only the final implementation can be destroyed!
virtual tResult Seek(tFilePos nPos, tSeekOrigin eOrigin, tFilePos *pNewPos=nullptr) const =0
ADTF_IID(IStream, "stream.ant.ucom.adtf.iid")
virtual tResult Flush()=0
virtual tResult Reset()=0
@ SF_NONE
no flags set.
Definition stream_intf.h:115
tSeekOrigin
Stream seek origin.
Definition stream_intf.h:100
@ SO_Current
The position is relative to the current stream position.
Definition stream_intf.h:105
@ SO_End
The position is relative to end of the stream.
Definition stream_intf.h:108
@ SO_Begin
The position origin is the beginning of the stream.
Definition stream_intf.h:102
Namespace for all functionality of the ADTF UCOM SDK provided since v3.0.
Definition test_runtime.h:14
Namespace for the ADTF uCOM SDK.
Definition adtf_system.h:324
Namespace for all functionality provided by ADTF and its SDKs.
Definition adtf_client_connector.h:14