OpenQuizz
Une application de gestion des contenus pédagogiques
IStream Class Reference
Inheritance diagram for IStream:
Collaboration diagram for IStream:

Public Member Functions

def __new__ (cls, type, size, stream, sha=None)
 
def __init__ (self, type, size, stream, sha=None)
 
def hexsha (self)
 
def read (self, size=-1)
 

Properties

 error = property(_error, _set_error)
 
 binsha = property(_binsha, _set_binsha)
 
 type = property(_type, _set_type)
 
 size = property(_size, _set_size)
 
 stream = property(_stream, _set_stream)
 

Detailed Description

Represents an input content stream to be fed into the ODB. It is mutable to allow
the ODB to record information about the operations outcome right in this instance.

It provides interfaces for the OStream and a StreamReader to allow the instance
to blend in without prior conversion.

The only method your content stream must support is 'read'

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  type,
  size,
  stream,
  sha = None 
)

Member Function Documentation

◆ __new__()

def __new__ (   cls,
  type,
  size,
  stream,
  sha = None 
)

◆ hexsha()

def hexsha (   self)
:return: our sha, hex encoded, 40 bytes

◆ read()

def read (   self,
  size = -1 
)
Implements a simple stream reader interface, passing the read call on
    to our internal stream

Property Documentation

◆ binsha

binsha = property(_binsha, _set_binsha)
static

◆ error

error = property(_error, _set_error)
static

◆ size

size = property(_size, _set_size)
static

◆ stream

stream = property(_stream, _set_stream)
static

◆ type

type = property(_type, _set_type)
static

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