Public Types | Public Member Functions | Static Public Member Functions

Fiber::TypedArray< T > Class Template Reference

An intermediate class that allows to operate on the pure type information of some memory array. More...

#include <TypedArray.hpp>

List of all members.

Public Types

Public Member Functions

Static Public Member Functions


Detailed Description

template<class T>
class Fiber::TypedArray< T >

An intermediate class that allows to operate on the pure type information of some memory array.

Type casting into TypedArray<> is allowed. For instance, to check if some MemBase object refers to an array of doubles, just do

  if (RefPtr<TypedArray<double> > D = MemBasePtr)
  {
        ....
  }
Author:
Werner Benger
Examples:

PolychromeSurface.cpp, and TransparentColoredSurface.cpp.


Member Function Documentation

template<class T>
template<class BinaryOperator >
RefPtr<MemBase> Fiber::TypedArray< T >::applyOperator ( const BinaryOperator &  theOperator,
const RefPtr< MemBase > &  rightValue,
const MemBase::Creator_t theCreator 
) const [inline]

Apply a binary operator on the data contained here, and provide a new memory array of the same size and dimensionality.

Returns:
The result will be a NullPtr() if there are no data available here though the creativeIterator() function.
template<class T>
template<class UnaryOperator >
RefPtr<MemBase> Fiber::TypedArray< T >::applyOperator ( const UnaryOperator &  theOperator,
const MemBase::Creator_t theCreator 
) const [inline]

Apply an unary operator on the data contained here, and provide a new memory array of the same size and dimensionality.

Parameters:
UnaryOperator The operator object, must provide a function call operator() that takes values of type T and yields values that can be assigned to T.
Returns:
The result will be a NullPtr() if there are no data available here though the creativeIterator() function.