Virgil Security Crypto library  2.4.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
VirgilStreamDataSource.h
1 
37 #ifndef VIRGIL_CRYPTO_VIRGIL_STREAM_DATA_SOURCE_H
38 #define VIRGIL_CRYPTO_VIRGIL_STREAM_DATA_SOURCE_H
39 
40 #include <istream>
41 
42 #include "../VirgilByteArray.h"
43 #include "../VirgilDataSource.h"
44 
45 namespace virgil { namespace crypto { namespace stream {
46 
53 public:
60  explicit VirgilStreamDataSource(std::istream& in, size_t chunkSize = 4096);
61 
65  virtual ~VirgilStreamDataSource() noexcept;
66 
70  virtual bool hasData();
71 
76 
77 private:
78  std::istream& in_;
79  size_t chunkSize_;
80 };
81 
82 }}}
83 
84 #endif /* VIRGIL_CRYPTO_VIRGIL_STREAM_DATA_SOURCE_H */
virtual bool hasData()
Overriding of VirgilDataSource::hasData() method.
virtual ~VirgilStreamDataSource() noexcept
Polymorphic destructor.
std::vector< unsigned char > VirgilByteArray
This type represents a sequence of bytes.
Definition: VirgilByteArray.h:50
virtual virgil::crypto::VirgilByteArray read()
Overriding of VirgilDataSource::read() method.
This is base class for input streams.
Definition: VirgilDataSource.h:49
VirgilStreamDataSource(std::istream &in, size_t chunkSize=4096)
Creates data sink based on std::istream object.
C++ stream implementation of the VirgilDataSource class.
Definition: VirgilStreamDataSource.h:52