29 #ifndef LATTICES_ARRAYLATTICE_H
30 #define LATTICES_ARRAYLATTICE_H
146 template <
class T>
class ArrayLattice :
public Lattice<T>
176 ArrayLattice<T>&
operator= (
const ArrayLattice<T>& other);
179 virtual Lattice<T>*
clone()
const;
188 virtual IPosition
shape()
const;
196 const Array<T>&
asArray()
const;
202 virtual T
getAt (
const IPosition& where)
const;
205 virtual void putAt (
const T&
value,
const IPosition& where);
217 void getIterSlice (Array<T>& buffer,
const IPosition& start,
218 const IPosition&
end,
const IPosition& incr);
222 virtual Bool doGetSlice (Array<T>& buffer,
const Slicer& section);
225 virtual void doPutSlice (
const Array<T>& sourceBuffer,
226 const IPosition& where,
227 const IPosition& stride);
238 #ifndef CASACORE_NO_AUTO_TEMPLATES
239 #include <casacore/lattices/Lattices/ArrayLattice.tcc>
240 #endif //# CASACORE_NO_AUTO_TEMPLATES
ArrayLattice< T > & operator=(const ArrayLattice< T > &other)
The assignment operator uses copy semantics.
virtual Bool ok() const
Check for internal consistency.
virtual void set(const T &value)
Set all of the elements in the Lattice to a value.
TableExprNode array(const TableExprNode &values, const TableExprNodeSet &shape)
Create an array of the given shape and fill it with the values.
const_iterator end() const
virtual void doPutSlice(const Array< T > &sourceBuffer, const IPosition &where, const IPosition &stride)
Do the actual putting of an array of values.
Array< T > & asArray()
Return the Array of the data within this Lattice.
LatticeExprNode ndim(const LatticeExprNode &expr)
1-argument function to get the dimensionality of a lattice.
virtual Bool canReferenceArray() const
The lattice data can be referenced as an array section.
bool Bool
Define the standard types used by Casacore.
ArrayLattice()
The default constructor creates a ArrayLattice that is useless for just about everything, except that it can be assigned to with the assignment operator.
template <class T, class U> class vector;
virtual IPosition shape() const
returns the shape of the ArrayLattice.
virtual Bool isWritable() const
Is the lattice writable?
virtual Bool doGetSlice(Array< T > &buffer, const Slicer §ion)
Do the actual getting of an array of values.
virtual uInt advisedMaxPixels() const
Returns the maximum recommended number of pixels for a cursor.
virtual Lattice< T > * clone() const
Make a copy of the object (reference semantics).
virtual void putAt(const T &value, const IPosition &where)
Put the value of a single element.
void getIterSlice(Array< T > &buffer, const IPosition &start, const IPosition &end, const IPosition &incr)
Get a slice in an optimized way (specifically for ArrLatticeIter).
virtual T getAt(const IPosition &where) const
Return the value of the single element located at the argument IPosition.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.