casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | List of all members
casacore::LELArrayRef< T > Class Template Reference

This LEL class holds a possible referenced array with a mask. More...

#include <LELArray.h>

Inheritance diagram for casacore::LELArrayRef< T >:
casacore::LELArray< T > casacore::LELArrayBase

Public Member Functions

 LELArrayRef (const IPosition &shape)
 Constructor takes shape. More...
 
 ~LELArrayRef ()
 
const Array< T > & value () const
 Get value. More...
 
- Public Member Functions inherited from casacore::LELArray< T >
 LELArray (const Array< T > &value)
 Constructor takes value. More...
 
 LELArray (const Array< T > &value, const Array< Bool > &mask)
 Constructor takes value and mask. More...
 
 LELArray (const IPosition &shape)
 Constructor takes shape. More...
 
 LELArray (const LELArray< T > &other)
 Copy constructor (reference semantics). More...
 
 ~LELArray ()
 
LELArray< T > & operator= (const LELArray< T > &other)
 Assignment (reference semantics). More...
 
const IPositionshape () const
 Get shape (of the value). More...
 
const Array< T > & value () const
 Get value. More...
 
Array< T > & value ()
 
- Public Member Functions inherited from casacore::LELArrayBase
 LELArrayBase ()
 Default constructor sets to mask all true. More...
 
 LELArrayBase (const Array< Bool > &mask)
 Constructor takes mask. More...
 
 LELArrayBase (const LELArrayBase &other)
 Copy constructor (reference semantics). More...
 
 ~LELArrayBase ()
 
LELArrayBaseoperator= (const LELArrayBase &other)
 Assignment (reference semantics). More...
 
Bool isMasked () const
 Does the value have a mask? More...
 
const Array< Bool > & mask () const
 Get mask. More...
 
Array< Bool > & mask ()
 
void removeMask ()
 Remove the mask. More...
 
void setMask (const Array< Bool > &other)
 Set the mask from given array (takes reference). More...
 
void setMask (const LELArrayBase &other)
 Set the mask from the mask of the other value. More...
 
void setMask (Array< Bool > &other)
 Set the mask from given array (takes reference). More...
 
void setMask (const LELArrayBase &left, const LELArrayBase &right)
 Set the mask by combining the masks of both values. More...
 
void combineMask (const LELArrayBase &other)
 Combine the mask of this and the other value (by anding them). More...
 
void combineMask (const Array< Bool > &mask)
 
void combineOrAnd (Bool desiredValue, const Array< Bool > &value)
 Combine the mask with the given value in case of an OR or AND. More...
 
void combineOrAnd (Bool desiredValue, Array< Bool > &value, const Array< Bool > &temp)
 Combine for two arrays taking the true/false array values into account. More...
 
void combineOrAnd (Bool desiredValue, Array< Bool > &value, const Array< Bool > &temp, const Array< Bool > &tempMask)
 Combine for two arrays taking the true/false array values and mask into account. More...
 

Private Member Functions

 LELArrayRef (const LELArrayRef< T > &other)
 Copy constructor is not needed. More...
 
LELArrayRef< T > & operator= (const LELArrayRef< T > &other)
 Assignment is not needed. More...
 

Detailed Description

template<class T>
class casacore::LELArrayRef< T >

This LEL class holds a possible referenced array with a mask.

Intended use:

Internal

Review Status

Date Reviewed:
yyyy/mm/dd

Synopsis

This LEL class is derived from LELArray. Its purpose is to provide only const access to the array value, so the array can be a reference to another array. It is meant for optimization, so references can safely be used when evaluating a subexpression.

Motivation

It makes it possible to use the function evalRef in a safe way. It would be unsafe to use a LELArray object, because that gives non-const access to the value.

Definition at line 132 of file LELArray.h.

Constructor & Destructor Documentation

template<class T>
casacore::LELArrayRef< T >::LELArrayRef ( const IPosition shape)
inline

Constructor takes shape.

Its mask is set to all True.

Definition at line 137 of file LELArray.h.

template<class T>
casacore::LELArrayRef< T >::~LELArrayRef ( )
inline

Definition at line 140 of file LELArray.h.

template<class T>
casacore::LELArrayRef< T >::LELArrayRef ( const LELArrayRef< T > &  other)
private

Copy constructor is not needed.

Member Function Documentation

template<class T>
LELArrayRef<T>& casacore::LELArrayRef< T >::operator= ( const LELArrayRef< T > &  other)
private

Assignment is not needed.

template<class T>
const Array<T>& casacore::LELArrayRef< T >::value ( ) const
inline

Get value.

Definition at line 144 of file LELArray.h.

References casacore::LELArray< T >::value().


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