33 #ifndef __H__UG__compol_selection__
34 #define __H__UG__compol_selection__
41 template <
class TLayout>
61 {
return interface.size() *
sizeof(
byte);}
69 iter != interface.end(); ++iter)
71 Element elem = interface.get_element(iter);
73 buff.
write((
char*)&refMark,
sizeof(
byte));
85 iter != interface.end(); ++iter)
87 Element elem = interface.get_element(iter);
88 buff.
read((
char*)&val,
sizeof(
byte));
112 template <
class TLayout>
128 {
return interface.size() *
sizeof(
byte);}
136 iter != interface.end(); ++iter)
138 Element elem = interface.get_element(iter);
140 buff.
write((
char*)&refMark,
sizeof(
byte));
152 iter != interface.end(); ++iter)
154 Element elem = interface.get_element(iter);
155 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
Definition: compol_selection.h:114
virtual bool extract(ug::BinaryBuffer &buff, const Interface &interface)
reads marks from the given stream
Definition: compol_selection.h:148
Layout::Element Element
Definition: compol_selection.h:118
Layout::Type GeomObj
Definition: compol_selection.h:117
ISelector & m_sel
Definition: compol_selection.h:162
Layout::Interface Interface
Definition: compol_selection.h:119
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_selection.h:127
virtual bool collect(ug::BinaryBuffer &buff, const Interface &interface)
writes writes the selection states of the interface entries
Definition: compol_selection.h:132
byte m_stateBits
Definition: compol_selection.h:163
ComPol_EnableSelectionStateBits(ISelector &sel, byte stateBits)
Definition: compol_selection.h:122
Interface::const_iterator InterfaceIter
Definition: compol_selection.h:120
TLayout Layout
Definition: compol_selection.h:116
Definition: compol_selection.h:43
TLayout Layout
Definition: compol_selection.h:45
bool deselect_allowed()
Definition: compol_selection.h:99
Layout::Element Element
Definition: compol_selection.h:47
virtual bool extract(ug::BinaryBuffer &buff, const Interface &interface)
reads marks from the given stream
Definition: compol_selection.h:81
bool select_allowed()
Definition: compol_selection.h:98
bool m_bDeselectAllowed
Definition: compol_selection.h:103
Layout::Type GeomObj
Definition: compol_selection.h:46
bool m_bSelectAllowed
Definition: compol_selection.h:102
virtual bool collect(ug::BinaryBuffer &buff, const Interface &interface)
writes 1 for selected and 0 for unselected interface entries
Definition: compol_selection.h:65
ISelector & m_sel
Definition: compol_selection.h:101
ComPol_Selection(ISelector &sel, bool select=true, bool deselect=true)
Construct the communication policy with a ug::Selector.
Definition: compol_selection.h:55
Layout::Interface Interface
Definition: compol_selection.h:48
Interface::const_iterator InterfaceIter
Definition: compol_selection.h:49
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_selection.h:60
base-implementation of a selector
Definition: selector_interface.h:126
void select(GridObject *elem, byte status)
selects an element
Definition: selector_interface_impl.hpp:56
byte get_selection_status(GridObject *elem) const
returns the selection state of the specified elelent
Definition: selector_interface_impl.hpp:125
void deselect(GridObject *elem)
Definition: selector_interface_impl.hpp:96
unsigned char byte
Definition: types.h:113