basix_doc 0.1
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 347 of file port.hpp.


Member Function Documentation

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

Definition at line 187 of file port.hpp.

                                                   {
    return vector_access (disassemble (x), i); }
static bool assemble ( const generic x) [inline, static]

Reimplemented from void_binary_helper< bool >.

Definition at line 352 of file port.hpp.

                                                 {
    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 350 of file port.hpp.

                                                    {
    return as<generic> (b? string ("true"): string ("false")); }
static generic full_type_name ( ) [inline, static]

Reimplemented from void_binary_helper< bool >.

Definition at line 349 of file port.hpp.

{ return "Boolean"; }
static bool read ( const port in) [inline, static]

Reimplemented from void_binary_helper< bool >.

Definition at line 356 of file port.hpp.

References mmx::read(), and s.

                                           {
    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 348 of file port.hpp.

{ return "B"; }
static nat size ( const bool &  x) [inline, static, inherited]

Definition at line 185 of file port.hpp.

                                      {
    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 354 of file port.hpp.

References mmx::write().

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

The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines