ug4
ug::ComPol_CopyAttachment< TLayout, TAttachment > Class Template Reference

copies values from a specified attachment to a stream and back. More...

#include <compol_copy_attachment.h>

+ Inheritance diagram for ug::ComPol_CopyAttachment< TLayout, TAttachment >:

Public Types

typedef Layout::Element Element
 
typedef Layout::Type GeomObj
 
typedef Layout::Interface Interface
 
typedef TLayout Layout
 
typedef TAttachment::ValueType Value
 
- Public Types inherited from pcl::ICommunicationPolicy< TLayout >
typedef Layout::Interface Interface
 
typedef TLayout Layout
 

Public Member Functions

virtual bool collect (ug::BinaryBuffer &buff, const Interface &interface)
 writes the data for the given interface to the buffer. More...
 
 ComPol_CopyAttachment ()
 Initialises the collector with an invalid grid. More...
 
 ComPol_CopyAttachment (Grid &grid, TAttachment attachment)
 Calls set_target internally. More...
 
virtual bool extract (ug::BinaryBuffer &buff, const Interface &interface)
 reads the data from the buffer to the given interface . More...
 
void extract_on_constrained_elems_only (bool enable)
 
void set_attachment (Grid &grid, TAttachment &attachment)
 The grid and the attachment from where the data shall be copied. More...
 
virtual ~ComPol_CopyAttachment ()
 
- Public Member Functions inherited from pcl::ICommunicationPolicy< TLayout >
virtual bool begin_layout_collection (const Layout *pLayout)
 signals the beginning of a layout collection. More...
 
virtual bool begin_layout_extraction (const Layout *pLayout)
 signals the beginning of a layout extraction. More...
 
virtual void begin_level_extraction (int level)
 signals that a new layout-level will now be processed. More...
 
virtual bool end_layout_collection (const Layout *pLayout)
 signals the end of a layout collection More...
 
virtual bool end_layout_extraction (const Layout *pLayout)
 signals the end of a layout extraction More...
 
virtual int get_required_buffer_size (const Interface &interface)
 returns the size of the buffer in bytes, that will be required for interface-communication. More...
 
virtual ~ICommunicationPolicy ()
 

Protected Attributes

Grid::AttachmentAccessor< GeomObj, TAttachment > m_aaVal
 
bool m_extractOnConstrainedElemsOnly
 

Detailed Description

template<class TLayout, class TAttachment>
class ug::ComPol_CopyAttachment< TLayout, TAttachment >

copies values from a specified attachment to a stream and back.

TLayout::Type has to be either Vertex, Edge, Face or Volume.

Member Typedef Documentation

◆ Element

template<class TLayout , class TAttachment >
typedef Layout::Element ug::ComPol_CopyAttachment< TLayout, TAttachment >::Element

◆ GeomObj

template<class TLayout , class TAttachment >
typedef Layout::Type ug::ComPol_CopyAttachment< TLayout, TAttachment >::GeomObj

◆ Interface

template<class TLayout , class TAttachment >
typedef Layout::Interface ug::ComPol_CopyAttachment< TLayout, TAttachment >::Interface

◆ Layout

template<class TLayout , class TAttachment >
typedef TLayout ug::ComPol_CopyAttachment< TLayout, TAttachment >::Layout

◆ Value

template<class TLayout , class TAttachment >
typedef TAttachment::ValueType ug::ComPol_CopyAttachment< TLayout, TAttachment >::Value

Constructor & Destructor Documentation

◆ ComPol_CopyAttachment() [1/2]

template<class TNodeLayout , class TAttachment >
ug::ComPol_CopyAttachment< TNodeLayout, TAttachment >::ComPol_CopyAttachment

Initialises the collector with an invalid grid.

be sure to call set_source before passing it to a communicator.

◆ ComPol_CopyAttachment() [2/2]

template<class TNodeLayout , class TAttachment >
ug::ComPol_CopyAttachment< TNodeLayout, TAttachment >::ComPol_CopyAttachment ( Grid grid,
TAttachment  attachment 
)

◆ ~ComPol_CopyAttachment()

template<class TLayout , class TAttachment >
virtual ug::ComPol_CopyAttachment< TLayout, TAttachment >::~ComPol_CopyAttachment ( )
inlinevirtual

Member Function Documentation

◆ collect()

template<class TNodeLayout , class TAttachment >
bool ug::ComPol_CopyAttachment< TNodeLayout, TAttachment >::collect ( ug::BinaryBuffer buff,
const Interface interface 
)
virtual

writes the data for the given interface to the buffer.

Derived from ICollector Make sure that all members of the interface are members of the grid too.

Implements pcl::ICommunicationPolicy< TLayout >.

References ug::Serialize().

◆ extract()

template<class TNodeLayout , class TAttachment >
bool ug::ComPol_CopyAttachment< TNodeLayout, TAttachment >::extract ( ug::BinaryBuffer buff,
const Interface interface 
)
virtual

reads the data from the buffer to the given interface .

Derived from IExtractor Make sure that all members of the interface are members of the grid too.

Implements pcl::ICommunicationPolicy< TLayout >.

References ug::Deserialize().

◆ extract_on_constrained_elems_only()

template<class TNodeLayout , class TAttachment >
void ug::ComPol_CopyAttachment< TNodeLayout, TAttachment >::extract_on_constrained_elems_only ( bool  enable)

◆ set_attachment()

template<class TNodeLayout , class TAttachment >
void ug::ComPol_CopyAttachment< TNodeLayout, TAttachment >::set_attachment ( Grid grid,
TAttachment &  attachment 
)

The grid and the attachment from where the data shall be copied.

Make sure that attachment is attached to the correct element-type of the grid.

Referenced by ug::ComPol_CopyAttachment< TLayout, TAttachment >::ComPol_CopyAttachment().

Member Data Documentation

◆ m_aaVal

template<class TLayout , class TAttachment >
Grid::AttachmentAccessor<GeomObj, TAttachment> ug::ComPol_CopyAttachment< TLayout, TAttachment >::m_aaVal
protected

◆ m_extractOnConstrainedElemsOnly

template<class TLayout , class TAttachment >
bool ug::ComPol_CopyAttachment< TLayout, TAttachment >::m_extractOnConstrainedElemsOnly
protected

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