28 #ifndef LATTICES_LATTICEBASE_H
29 #define LATTICES_LATTICEBASE_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/lattices/LEL/LELCoordinates.h>
35 #include <casacore/casa/Arrays/IPosition.h>
36 #include <casacore/casa/Utilities/DataType.h>
37 #include <casacore/casa/IO/FileLocker.h>
38 #include <casacore/casa/BasicSL/String.h>
LockType
Define the possible lock types.
bool isEqual(const IPosition &other) const
Element-by-element comparison for equality.
virtual Bool isPersistent() const
Is the lattice persistent and can it be loaded by other processes as well? That is the case for a Pag...
virtual uInt maximumCacheSize() const
Maximum cache size - not necessarily all used.
virtual String imageType() const
Get the image type (returns name of derived class).
Bool conform(const LatticeBase &other) const
Return a value of "True" if this instance of Lattice and 'other' have the same shape,...
virtual IPosition shape() const =0
Return the shape of the Lattice including all degenerate axes (ie.
virtual Bool isPaged() const
Is the lattice paged to disk? The default implementation returns False.
IPosition niceCursorShape(uInt maxPixels) const
Returns a recommended cursor shape for iterating through all the pixels in the Lattice.
virtual Bool canReferenceArray() const
Can the lattice data be referenced as an array section? That is the case for an ArrayLattice or a Tem...
virtual Bool lock(FileLocker::LockType, uInt nattempts)
It is strongly recommended to use class LatticeLocker to handle lattice locking.
virtual void resync()
Resynchronize the Lattice object with the lattice file.
virtual uInt advisedMaxPixels() const =0
This function returns the recommended maximum number of pixels to include in the cursor of an iterato...
virtual void flush()
Flush the data (but do not unlock).
IPosition niceCursorShape() const
virtual void setCacheSizeInTiles(uInt howManyTiles)
Set the actual cache size for this Array to be big enough for the indicated number of tiles.
virtual size_t nelements() const
Return the total number of elements in this Lattice.
LatticeBase()
Define default constructor to be used by derived classes.
virtual uInt ndim() const
Return the number of axes in this Lattice.
virtual void showCacheStatistics(ostream &os) const
Report on cache success.
void throwBoolMath() const
Throw an exception for arithmetic on a Bool Lattice.
LatticeBase & operator=(const LatticeBase &)
LatticeBase(const LatticeBase &)
Copy constructor and assignment can only be used by derived classes.
virtual LatticeBase * clone() const =0
Make a copy of the derived object (reference semantics).
virtual void tempClose()
Temporarily close the lattice.
virtual LELCoordinates lelCoordinates() const
Return the coordinates of the lattice.
virtual void reopen()
Explicitly reopen the temporarily closed lattice.
virtual ~LatticeBase()
A virtual destructor is needed so that it will use the actual destructor in the derived class.
virtual Bool hasLock(FileLocker::LockType) const
virtual Bool isWritable() const
Is the lattice writable? The default implementation returns True.
virtual IPosition doNiceCursorShape(uInt maxPixels) const
The function (in the derived classes) doing the actual work.
virtual void clearCache()
Clears and frees up the caches, but the maximum allowed cache size is unchanged from when setCacheSiz...
virtual void setCacheSizeFromPath(const IPosition &sliceShape, const IPosition &windowStart, const IPosition &windowLength, const IPosition &axisPath)
Set the cache size as to "fit" the indicated path.
virtual Bool ok() const
Check class internals - used for debugging.
virtual void setMaximumCacheSize(uInt howManyPixels)
Set the maximum (allowed) cache size as indicated.
virtual String name(Bool stripPath=False) const
Return the name of the current Lattice object.
virtual void save(const String &fileName) const
Save the image in an AipsIO file with the given name.
virtual DataType dataType() const =0
Get the data type of the lattice.
String: the storage and methods of handling collections of characters.
this file contains all the compiler specific defines
bool Bool
Define the standard types used by Casacore.