casa
$Rev:20696$
|
Representation for handle class SetupNewTable. More...
#include <SetupNewTab.h>
Public Member Functions | |
SetupNewTableRep (const String &tableName, const String &tableDescName, Table::TableOption) | |
Create a new table using the table description with the given name. | |
SetupNewTableRep (const String &tableName, const TableDesc &, Table::TableOption) | |
Create a new table using the given table description. | |
~SetupNewTableRep () | |
uInt & | count () |
Get access to the reference count. | |
const String & | name () const |
Get the name of the table. | |
int | option () const |
Get the table create option. | |
Bool | isMarkedForDelete () const |
Test if the table is marked for delete. | |
const TableDesc & | tableDesc () const |
Get the table description. | |
void | bindColumn (const String &columnName, const DataManager &) |
Bind a column to the given data manager. | |
void | bindColumn (const String &columnName, const String &otherColumn) |
Bind a column to the given data manager of the other column. | |
void | bindGroup (const String &columnGroup, const DataManager &, Bool rebind=False) |
Bind a group of columns to the given data manager. | |
void | bindAll (const DataManager &, Bool rebind=False) |
Bind all columns to the given data manager. | |
void | bindCreate (const Record &spec) |
Create data managers and bind the columns using the specifications in the given record (which is obtained using Table::dataManagerInfo()). | |
void | setShapeColumn (const String &columnName, const IPosition &shape) |
Define the shape of fixed shaped arrays in a column. | |
Bool | isUsed () const |
Test if object is already in use. | |
ColumnSet * | columnSetPtr () |
Get pointer to column set. | |
TableDesc * | tableDescPtr () |
Get pointer to table description. | |
void | setInUse () |
Set object to in use by a (Plain)Table object. | |
void | handleUnbound () |
Make a data manager for all unbound columns. | |
Private Member Functions | |
SetupNewTableRep (const SetupNewTableRep &) | |
Copy constructor is forbidden, because copying a table requires some more knowledge (like table name of result). | |
SetupNewTableRep & | operator= (const SetupNewTableRep &) |
Assignment is forbidden, because copying a table requires some more knowledge (like table name of result). | |
void | setup () |
Setup the new table. | |
DataManager * | getDataManager (const DataManager &dataMan) |
Get the internal data manager object for the given data manager. | |
Private Attributes | |
uInt | count_p |
Reference count. | |
String | tabName_p |
Table name. | |
int | option_p |
Constructor options. | |
Bool | delete_p |
Marked for delete? | |
TableDesc * | tdescPtr_p |
ColumnSet * | colSetPtr_p |
SimpleOrderedMap< void *, void * > | dataManMap_p |
Representation for handle class SetupNewTable.
Internal
SetupNewTableRep is the representation of class SetupNewTable.
SetupNewTableRep is the representation of class SetupNewTable . Its functionality is described there.
Copying a SetupNewTable object as such is very difficult, if not impossible. However, being able to use a SetupNewTable copy constructor was required to be able to have (static) functions constructing a SetupNewTable object and return it by value (as done for example by ForwardColumn::setupNewTable
). Therefore SetupNewTable is implemented using the handle idiom. SetupNewTable is the interface (i.e. the handle) for the user, while underneath SetupNewTableRep is doing all the work. The SetupNewTable copy constructor can simply copy yhe pointer to the underlying SetupNewTableRep object.
Definition at line 92 of file SetupNewTab.h.
casa::SetupNewTableRep::SetupNewTableRep | ( | const String & | tableName, |
const String & | tableDescName, | ||
Table::TableOption | |||
) |
Create a new table using the table description with the given name.
The description will be read from a file.
casa::SetupNewTableRep::SetupNewTableRep | ( | const String & | tableName, |
const TableDesc & | , | ||
Table::TableOption | |||
) |
Create a new table using the given table description.
casa::SetupNewTableRep::SetupNewTableRep | ( | const SetupNewTableRep & | ) | [private] |
Copy constructor is forbidden, because copying a table requires some more knowledge (like table name of result).
Declaring it private, makes it unusable.
void casa::SetupNewTableRep::bindAll | ( | const DataManager & | , |
Bool | rebind = False |
||
) |
Bind all columns to the given data manager.
The flag rebind tells if the binding of an already bound column will be overwritten. It cannot be used anymore once the SetupNewTableRep object is used to construct a Table object.
Referenced by casa::SetupNewTable::bindAll().
void casa::SetupNewTableRep::bindColumn | ( | const String & | columnName, |
const DataManager & | |||
) |
Bind a column to the given data manager.
If already bound, the binding will be overwritten. It cannot be used anymore once the SetupNewTableRep object is used to construct a Table object.
Referenced by casa::SetupNewTable::bindColumn().
void casa::SetupNewTableRep::bindColumn | ( | const String & | columnName, |
const String & | otherColumn | ||
) |
Bind a column to the given data manager of the other column.
If the other column is not bound, nothing will be done. If columnName is already bound, the binding will be overwritten. It cannot be used anymore once the SetupNewTableRep object is used to construct a Table object.
void casa::SetupNewTableRep::bindCreate | ( | const Record & | spec | ) |
Create data managers and bind the columns using the specifications in the given record (which is obtained using Table::dataManagerInfo()).
Referenced by casa::SetupNewTable::bindCreate().
void casa::SetupNewTableRep::bindGroup | ( | const String & | columnGroup, |
const DataManager & | , | ||
Bool | rebind = False |
||
) |
Bind a group of columns to the given data manager.
The flag rebind tells if the binding of an already bound column will be overwritten. It cannot be used anymore once the SetupNewTableRep object is used to construct a Table object.
Referenced by casa::SetupNewTable::bindGroup().
ColumnSet* casa::SetupNewTableRep::columnSetPtr | ( | ) | [inline] |
Get pointer to column set.
This function is used by PlainTable.
Definition at line 176 of file SetupNewTab.h.
References colSetPtr_p.
Referenced by casa::SetupNewTable::columnSetPtr().
uInt& casa::SetupNewTableRep::count | ( | ) | [inline] |
Get access to the reference count.
Definition at line 107 of file SetupNewTab.h.
References count_p.
DataManager* casa::SetupNewTableRep::getDataManager | ( | const DataManager & | dataMan | ) | [private] |
Get the internal data manager object for the given data manager.
If it does not exist yet, it will be cloned and stored internally.
Make a data manager for all unbound columns.
Referenced by casa::SetupNewTable::handleUnbound().
Bool casa::SetupNewTableRep::isMarkedForDelete | ( | ) | const [inline] |
Test if the table is marked for delete.
Definition at line 119 of file SetupNewTab.h.
References delete_p.
Referenced by casa::SetupNewTable::isMarkedForDelete().
Bool casa::SetupNewTableRep::isUsed | ( | ) | const [inline] |
Test if object is already in use.
Definition at line 171 of file SetupNewTab.h.
References colSetPtr_p, casa::False, and casa::True.
Referenced by casa::SetupNewTable::isUsed().
const String& casa::SetupNewTableRep::name | ( | ) | const [inline] |
Get the name of the table.
Definition at line 111 of file SetupNewTab.h.
References tabName_p.
Referenced by casa::SetupNewTable::name().
SetupNewTableRep& casa::SetupNewTableRep::operator= | ( | const SetupNewTableRep & | ) | [private] |
Assignment is forbidden, because copying a table requires some more knowledge (like table name of result).
Declaring it private, makes it unusable.
int casa::SetupNewTableRep::option | ( | ) | const [inline] |
Get the table create option.
Definition at line 115 of file SetupNewTab.h.
References option_p.
Referenced by casa::SetupNewTable::option().
void casa::SetupNewTableRep::setInUse | ( | ) | [inline] |
Set object to in use by a (Plain)Table object.
This function is used by PlainTable.
Definition at line 186 of file SetupNewTab.h.
References colSetPtr_p.
Referenced by casa::SetupNewTable::setInUse().
void casa::SetupNewTableRep::setShapeColumn | ( | const String & | columnName, |
const IPosition & | shape | ||
) |
Define the shape of fixed shaped arrays in a column.
The shape of those arrays has to be known before the table can be constructed. It has to be defined via this function, if it was not already defined in the column description. If only the dimensionality was defined in the column description, the shape's dimensionality must match it. Calling this function for an non-fixed shaped array results in an exception. It cannot be used anymore once the SetupNewTableRep object is used to construct a Table object.
Referenced by casa::SetupNewTable::setShapeColumn().
void casa::SetupNewTableRep::setup | ( | ) | [private] |
Setup the new table.
This checks various things and creates the set of columns.
const TableDesc& casa::SetupNewTableRep::tableDesc | ( | ) | const [inline] |
Get the table description.
Definition at line 123 of file SetupNewTab.h.
References tdescPtr_p.
Referenced by casa::SetupNewTable::tableDesc().
TableDesc* casa::SetupNewTableRep::tableDescPtr | ( | ) | [inline] |
Get pointer to table description.
This function is used by PlainTable.
Definition at line 181 of file SetupNewTab.h.
References tdescPtr_p.
Referenced by casa::SetupNewTable::adjustHypercolumns(), and casa::SetupNewTable::tableDescPtr().
ColumnSet* casa::SetupNewTableRep::colSetPtr_p [private] |
Definition at line 202 of file SetupNewTab.h.
Referenced by columnSetPtr(), isUsed(), and setInUse().
uInt casa::SetupNewTableRep::count_p [private] |
SimpleOrderedMap<void*,void*> casa::SetupNewTableRep::dataManMap_p [private] |
Definition at line 203 of file SetupNewTab.h.
Bool casa::SetupNewTableRep::delete_p [private] |
int casa::SetupNewTableRep::option_p [private] |
String casa::SetupNewTableRep::tabName_p [private] |
TableDesc* casa::SetupNewTableRep::tdescPtr_p [private] |
Definition at line 201 of file SetupNewTab.h.
Referenced by tableDesc(), and tableDescPtr().