tvm
Loading...
Searching...
No Matches
Public Member Functions | List of all members
tvm::support::Base64InStream Class Reference

Input stream from base64 encoding. More...

#include <base64.h>

Inheritance diagram for tvm::support::Base64InStream:
Collaboration diagram for tvm::support::Base64InStream:

Public Member Functions

 Base64InStream (tvm::support::Stream *fs)
 
void InitPosition (void)
 initialize the stream position to beginning of next base64 stream
 
bool IsEOF (void) const
 whether current position is end of a base64 stream
 
size_t Read (void *ptr, size_t size) final
 Read raw bytes from the stream.
 
size_t Write (const void *ptr, size_t size) final
 Write raw bytes to the stream.
 
- Public Member Functions inherited from tvm::support::Stream
virtual ~Stream ()=default
 Virtual destructor.
 
template<typename T >
void Write (const T &data)
 Write a typed value using Serializer<T>.
 
template<typename T >
bool Read (T *out_data)
 Read a typed value using Serializer<T>.
 
template<typename T >
void WriteArray (const T *data, size_t num_elems)
 Write an array of typed values element by element.
 
template<typename T >
bool ReadArray (T *data, size_t num_elems)
 Read an array of typed values element by element.
 

Detailed Description

Input stream from base64 encoding.

Constructor & Destructor Documentation

◆ Base64InStream()

tvm::support::Base64InStream::Base64InStream ( tvm::support::Stream *  fs)
inlineexplicit

Member Function Documentation

◆ InitPosition()

void tvm::support::Base64InStream::InitPosition ( void  )
inline

initialize the stream position to beginning of next base64 stream

Note
call this function before actually start read

◆ IsEOF()

bool tvm::support::Base64InStream::IsEOF ( void  ) const
inline

whether current position is end of a base64 stream

◆ Read()

size_t tvm::support::Base64InStream::Read ( void *  ptr,
size_t  size 
)
inlinefinalvirtual

Read raw bytes from the stream.

Parameters
ptrDestination buffer.
sizeNumber of bytes to read.
Returns
Number of bytes actually read.

Implements tvm::support::Stream.

◆ Write()

size_t tvm::support::Base64InStream::Write ( const void *  ptr,
size_t  size 
)
inlinefinalvirtual

Write raw bytes to the stream.

Parameters
ptrSource buffer.
sizeNumber of bytes to write.
Returns
Number of bytes actually written.

Implements tvm::support::Stream.


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