binary_helper< heap< C > > Struct Template Reference

#include <heap.hpp>

Inheritance diagram for binary_helper< heap< C > >:
void_binary_helper< heap< C > >

List of all members.

Static Public Member Functions


Detailed Description

template<typename C>
struct mmx::binary_helper< heap< C > >

Definition at line 259 of file heap.hpp.


Member Function Documentation

static generic access ( const heap< C > &  v,
nat  i 
) [inline, static]

Reimplemented from void_binary_helper< heap< C > >.

Definition at line 266 of file heap.hpp.

00266                                                       {
00267     return as<generic> (v[i]); }

static heap<C> assemble ( const generic x  )  [inline, static]

Reimplemented from void_binary_helper< heap< C > >.

Definition at line 272 of file heap.hpp.

References Heap, mmx::N(), and mmx::push().

00272                                                  {
00273     Heap h;
00274     vector<generic> v= as<vector<generic> > (x);
00275     for (nat i=0; i<N(v); i++) push (h, v[i]);
00276     return h; }

static generic disassemble ( const heap< C > &  v  )  [inline, static]

Reimplemented from void_binary_helper< heap< C > >.

Definition at line 268 of file heap.hpp.

00268                                                     {
00269     vector<generic> r;
00270     for (nat i=0; i<N(v); i++) r << as<generic> (v[i]);
00271     return as<generic> (r); }

static generic full_type_name (  )  [inline, static]

Reimplemented from void_binary_helper< heap< C > >.

Definition at line 262 of file heap.hpp.

References mmx::C, Full_type_name, and mmx::gen().

00262                                           {
00263     return gen ("Heap", Full_type_name (C)); }

static heap<C> read ( const port in  )  [inline, static]

Reimplemented from void_binary_helper< heap< C > >.

Definition at line 282 of file heap.hpp.

References Heap, n, and mmx::push().

00282                                            {
00283     nat n= binary_read<nat> (in);
00284     Heap h;
00285     for (nat i=0; i<n; i++)
00286       push (h, binary_read<C> (in));
00287     return h; }

static string short_type_name (  )  [inline, static]

Reimplemented from void_binary_helper< heap< C > >.

Definition at line 260 of file heap.hpp.

References mmx::C, and Short_type_name.

00260                                           {
00261     return "H" * Short_type_name (C); }

static nat size ( const heap< C > &  v  )  [inline, static]

Reimplemented from void_binary_helper< heap< C > >.

Definition at line 264 of file heap.hpp.

References mmx::N().

00264                                          {
00265     return N(v); }

static void write ( const port out,
const heap< C > &  h 
) [inline, static]

Reimplemented from void_binary_helper< heap< C > >.

Definition at line 277 of file heap.hpp.

References mmx::copy(), Heap, mmx::N(), and mmx::pull().

00277                                                             {
00278     binary_write<nat> (out, N(h));
00279     Heap c= copy (h);
00280     for (nat i=0; i<N(h); i++)
00281       binary_write<C> (out, pull (c)); }


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

Generated on 6 Dec 2012 for basix by  doxygen 1.6.1