Go to the documentation of this file.
28 #ifndef TABLES_BITFLAGSENGINE_H
29 #define TABLES_BITFLAGSENGINE_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/tables/DataMan/BaseMappedArrayEngine.h>
190 const String& storedColumnName,
191 StoredType readMask=StoredType(0xffffffff),
192 StoredType writeMask=1);
206 const String& storedColumnName,
347 struct BoolToFlags :
public std::binary_function<Bool,StoredType,StoredType>
377 #ifndef CASACORE_NO_AUTO_TEMPLATES
378 #include <casacore/tables/DataMan/BitFlagsEngine.tcc>
379 #endif //# CASACORE_NO_AUTO_TEMPLATES
Specify which elements to extract from an n-dimensional array.
static DataManager * makeObject(const String &dataManagerType, const Record &spec)
Define the "constructor" to construct this engine when a table is read back.
Non-templated Helper class to handle the mask.
Bool operator()(StoredType value) const
Abstract base class for a data manager.
void getArrayColumn(Array< Bool > &array)
Get an entire column.
BitFlagsEngine< StoredType > & operator=(const BitFlagsEngine< StoredType > &)
Assignment is not needed and therefore forbidden (so it is made private and not implemented).
Templated virtual column engine for a table array of any type.
static String className()
Return the name of the class.
Read/write access to a table column.
virtual void putArrayColumnCells(const RefRows &rownrs, const Array< Bool > &data)
Put some array values in the column.
void toRecord(RecordInterface &spec, const String &prefix) const
Store the info in a Record.
void getArray(uInt rownr, Array< Bool > &array)
Get an array in the given row.
virtual void getArrayColumnCells(const RefRows &rownrs, Array< Bool > &data)
Get some array values in the column.
BFEngineMask itsBFEWriteMask
void makeMask(const TableColumn &column)
Make the mask from the given keywords defining the bits.
void mapOnGet(Array< Bool > &array, const Array< StoredType > &stored)
Map bit flags array to Bool array.
void prepare()
Preparing consists of setting the writable switch and adding the initial number of rows in case of cr...
void putColumnSlice(const Slicer &slicer, const Array< Bool > &array)
Put a section of all arrays in the column.
virtual String dataManagerType() const
Return the type name of the engine (i.e.
Templated virtual column engine to map bit flags to a Bool.
Functor to and an array and mask and convert to Bool.
void mapOnPut(const Array< Bool > &array, Array< StoredType > &stored)
Map Bool array to bit flags array.
void getSlice(uInt rownr, const Slicer &slicer, Array< Bool > &array)
Get a section of the array in the given row.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
uInt getMask() const
Get the mask.
Array< String > itsMaskKeys
Class holding the row numbers in a RefTable.
BitFlagsEngine(const String &virtualColumnName, const String &storedColumnName, StoredType readMask=StoredType(0xffffffff), StoredType writeMask=1)
Construct an engine to map integer arrays in a column to Bool arrays.
~BitFlagsEngine()
Destructor is mandatory.
BitFlagsEngine(const BitFlagsEngine< StoredType > &)
Copy constructor is only used by clone().
void putArray(uInt rownr, const Array< Bool > &array)
Put an array in the given row.
const Array< String > & getKeys() const
Get the mask keywords.
this file contains all the compiler specific defines
void create(uInt initialNrrow)
Initialize the object for a new table.
TableExprNode array(const TableExprNode &values, const TableExprNodeSet &shape)
Create an array of the given shape and fill it with the values.
static void registerClass()
Register the class name and the static makeObject "constructor".
void putSlice(uInt rownr, const Slicer &slicer, const Array< Bool > &array)
Put into a section of the array in the given row.
StoredType operator()(Bool flag, StoredType value) const
void fromRecord(const RecordInterface &spec, const TableColumn &column, const String &prefix)
Form the read mask from the specification.
FlagsToBool(StoredType readMask)
virtual void putColumnSliceCells(const RefRows &rownrs, const Slicer &slicer, const Array< Bool > &data)
Put into a section of some arrays in the column.
Abstract base class for Record classes.
void putArrayColumn(const Array< Bool > &array)
Put an entire column.
BitFlagsEngine(const Record &spec)
Construct from a record specification as created by dataManagerSpec().
Functor to convert Bools to flags using a mask.
LatticeExprNode mask(const LatticeExprNode &expr)
This function returns the mask of the given expression.
BFEngineMask(const Array< String > &keys, uInt defaultMask)
Form the mask from the given keywords defining the bits.
template <class T, class U> class vector;
BitFlagsEngine(const String &virtualColumnName, const String &storedColumnName, const Array< String > &readMaskKeys, const Array< String > &writeMaskKeys)
Construct an engine to map integer arrays in a column to Bool arrays.
DataManager * clone() const
Clone the engine object.
String: the storage and methods of handling collections of characters.
BFEngineMask itsBFEReadMask
bool Bool
Define the standard types used by Casacore.
BFEngineMask(uInt mask=0xffffffff)
Form the mask as given.
A hierarchical collection of named fields of various types.
void getColumnSlice(const Slicer &slicer, Array< Bool > &array)
Get a section of all arrays in the column.
virtual void getColumnSliceCells(const RefRows &rownrs, const Slicer &slicer, Array< Bool > &data)
Get a section of some arrays in the column.
virtual Record dataManagerSpec() const
Record a record containing data manager specifications.
virtual void setProperties(const Record &spec)
Modify data manager properties.
virtual Record getProperties() const
Get data manager properties that can be modified.
virtual String dataManagerName() const
Get the name given to the engine (is the virtual column name).
BoolToFlags(StoredType writeMask)