cprover
xml_irep_convertt Class Reference

#include <xml_irep_hashing.h>

Collaboration diagram for xml_irep_convertt:
[legend]

Classes

struct  irep_content_eq
 
struct  irep_full_hash
 
struct  ireps_containert
 
struct  ul_eq
 
struct  ul_hash
 

Public Member Functions

 xml_irep_convertt (ireps_containert &ic)
 
unsigned long insert (unsigned long, const irept &)
 inserts an irep into the hashtable More...
 
unsigned long insert (const std::string &, const irept &)
 inserts an irep into the hashtable More...
 
void convert (const irept &irep, xmlt &xml)
 
void convert (const xmlt &xml, irept &irep)
 
void reference_convert (const irept &irep, xmlt &xml)
 
void resolve_references (const irept &cur)
 resolves references to ireps from an irep after reading an irep hash map into memory. More...
 
void convert_map (xmlt &xml)
 converts the current hash map of ireps into the given xml structure More...
 
void output_map (std::ostream &out, unsigned indent)
 converts the current hash map of ireps into xml nodes and outputs them to the stream More...
 
void clear ()
 

Private Member Functions

ireps_containert::id_containert::const_iterator find_irep_by_id (const unsigned int)
 finds an irep in the ireps hash set by its id More...
 
ireps_containert::content_containert::const_iterator find_irep_by_content (const irept &irep)
 finds an irep in the ireps hash set by checking contents More...
 
std::string long_to_string (const unsigned long)
 converts the hash value to a readable string More...
 
unsigned long string_to_long (const std::string &)
 converts the string to an unsigned long that used to give a pointer to an irep in an old compilation More...
 
unsigned long add_with_childs (const irept &)
 

Private Attributes

ireps_containertireps_container
 

Detailed Description

Definition at line 20 of file xml_irep_hashing.h.

Constructor & Destructor Documentation

§ xml_irep_convertt()

xml_irep_convertt::xml_irep_convertt ( ireps_containert ic)
inlineexplicit

Member Function Documentation

§ add_with_childs()

unsigned long xml_irep_convertt::add_with_childs ( const irept iwi)
private

§ clear()

void xml_irep_convertt::clear ( void  )
inline

§ convert() [1/2]

§ convert() [2/2]

void xml_irep_convertt::convert ( const xmlt xml,
irept irep 
)

§ convert_map()

void xml_irep_convertt::convert_map ( xmlt xml)

converts the current hash map of ireps into the given xml structure

parameters: an xml node
Returns
nothing

Definition at line 263 of file xml_irep_hashing.cpp.

References convert(), xml_irep_convertt::ireps_containert::id_container, xml_irep_convertt::ireps_containert::id_replace_map, ireps_container, long_to_string(), xmlt::new_element(), and xmlt::set_attribute().

Referenced by xml_irep_convertt().

§ find_irep_by_content()

xml_irep_convertt::ireps_containert::content_containert::const_iterator xml_irep_convertt::find_irep_by_content ( const irept irep)
private

finds an irep in the ireps hash set by checking contents

parameters: an irep
Returns
an iterator into the ireps hash set

Definition at line 216 of file xml_irep_hashing.cpp.

References xml_irep_convertt::ireps_containert::content_container, and ireps_container.

Referenced by add_with_childs(), insert(), and reference_convert().

§ find_irep_by_id()

xml_irep_convertt::ireps_containert::id_containert::const_iterator xml_irep_convertt::find_irep_by_id ( const unsigned int  id)
private

finds an irep in the ireps hash set by its id

parameters: an id
Returns
an iterator into the ireps hash set

Definition at line 207 of file xml_irep_hashing.cpp.

References xml_irep_convertt::ireps_containert::id_container, and ireps_container.

Referenced by resolve_references().

§ insert() [1/2]

unsigned long xml_irep_convertt::insert ( unsigned long  id,
const irept i 
)

inserts an irep into the hashtable

parameters: an unsigned long and an irep
Returns
true on success, false otherwise

Definition at line 224 of file xml_irep_hashing.cpp.

References xml_irep_convertt::ireps_containert::content_container, find_irep_by_content(), xml_irep_convertt::ireps_containert::id_container, xml_irep_convertt::ireps_containert::id_replace_map, and ireps_container.

Referenced by add_with_childs(), insert(), read_goto_object(), and xml_irep_convertt().

§ insert() [2/2]

unsigned long xml_irep_convertt::insert ( const std::string &  id,
const irept i 
)

inserts an irep into the hashtable

parameters: a string and an irep
Returns
true on success, false otherwise

Definition at line 253 of file xml_irep_hashing.cpp.

References insert(), and string_to_long().

§ long_to_string()

std::string xml_irep_convertt::long_to_string ( const unsigned long  l)
private

converts the hash value to a readable string

parameters: an irep pointer
Returns
a new string

Definition at line 184 of file xml_irep_hashing.cpp.

Referenced by convert_map(), output_map(), and reference_convert().

§ output_map()

void xml_irep_convertt::output_map ( std::ostream &  out,
unsigned  indent 
)

converts the current hash map of ireps into xml nodes and outputs them to the stream

parameters: an output stream
Returns
nothing

Definition at line 281 of file xml_irep_hashing.cpp.

References convert(), xml_irep_convertt::ireps_containert::id_container, xml_irep_convertt::ireps_containert::id_replace_map, ireps_container, long_to_string(), xmlt::output(), and xmlt::set_attribute().

Referenced by xml_irep_convertt().

§ reference_convert()

§ resolve_references()

void xml_irep_convertt::resolve_references ( const irept cur)

§ string_to_long()

unsigned long xml_irep_convertt::string_to_long ( const std::string &  s)
private

converts the string to an unsigned long that used to give a pointer to an irep in an old compilation

parameters: a string
Returns
an unsigned long

Definition at line 195 of file xml_irep_hashing.cpp.

Referenced by insert(), and resolve_references().

Member Data Documentation

§ ireps_container


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