binary_helper< bool > Struct Template Reference

#include <port.hpp>

Inheritance diagram for binary_helper< bool >:
void_binary_helper< bool >

List of all members.

Static Public Member Functions


Detailed Description

template<>
struct mmx::binary_helper< bool >

Definition at line 349 of file port.hpp.


Member Function Documentation

static generic access ( const bool &  x,
nat  i 
) [inline, static, inherited]

Definition at line 189 of file port.hpp.

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

static bool assemble ( const generic x  )  [inline, static]

Reimplemented from void_binary_helper< bool >.

Definition at line 354 of file port.hpp.

00354                                                  {
00355     return is<string> (x) && as<string> (x) == "true"; }

static generic disassemble ( const bool &  b  )  [inline, static]

Reimplemented from void_binary_helper< bool >.

Definition at line 352 of file port.hpp.

00352                                                     {
00353     return as<generic> (b? string ("true"): string ("false")); }

static generic full_type_name (  )  [inline, static]

Reimplemented from void_binary_helper< bool >.

Definition at line 351 of file port.hpp.

00351 { return "Boolean"; }

static bool read ( const port in  )  [inline, static]

Reimplemented from void_binary_helper< bool >.

Definition at line 358 of file port.hpp.

References mmx::read(), and s.

00358                                            {
00359     char s[1]; mmx::read (in, s, 1); return s[0] == 't'; }

static string short_type_name (  )  [inline, static]

Reimplemented from void_binary_helper< bool >.

Definition at line 350 of file port.hpp.

00350 { return "B"; }

static nat size ( const bool &  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 bool &  b 
) [inline, static]

Reimplemented from void_binary_helper< bool >.

Definition at line 356 of file port.hpp.

References mmx::write().

00356                                                             {
00357     mmx::write (out, b? "t": "f", 1); }


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

Generated on 6 Dec 2012 for basix by  doxygen 1.6.1