#include <memory_layout.hh>
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 |
MemoryLayout & | ops |
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.
MemLayout::Visitor::Visitor | ( | MemoryLayout & | ops, |
bool | accept_pointers = false , |
||
bool | accept_opaques = false |
||
) |
Definition at line 102 of file memory_layout.cc.
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.
void MemLayout::Visitor::merge_skips_and_copies | ( | ) | [protected] |
Definition at line 129 of file memory_layout.cc.
void MemLayout::Visitor::push_current_op | ( | ) | [protected] |
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.
bool Typelib::MemLayout::Visitor::accept_opaques [private] |
Definition at line 67 of file memory_layout.hh.
bool Typelib::MemLayout::Visitor::accept_pointers [private] |
Definition at line 66 of file memory_layout.hh.
size_t Typelib::MemLayout::Visitor::current_op [private] |
Definition at line 68 of file memory_layout.hh.
size_t Typelib::MemLayout::Visitor::current_op_count [private] |
Definition at line 69 of file memory_layout.hh.
bool Typelib::MemLayout::Visitor::merge_skip_copy [private] |
Definition at line 70 of file memory_layout.hh.
MemoryLayout& Typelib::MemLayout::Visitor::ops [private] |
Definition at line 65 of file memory_layout.hh.