binary_helper< triple< C1, C2, C3 > > Struct Template Reference

#include <triple.hpp>

Inheritance diagram for binary_helper< triple< C1, C2, C3 > >:
void_binary_helper< triple< C1, C2, C3 > >

List of all members.

Static Public Member Functions


Detailed Description

template<typename C1, typename C2, typename C3>
struct mmx::binary_helper< triple< C1, C2, C3 > >

Definition at line 68 of file triple.hpp.


Member Function Documentation

static generic access ( const triple< C1, C2, C3 > &  v,
nat  i 
) [inline, static]

Reimplemented from void_binary_helper< triple< C1, C2, C3 > >.

Definition at line 79 of file triple.hpp.

References ERROR.

00079                                                         {
00080     if (i == 0) return as<generic> (v.x1);
00081     else if (i == 1) return as<generic> (v.x2);
00082     else if (i == 2) return as<generic> (v.x3);
00083     else ERROR ("index out of range"); }

static triple<C1,C2,C3> assemble ( const generic v  )  [inline, static]

Reimplemented from void_binary_helper< triple< C1, C2, C3 > >.

Definition at line 88 of file triple.hpp.

References Triple, and mmx::vector_access().

00088                                                    {
00089     return Triple (as<C1> (vector_access (v, 0)),
00090                    as<C2> (vector_access (v, 1)),
00091                    as<C3> (vector_access (v, 2))); }

static generic disassemble ( const triple< C1, C2, C3 > &  v  )  [inline, static]

Reimplemented from void_binary_helper< triple< C1, C2, C3 > >.

Definition at line 84 of file triple.hpp.

References mmx::gen_vec().

00084                                                       {
00085     return gen_vec (as<generic> (v.x1),
00086                     as<generic> (v.x2),
00087                     as<generic> (v.x3)); }

static generic full_type_name (  )  [inline, static]

Reimplemented from void_binary_helper< triple< C1, C2, C3 > >.

Definition at line 73 of file triple.hpp.

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

00073                                           {
00074     return gen ("Triple", Full_type_name (C1),
00075                           Full_type_name (C2),
00076                           Full_type_name (C3)); }

static triple<C1,C2,C3> read ( const port in  )  [inline, static]

Reimplemented from void_binary_helper< triple< C1, C2, C3 > >.

Definition at line 96 of file triple.hpp.

References mmx::C2, and Triple.

00096                                              {
00097     C1 x1= binary_read<C1> (in);
00098     C2 x2= binary_read<C2> (in);
00099     C3 x3= binary_read<C3> (in);
00100     return Triple (x1, x2, x3); }

static string short_type_name (  )  [inline, static]

Reimplemented from void_binary_helper< triple< C1, C2, C3 > >.

Definition at line 69 of file triple.hpp.

References mmx::C2, and Short_type_name.

00069                                           {
00070     return "Tr" * Short_type_name (C1) *
00071                   Short_type_name (C2) *
00072                   Short_type_name (C3); }

static nat size ( const triple< C1, C2, C3 > &  v  )  [inline, static]

Reimplemented from void_binary_helper< triple< C1, C2, C3 > >.

Definition at line 77 of file triple.hpp.

00077                                            {
00078     (void) v; return 3; }

static void write ( const port out,
const triple< C1, C2, C3 > &  p 
) [inline, static]

Reimplemented from void_binary_helper< triple< C1, C2, C3 > >.

Definition at line 92 of file triple.hpp.

00092                                                               {
00093     binary_write<C1> (out, p.x1);
00094     binary_write<C2> (out, p.x2);
00095     binary_write<C3> (out, p.x3); }


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

Generated on 6 Dec 2012 for basix by  doxygen 1.6.1