c2pa-c
C++ API for c2pa-c library
Loading...
Searching...
No Matches
c2pa::CppIStream Class Reference

Input stream IStream wrapper for C2paStream. More...

#include <c2pa.hpp>

Inheritance diagram for c2pa::CppIStream:
Collaboration diagram for c2pa::CppIStream:

Public Member Functions

template<typename IStream >
 CppIStream (IStream &istream)
 Construct an input stream wrapper from a std::istream-derived object.
 
 CppIStream (const CppIStream &)=delete
 
CppIStreamoperator= (const CppIStream &)=delete
 
 CppIStream (CppIStream &&)=delete
 
CppIStreamoperator= (CppIStream &&)=delete
 
 ~CppIStream ()
 

Public Attributes

C2paStream * c_stream
 Pointer to the underlying C2paStream.
 

Friends

class Reader
 

Detailed Description

Input stream IStream wrapper for C2paStream.

This class is used to wrap an input stream for use with the C2PA library.

Constructor & Destructor Documentation

◆ CppIStream() [1/3]

template<typename IStream >
c2pa::CppIStream::CppIStream ( IStream &  istream)
inlineexplicit

Construct an input stream wrapper from a std::istream-derived object.

Template Parameters
IStreamType derived from std::istream.
Parameters
istreamThe input stream to wrap (must be open and valid).
Exceptions
C2paExceptionif stream wrapper creation fails.
444 {
445 static_assert(std::is_base_of<std::istream, IStream>::value,
446 "Stream must be derived from std::istream");
447 c_stream = c2pa_create_stream(reinterpret_cast<StreamContext *>(&istream), reader, seeker, writer, flusher);
448 if (c_stream == nullptr) {
449 throw C2paException("Failed to create input stream wrapper: is stream open and valid?");
450 }
451 }
C2paStream * c_stream
Pointer to the underlying C2paStream.
Definition c2pa.hpp:437

◆ CppIStream() [2/3]

c2pa::CppIStream::CppIStream ( const CppIStream )
delete

◆ CppIStream() [3/3]

c2pa::CppIStream::CppIStream ( CppIStream &&  )
delete

◆ ~CppIStream()

c2pa::CppIStream::~CppIStream ( )

Member Function Documentation

◆ operator=() [1/2]

CppIStream & c2pa::CppIStream::operator= ( const CppIStream )
delete

◆ operator=() [2/2]

CppIStream & c2pa::CppIStream::operator= ( CppIStream &&  )
delete

Friends And Related Symbol Documentation

◆ Reader

friend class Reader
friend

Member Data Documentation

◆ c_stream

C2paStream* c2pa::CppIStream::c_stream

Pointer to the underlying C2paStream.


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