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,
217 virtual String dataManagerType()
const;
220 virtual String dataManagerName()
const;
223 virtual Record dataManagerSpec()
const;
228 virtual Record getProperties()
const;
235 virtual void setProperties (
const Record& spec);
239 static String className();
247 static void registerClass();
263 void create (
uInt initialNrrow);
284 void putSlice (
uInt rownr,
const Slicer& slicer,
297 virtual void getArrayColumnCells (
const RefRows& rownrs,
302 virtual void putArrayColumnCells (
const RefRows& rownrs,
315 virtual void getColumnSliceCells (
const RefRows& rownrs,
321 virtual void putColumnSliceCells (
const RefRows& rownrs,
340 {
return (value &
itsMask) != 0; }
347 struct BoolToFlags :
public std::binary_function<Bool,StoredType,StoredType>
350 StoredType operator() (
Bool flag, StoredType
value)
const 351 {
return (flag ? value&
itsMask : value); }
377 #ifndef CASACORE_NO_AUTO_TEMPLATES 378 #include <casacore/tables/DataMan/BitFlagsEngine.tcc> 379 #endif //# CASACORE_NO_AUTO_TEMPLATES
Non-templated Helper class to handle the mask.
Templated virtual column engine to map bit flags to a Bool.
LatticeExprNode mask(const LatticeExprNode &expr)
This function returns the mask of the given expression.
TableExprNode array(const TableExprNode &values, const TableExprNodeSet &shape)
Create an array of the given shape and fill it with the values.
Templated virtual column engine for a table array of any type.
FlagsToBool(StoredType readMask)
PtrHolder< T > & operator=(const PtrHolder< T > &other)
Array< String > itsMaskKeys
uInt getMask() const
Get the mask.
const Array< String > & getKeys() const
Get the mask keywords.
Functor to convert Bools to flags using a mask.
void makeMask(const TableColumn &column)
Make the mask from the given keywords defining the bits.
void fromRecord(const RecordInterface &spec, const TableColumn &column, const String &prefix)
Form the read mask from the specification.
Class holding the row numbers in a RefTable.
BFEngineMask itsBFEReadMask
BoolToFlags(StoredType writeMask)
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
BFEngineMask(uInt mask=0xffffffff)
Form the mask as given.
Read/write access to a table column.
template <class T, class U> class vector;
Specify which elements to extract from an n-dimensional array.
Abstract base class for a data manager.
String: the storage and methods of handling collections of characters.
void getArray(Array< V > &val, int type, const Record &gr, const String &name)
Abstract base class for Record classes.
Functor to and an array and mask and convert to Bool.
this file contains all the compiler specific defines
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
BFEngineMask itsBFEWriteMask
void toRecord(RecordInterface &spec, const String &prefix) const
Store the info in a Record.