binary_helper< list< C > > Struct Template Reference

#include <list.hpp>

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

List of all members.

Static Public Member Functions


Detailed Description

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

Definition at line 247 of file list.hpp.


Member Function Documentation

static generic access ( const list< C > &  x,
nat  i 
) [inline, static, inherited]

Definition at line 189 of file port.hpp.

00189                                                    {
00190     return vector_access (disassemble (x), i); }

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

Reimplemented from void_binary_helper< list< C > >.

Definition at line 255 of file list.hpp.

References mmx::cons(), List, and mmx::N().

00255                                                  {
00256     vector<generic> v= as<vector<generic> > (x);
00257     if (N(v) == 0) return List ();
00258     else return cons (as<C> (v[0]), as<List > (v[1])); }

static generic disassemble ( const list< C > &  l  )  [inline, static]

Reimplemented from void_binary_helper< list< C > >.

Definition at line 252 of file list.hpp.

References mmx::car(), mmx::cdr(), mmx::gen_vec(), and mmx::is_nil().

00252                                                     {
00253     if (is_nil (l)) return gen_vec ();
00254     else return gen_vec (as<generic> (car (l)), as<generic> (cdr (l))); }

static generic full_type_name (  )  [inline, static]

Reimplemented from void_binary_helper< list< C > >.

Definition at line 250 of file list.hpp.

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

00250                                           {
00251     return gen ("List", Full_type_name (C)); }

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

Reimplemented from void_binary_helper< list< C > >.

Definition at line 266 of file list.hpp.

References mmx::cons(), and List.

00266                                            {
00267     if (binary_read<char> (in) == '.') return List ();
00268     else return cons (binary_read<C> (in), binary_read<List > (in)); }

static string short_type_name (  )  [inline, static]

Reimplemented from void_binary_helper< list< C > >.

Definition at line 248 of file list.hpp.

References mmx::C, and Short_type_name.

00248                                           {
00249     return "Li" * Short_type_name (C); }

static nat size ( const list< C > &  x  )  [inline, static, inherited]

Definition at line 187 of file port.hpp.

00187                                       {
00188     return vector_size (disassemble (x)); }

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

Reimplemented from void_binary_helper< list< C > >.

Definition at line 259 of file list.hpp.

References mmx::car(), mmx::cdr(), and mmx::is_nil().

00259                                                             {
00260     if (is_nil (l)) binary_write<char> (out, '.');
00261     else {
00262       binary_write<char> (out, ',');
00263       binary_write<C> (out, car (l));
00264       binary_write<List > (out, cdr (l));
00265     } }


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

Generated on 6 Dec 2012 for basix by  doxygen 1.6.1