vtable_func< T > Class Template Reference

Collaboration diagram for vtable_func< T >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class T>
class vtable_func< T >

Template class for converting lower layer info to a virtual table.

This function is called for each entity that will be represented by a row in a virtual table. We construct it with an entire virtual table, which must have been pre-allocated with the right number for rows, N. TODO FIX

Then we invoke it (call its operator ()) N times, passing in each time a reference to the entity (of type T) we want it to "convert" to a row. Each class T whose instances are to be represented in a virtual table must have a method

        T::vtable_collect(vtable_row_t &)

Definition at line 267 of file vtable.h.

Public Member Functions

NORET vtable_func (vtable_t &v)
NORET ~vtable_func ()
void insert_names ()
void operator() (const T &t)
void back_out (int n)
 Un-collect the last n entries.
int realloc ()

Protected Attributes

int _curr
vtable_t_array


Member Function Documentation

template<class T>
void vtable_func< T >::operator() ( const T &  t  )  [inline]

Gather information about t and stuff it into row @ index _curr. It gathers by calling the T::vtable_collect(vtable_row_t &)

Definition at line 281 of file vtable.h.

References vtable_func< T >::_array, vtable_func< T >::_curr, vtable_t::filled_one(), vtable_t::size(), and w_assert9.

Here is the call graph for this function:


The documentation for this class was generated from the following file:
Generated on Wed Jul 7 17:22:43 2010 for Shore Storage Manager by  doxygen 1.4.7