Public Member Functions | Protected Member Functions | Private Attributes
Typelib::MemLayout::Visitor Class Reference

#include <memory_layout.hh>

Inheritance diagram for Typelib::MemLayout::Visitor:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void apply (Type const &type, bool merge_skip_copy=true, bool remove_trailing_skips=true)
 Visitor (MemoryLayout &ops, bool accept_pointers=false, bool accept_opaques=false)

Protected Member Functions

void add_generic_op (size_t op, size_t count)
bool generic_visit (Type const &value)
void memcpy (size_t count)
void merge_skips_and_copies ()
void push_current_op ()
void skip (size_t count)
bool visit_ (Numeric const &type)
bool visit_ (Enum const &type)
bool visit_ (Array const &type)
bool visit_ (Container const &type)
bool visit_ (Compound const &type)
bool visit_ (Pointer const &type)
bool visit_ (OpaqueType const &type)

Private Attributes

bool accept_opaques
bool accept_pointers
size_t current_op
size_t current_op_count
bool merge_skip_copy
MemoryLayoutops

Detailed Description

This visitor computes the memory layout for a given type. This memory layout is used by quite a few memory operations

You should not have to use this directly. Use Typelib.layout_of(type) instead

Definition at line 62 of file memory_layout.hh.


Constructor & Destructor Documentation

MemLayout::Visitor::Visitor ( MemoryLayout ops,
bool  accept_pointers = false,
bool  accept_opaques = false 
)

Definition at line 102 of file memory_layout.cc.


Member Function Documentation

void MemLayout::Visitor::add_generic_op ( size_t  op,
size_t  count 
) [protected]

Definition at line 18 of file memory_layout.cc.

void MemLayout::Visitor::apply ( Type const &  type,
bool  merge_skip_copy = true,
bool  remove_trailing_skips = true 
)

Definition at line 106 of file memory_layout.cc.

bool MemLayout::Visitor::generic_visit ( Type const &  value) [protected]

Definition at line 29 of file memory_layout.cc.

void MemLayout::Visitor::memcpy ( size_t  count) [protected]

Definition at line 15 of file memory_layout.cc.

Definition at line 129 of file memory_layout.cc.

Definition at line 4 of file memory_layout.cc.

void MemLayout::Visitor::skip ( size_t  count) [protected]

Definition at line 13 of file memory_layout.cc.

bool MemLayout::Visitor::visit_ ( Numeric const &  type) [protected, virtual]

Reimplemented from Typelib::TypeVisitor.

Definition at line 34 of file memory_layout.cc.

bool MemLayout::Visitor::visit_ ( Enum const &  type) [protected, virtual]

Reimplemented from Typelib::TypeVisitor.

Definition at line 35 of file memory_layout.cc.

bool MemLayout::Visitor::visit_ ( Array const &  type) [protected, virtual]

Reimplemented from Typelib::TypeVisitor.

Definition at line 36 of file memory_layout.cc.

bool MemLayout::Visitor::visit_ ( Container const &  type) [protected, virtual]

Reimplemented from Typelib::TypeVisitor.

Definition at line 54 of file memory_layout.cc.

bool MemLayout::Visitor::visit_ ( Compound const &  type) [protected, virtual]

Reimplemented from Typelib::TypeVisitor.

Definition at line 68 of file memory_layout.cc.

bool MemLayout::Visitor::visit_ ( Pointer const &  type) [protected, virtual]

Reimplemented from Typelib::TypeVisitor.

Definition at line 84 of file memory_layout.cc.

bool MemLayout::Visitor::visit_ ( OpaqueType const &  type) [protected, virtual]

Reimplemented from Typelib::TypeVisitor.

Definition at line 91 of file memory_layout.cc.


Member Data Documentation

Definition at line 67 of file memory_layout.hh.

Definition at line 66 of file memory_layout.hh.

Definition at line 68 of file memory_layout.hh.

Definition at line 69 of file memory_layout.hh.

Definition at line 70 of file memory_layout.hh.

Definition at line 65 of file memory_layout.hh.


The documentation for this class was generated from the following files:


typelib
Author(s): Sylvain Joyeux/sylvain.joyeux@m4x.org
autogenerated on Thu Jan 2 2014 11:38:41