Code Listener  [unstable] git snapshot
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes
TypeDb Class Reference

type lookup table More...

#include <storage.hh>

Collaboration diagram for TypeDb:
Collaboration graph
[legend]

Public Types

typedef TList::const_iterator const_iterator
 
typedef const_iterator iterator
 

Public Member Functions

 TypeDb ()
 
 ~TypeDb ()
 
bool insert (const struct cl_type *)
 index given type for lookup More...
 
struct cl_typeoperator[] (int) const
 type lookup by ID More...
 
const_iterator begin () const
 return STL-like iterator to go through the container More...
 
const_iterator end () const
 return STL-like iterator to go through the container More...
 
size_t size () const
 return count of types stored in the container More...
 
int codePtrSizeof () const
 value of sizeof(void (*)()) in the analysed program, -1 if such information is not available More...
 
int dataPtrSizeof () const
 value of sizeof(void *) in the analysed program, -1 if such information is not available More...
 
struct cl_typegenericDataPtr () const
 a (void *) type if available; if not, any data pointer; 0 otherwise More...
 

Private Types

typedef struct cl_typeTList
 

Private Member Functions

 TypeDb (const TypeDb &)
 not allowed to be copied More...
 
TypeDboperator= (const TypeDb &)
 not allowed to be copied More...
 

Private Attributes

TList types_
 
Private * d
 

Detailed Description

type lookup table

Attention
Type objects are not cloned for now (sort of exception).
Todo:
Check if there is a front-end which really needs types to be cloned.

Definition at line 190 of file storage.hh.

Member Typedef Documentation

typedef TList::const_iterator const_iterator

Definition at line 195 of file storage.hh.

Definition at line 196 of file storage.hh.

typedef struct cl_type* TList
private

Definition at line 192 of file storage.hh.

Constructor & Destructor Documentation

TypeDb ( )
~TypeDb ( )
TypeDb ( const TypeDb )
private

not allowed to be copied

Member Function Documentation

const_iterator begin ( ) const
inline

return STL-like iterator to go through the container

Definition at line 221 of file storage.hh.

References TypeDb::types_.

int codePtrSizeof ( ) const

value of sizeof(void (*)()) in the analysed program, -1 if such information is not available

int dataPtrSizeof ( ) const

value of sizeof(void *) in the analysed program, -1 if such information is not available

const_iterator end ( ) const
inline

return STL-like iterator to go through the container

Definition at line 226 of file storage.hh.

References TypeDb::types_.

struct cl_type* genericDataPtr ( ) const

a (void *) type if available; if not, any data pointer; 0 otherwise

bool insert ( const struct cl_type )

index given type for lookup

Note
useful only for builder
Returns
true if the type was really added, false if it has been already there
TypeDb& operator= ( const TypeDb )
private

not allowed to be copied

struct cl_type* operator[] ( int  ) const

type lookup by ID

Attention
The pointer returned is the same as formerly given to insert(). There is no cloning performed since it hasn't been considered useful for now.
size_t size ( ) const
inline

return count of types stored in the container

Definition at line 231 of file storage.hh.

References cl_type::size, and TypeDb::types_.

Field Documentation

Private* d
private

Definition at line 257 of file storage.hh.

TList types_
private

Definition at line 256 of file storage.hh.

Referenced by TypeDb::begin(), TypeDb::end(), and TypeDb::size().


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