CBMC
irep_serializationt Class Reference

#include <irep_serialization.h>

+ Collaboration diagram for irep_serializationt:

Classes

class  ireps_containert
 

Public Member Functions

 irep_serializationt (ireps_containert &ic)
 
const ireptreference_convert (std::istream &)
 
void reference_convert (const irept &irep, std::ostream &)
 Serialize an irept. More...
 
irep_idt read_string_ref (std::istream &)
 Read a string reference from the stream. More...
 
void write_string_ref (std::ostream &, const irep_idt &)
 Output a string and maintain a reference to it. More...
 
void clear ()
 
irep_idt read_gb_string (std::istream &)
 reads a string from the stream More...
 

Static Public Member Functions

static std::size_t read_gb_word (std::istream &)
 Interpret a stream of byte as a 7-bit encoded unsigned number. More...
 

Private Member Functions

void write_irep (std::ostream &, const irept &irep)
 
irept read_irep (std::istream &)
 

Private Attributes

ireps_containertireps_container
 
std::vector< char > read_buffer
 

Detailed Description

Definition at line 28 of file irep_serialization.h.

Constructor & Destructor Documentation

◆ irep_serializationt()

irep_serializationt::irep_serializationt ( ireps_containert ic)
inlineexplicit

Definition at line 57 of file irep_serialization.h.

Member Function Documentation

◆ clear()

void irep_serializationt::clear ( void  )
inline

Definition at line 70 of file irep_serialization.h.

◆ read_gb_string()

irep_idt irep_serializationt::read_gb_string ( std::istream &  in)

reads a string from the stream

Parameters
ininput stream
Returns
a string

Definition at line 187 of file irep_serialization.cpp.

◆ read_gb_word()

std::size_t irep_serializationt::read_gb_word ( std::istream &  in)
static

Interpret a stream of byte as a 7-bit encoded unsigned number.

Parameters
ininput stream
Returns
decoded number

Definition at line 143 of file irep_serialization.cpp.

◆ read_irep()

irept irep_serializationt::read_irep ( std::istream &  in)
private

Definition at line 67 of file irep_serialization.cpp.

◆ read_string_ref()

irep_idt irep_serializationt::read_string_ref ( std::istream &  in)

Read a string reference from the stream.

Parameters
ininput stream
Returns
a string

Definition at line 232 of file irep_serialization.cpp.

◆ reference_convert() [1/2]

void irep_serializationt::reference_convert ( const irept irep,
std::ostream &  out 
)

Serialize an irept.

Parameters
irepsource irept to serialize
outtarget output stream

Definition at line 104 of file irep_serialization.cpp.

◆ reference_convert() [2/2]

const irept & irep_serializationt::reference_convert ( std::istream &  in)

Definition at line 44 of file irep_serialization.cpp.

◆ write_irep()

void irep_serializationt::write_irep ( std::ostream &  out,
const irept irep 
)
private

Definition at line 22 of file irep_serialization.cpp.

◆ write_string_ref()

void irep_serializationt::write_string_ref ( std::ostream &  out,
const irep_idt s 
)

Output a string and maintain a reference to it.

Parameters
outoutput stream
sstring to output

Definition at line 211 of file irep_serialization.cpp.

Member Data Documentation

◆ ireps_container

ireps_containert& irep_serializationt::ireps_container
private

Definition at line 76 of file irep_serialization.h.

◆ read_buffer

std::vector<char> irep_serializationt::read_buffer
private

Definition at line 77 of file irep_serialization.h.


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