33 #ifndef __H__UG__compol_boolmarker__
34 #define __H__UG__compol_boolmarker__
43 template <
class TLayout>
67 iter != interface.end(); ++iter)
69 Element elem = interface.get_element(iter);
71 byte refMark = (isMarked ? 1 : 0);
72 buff.
write((
char*)&refMark,
sizeof(
byte));
84 iter != interface.end(); ++iter)
86 Element elem = interface.get_element(iter);
87 buff.
read((
char*)&val,
sizeof(
byte));
98 template <
class TLayout>
122 iter != interface.end(); ++iter)
124 Element elem = interface.get_element(iter);
126 byte refMark = (isMarked ? 1 : 0);
127 buff.
write((
char*)&refMark,
sizeof(
byte));
139 iter != interface.end(); ++iter)
141 Element elem = interface.get_element(iter);
142 buff.
read((
char*)&val,
sizeof(
byte));
specializations are responsible to pack and unpack interface data during communication.
Definition: pcl_communication_structs.h:790
A Buffer for binary data.
Definition: binary_buffer.h:56
void read(char *buf, size_t size)
reads data of the given size (in bytes)
Definition: binary_buffer_impl.h:58
void write(const char *buf, size_t size)
writes data of the given size (in bytes)
Definition: binary_buffer_impl.h:71
Allows to mark elements.
Definition: bool_marker.h:64
bool is_marked(GridObject *e) const
Definition: bool_marker.cpp:86
void unmark(Vertex *e)
Definition: bool_marker.h:120
void mark(Vertex *e, bool mark=true)
Definition: bool_marker.h:109
adds marking at extracting side
Definition: compol_boolmarker.h:45
Interface::const_iterator InterfaceIter
Definition: compol_boolmarker.h:51
BoolMarker & m_rMarker
Definition: compol_boolmarker.h:94
virtual bool extract(ug::BinaryBuffer &buff, const Interface &interface)
reads marks from the given stream
Definition: compol_boolmarker.h:80
virtual int get_required_buffer_size(const Interface &interface)
returns the size of the buffer in bytes, that will be required for interface-communication.
Definition: compol_boolmarker.h:59
Layout::Element Element
Definition: compol_boolmarker.h:49
Layout::Interface Interface
Definition: compol_boolmarker.h:50
virtual bool collect(ug::BinaryBuffer &buff, const Interface &interface)
writes 1 for marked and 0 for unmarked interface entries
Definition: compol_boolmarker.h:63
ComPol_BoolMarker_AddMarks(BoolMarker &marker)
Construct the communication policy with a ug::BoolMarker.
Definition: compol_boolmarker.h:54
Layout::Type GeomObj
Definition: compol_boolmarker.h:48
TLayout Layout
Definition: compol_boolmarker.h:47
removes marks at extracting side, if no mark was received
Definition: compol_boolmarker.h:100
TLayout Layout
Definition: compol_boolmarker.h:102
BoolMarker & m_rMarker
Definition: compol_boolmarker.h:149
ComPol_BoolMarker_RemoveMarks(BoolMarker &marker)
Construct the communication policy with a ug::BoolMarker.
Definition: compol_boolmarker.h:109
Layout::Element Element
Definition: compol_boolmarker.h:104
Layout::Interface Interface
Definition: compol_boolmarker.h:105
Layout::Type GeomObj
Definition: compol_boolmarker.h:103
virtual int get_required_buffer_size(const Interface &interface)
returns the size of the buffer in bytes, that will be required for interface-communication.
Definition: compol_boolmarker.h:114
virtual bool extract(ug::BinaryBuffer &buff, const Interface &interface)
reads marks from the given stream
Definition: compol_boolmarker.h:135
virtual bool collect(ug::BinaryBuffer &buff, const Interface &interface)
writes 1 for marked and 0 for unmarked interface entries
Definition: compol_boolmarker.h:118
Interface::const_iterator InterfaceIter
Definition: compol_boolmarker.h:106
unsigned char byte
Definition: types.h:113