Back to index

texmacs  1.0.7.15
Private Member Functions | Static Private Attributes
hashmap< T, U > Class Template Reference

#include <hashmap.hpp>

Inheritance diagram for hashmap< T, U >:
Inheritance graph
[legend]

List of all members.

Private Member Functions

 CONCRETE_TEMPLATE_2 (hashmap, T, U)
 hashmap ()
 hashmap (U init, int n=1, int max=1)
 hashmap (U init, tree t)
operator[] (T x)
U & operator() (T x)
 operator tree ()

Static Private Attributes

static hashmap< T, U > init

Detailed Description

template<class T, class U>
class hashmap< T, U >

Definition at line 82 of file hashmap.hpp.


Constructor & Destructor Documentation

template<class T, class U>
hashmap< T, U >::hashmap ( ) [inline, private]

Definition at line 85 of file hashmap.hpp.

template<class T, class U>
hashmap< T, U >::hashmap ( init,
int  n = 1,
int  max = 1 
) [inline, private]

Definition at line 87 of file hashmap.hpp.

template<class T, class U>
TMPL hashmap< T, U >::hashmap ( init,
tree  t 
) [private]

Definition at line 119 of file hashmap_extra.cpp.

                                         :
  rep (tm_new<hashmap_rep<T,U> > (init, 1, 1))
{
  int i, n= arity (t);
  for (i=0; i<n; i++)
    if (is_func (t[i], ASSOCIATE, 2))
      rep->bracket_rw (get_label (t[i][0]))= copy (t[i][1]);
}

Here is the call graph for this function:


Member Function Documentation

template<class T, class U>
hashmap< T, U >::CONCRETE_TEMPLATE_2 ( hashmap< T, U >  ,
T  ,
 
) [private]
template<class T, class U>
TMPL hashmap< T, U >::operator tree ( ) [private]

Definition at line 153 of file hashmap.cpp.

                                  {
  int i=0, j=0, n=rep->n, size=rep->size;
  tree t (COLLECTION, size);
  for (; i<n; i++) {
    list<hashentry<T,U> > l= rep->a[i];
    for (; !is_nil (l); l= l->next, j++)
      t[j]= (tree) l->item;
  }
  return t;
}

Here is the call graph for this function:

template<class T, class U>
U& hashmap< T, U >::operator() ( T  x) [inline, private]

Definition at line 93 of file hashmap.hpp.

{ return rep->bracket_rw (x); }
template<class T, class U>
U hashmap< T, U >::operator[] ( T  x) [inline, private]

Definition at line 92 of file hashmap.hpp.

{ return rep->bracket_ro (x); }

Member Data Documentation

template<class T, class U>
hashmap<T,U> hashmap< T, U >::init [static, private]

Definition at line 84 of file hashmap.hpp.


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