dispatcher_1_rep< R > Struct Template Reference

#include <dispatcher.hpp>

Inheritance diagram for dispatcher_1_rep< R >:
rep_struct

List of all members.

Public Types

Public Member Functions

Public Attributes


Detailed Description

template<typename R>
struct mmx::dispatcher_1_rep< R >

Definition at line 46 of file dispatcher.hpp.


Member Typedef Documentation

typedef function_0<void> INV

Definition at line 48 of file dispatcher.hpp.

typedef function_1<R,const int&> LUP

Definition at line 47 of file dispatcher.hpp.


Constructor & Destructor Documentation

dispatcher_1_rep ( LUP lup,
INV inv,
int &  l,
bool &  r 
) [inline]

Definition at line 56 of file dispatcher.hpp.

References dispatcher_1_rep< R >::invalidate, dispatcher_1_rep< R >::len, dispatcher_1_rep< R >::n, and dispatcher_1_rep< R >::tab.

00056                                                                :
00057     lookup (&lup), invalidate (&inv),
00058     len (&l), refresh (&r),
00059     tab (mmx_new<R> (l)), n (l) {
00060     *invalidate= invalidator_1<R> (*invalidate, &tab, &n, len); }
  inline ~dispatcher_1_rep () {

~dispatcher_1_rep (  )  [inline]

Definition at line 61 of file dispatcher.hpp.

References dispatcher_1_rep< R >::n, and dispatcher_1_rep< R >::tab.

00061                               {
00062     mmx_delete<R> (tab, n); }


Member Function Documentation

R& dispatch ( int  i  )  [inline]

Definition at line 63 of file dispatcher.hpp.

References mmx::is_nil(), dispatcher_1_rep< R >::lookup, dispatcher_1_rep< R >::refresh, and dispatcher_1_rep< R >::tab.

00063                              {
00064     //printf ("[%i,%i]\n", i, n);
00065     if (*refresh) { (*invalidate) (); *refresh= false; }
00066     R& r= tab[i];
00067     if (is_nil (r)) r= (*lookup) (i);
00068     return r; }


Member Data Documentation

Definition at line 50 of file dispatcher.hpp.

Referenced by dispatcher_1_rep< R >::dispatcher_1_rep().

int* len

Definition at line 51 of file dispatcher.hpp.

Referenced by dispatcher_1_rep< R >::dispatcher_1_rep().

Definition at line 49 of file dispatcher.hpp.

Referenced by dispatcher_1_rep< R >::dispatch().

int n
MMX_ALLOCATORS int ref_count [inherited]

Definition at line 164 of file basix.hpp.

bool* refresh

Definition at line 52 of file dispatcher.hpp.

Referenced by dispatcher_1_rep< R >::dispatch().

R* tab

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

Generated on 6 Dec 2012 for basix by  doxygen 1.6.1