Virgil Security Crypto library  2.4.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
virgil::crypto::VirgilDataSink Class Referenceabstract

This is base class for output streams. More...

#include <VirgilDataSink.h>

Inheritance diagram for virgil::crypto::VirgilDataSink:
virgil::crypto::stream::VirgilBytesDataSink virgil::crypto::stream::VirgilStreamDataSink

Public Member Functions

virtual bool isGood ()=0
 Return true if target object is able to write data.
 
virtual void write (const VirgilByteArray &data)=0
 Write data to the target object. More...
 

Static Public Member Functions

static void safeWrite (VirgilDataSink &sink, const VirgilByteArray &data)
 Write data to the sink in a safe way. More...
 

Detailed Description

This is base class for output streams.

Defines interface that allows write data to the output stream.

Member Function Documentation

static void virgil::crypto::VirgilDataSink::safeWrite ( VirgilDataSink sink,
const VirgilByteArray data 
)
static

Write data to the sink in a safe way.

Write only if data is not empty and sink is good, otherwise - do nothing

Parameters
sinksink to be written to.
datadata to be written.
virtual void virgil::crypto::VirgilDataSink::write ( const VirgilByteArray data)
pure virtual

Write data to the target object.

Parameters
datadata to be written, SHOULD NOT be empty.

Implemented in virgil::crypto::stream::VirgilStreamDataSink, and virgil::crypto::stream::VirgilBytesDataSink.


The documentation for this class was generated from the following file: