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

lookup container for set of Var objects More...

#include <storage.hh>

Collaboration diagram for VarDb:
Collaboration graph
[legend]

Public Types

typedef TList::const_iterator const_iterator
 
typedef const_iterator iterator
 

Public Member Functions

 VarDb ()
 
 ~VarDb ()
 
Varoperator[] (int uid)
 look for a Var object by ID, add one if not found More...
 
const Varoperator[] (int uid) const
 look for a Var object by ID, crash if not found 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 variables stored in the container More...
 

Private Types

typedef Var[] TList
 

Private Member Functions

 VarDb (const VarDb &)
 not allowed to be copied More...
 
VarDboperator= (const VarDb &)
 not allowed to be copied More...
 

Private Attributes

TList vars_
 
Private * d
 

Detailed Description

lookup container for set of Var objects

Definition at line 129 of file storage.hh.

Member Typedef Documentation

typedef TList::const_iterator const_iterator

Definition at line 134 of file storage.hh.

Definition at line 135 of file storage.hh.

typedef Var [] TList
private

Definition at line 131 of file storage.hh.

Constructor & Destructor Documentation

VarDb ( )
~VarDb ( )
VarDb ( const VarDb )
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 160 of file storage.hh.

References VarDb::vars_.

const_iterator end ( ) const
inline

return STL-like iterator to go through the container

Definition at line 165 of file storage.hh.

References VarDb::vars_.

VarDb& operator= ( const VarDb )
private

not allowed to be copied

Var& operator[] ( int  uid)

look for a Var object by ID, add one if not found

Parameters
uidID of variable to look for
Returns
reference to either a found or just created Var object
const Var& operator[] ( int  uid) const

look for a Var object by ID, crash if not found

Attention
It is not safe to look for non-existing ID, it will jump to debugger in that case.
Parameters
uidID of variable to look for
Returns
reference to the found Var object
size_t size ( ) const
inline

return count of variables stored in the container

Definition at line 170 of file storage.hh.

References VarDb::vars_.

Field Documentation

Private* d
private

Definition at line 181 of file storage.hh.

TList vars_
private

Definition at line 180 of file storage.hh.

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


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