COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
Public Member Functions | Private Attributes | List of all members
CommWrapperView< T > Class Template Reference

#include <CommWrapper.hpp>

Inherits noncopyable.

Public Member Functions

 CommWrapperView (const Handle< CommWrapper > &cw)
 
 ~CommWrapperView ()
 Destructor. More...
 
T * get_ptr ()
 
T * operator() ()
 
int size ()
 accessor to the length of the array, measured in items of sizeof(T) More...
 

Private Attributes

T * m_data
 raw pointer to data More...
 
int m_size
 size of the array measured based on sizeof(T) More...
 
Handle< CommWrapperm_cw
 pointer to commwrapper More...
 

Detailed Description

template<typename T>
class cf3::common::PE::CommWrapperView< T >

fancy little class which asks for a view from a commwrapper specified as constructor's argument and frees the data upon destruction

Warning
Very important: the data is copied back upon calling destructor. This means you end up in trouble if you modify the comwrapper behind.

Definition at line 173 of file CommWrapper.hpp.

Constructor & Destructor Documentation

CommWrapperView ( const Handle< CommWrapper > &  cw)
inline

Constructor. View is only supported if sizeof(T)==cw.size_of() and sizeof(T)==1, otherwisw error is thrown.

Parameters
cwreference to the comwrapper class

Definition at line 180 of file CommWrapper.hpp.

~CommWrapperView ( )
inline

Destructor.

Definition at line 190 of file CommWrapper.hpp.

Member Function Documentation

T* get_ptr ( )
inline

accessor to the naked pointer via accessor function

Warning
Very important: the data is copied back upon calling destructor. This means you end up in trouble if you modify the comwrapper behind.

Definition at line 201 of file CommWrapper.hpp.

T* operator() ( )
inline

accessor to the naked pointer via () operator

Warning
Very important: the data is copied back upon calling destructor. This means you end up in trouble if you modify the comwrapper behind.

Definition at line 205 of file CommWrapper.hpp.

int size ( )
inline

accessor to the length of the array, measured in items of sizeof(T)

Definition at line 208 of file CommWrapper.hpp.

Member Data Documentation

Handle<CommWrapper> m_cw
private

pointer to commwrapper

Definition at line 219 of file CommWrapper.hpp.

T* m_data
private

raw pointer to data

Definition at line 213 of file CommWrapper.hpp.

int m_size
private

size of the array measured based on sizeof(T)

Definition at line 216 of file CommWrapper.hpp.


The documentation for this class was generated from the following file:
Send comments to:
COOLFluiD Web Admin