#include <ColDescSet.h>
Collaboration diagram for casa::ColumnDescSet:

Internal
ColumnDescSet is the set of column descriptions in a table description.
ColumnDescSet is used by TableDesc to store all column descriptions.
In principle this class is only used internally by the table system. However, there is a function in TableDesc which gives const access to this class. This can be used by the user to call functions like isDisjoint.
Definition at line 78 of file ColDescSet.h.
Public Member Functions | |
| ColumnDescSet () | |
| Construct an empty column set. | |
| ColumnDescSet (const ColumnDescSet &) | |
| Copy constructor (copy semantics). | |
| ~ColumnDescSet () | |
| ColumnDescSet & | operator= (const ColumnDescSet &) |
| Assignment (copy semantics). | |
| uInt | ncolumn () const |
| Get nr of columns in this set. | |
| Bool | isDefined (const String &name) const |
| Test if a column is defined in this set. | |
| Bool | isEqual (const ColumnDescSet &other, Bool &equalDataTypes) const |
| Test if this set equals another one. | |
| Bool | isSubset (const ColumnDescSet &other, Bool &equalDataTypes) const |
| Test if this set is a subset of another one. | |
| Bool | isStrictSubset (const ColumnDescSet &other, Bool &equalDataTypes) const |
| Test if this set is a strict subset of another one, thus if it is a subset and not equal. | |
| Bool | isSuperset (const ColumnDescSet &other, Bool &equalDataTypes) const |
| Test if this set is a superset of another one. | |
| Bool | isStrictSuperset (const ColumnDescSet &other, Bool &equalDataTypes) const |
| Test if this set is a strict superset of another one, thus if it is a superset and not equal. | |
| Bool | isDisjoint (const ColumnDescSet &other) const |
| Test if this and the other column set are disjoint. | |
| void | show (ostream &os) const |
| Get const access to the column descriptions. | |
| void | checkSubTableDesc () const |
| Check recursevily if the descriptions of all subtables are known. | |
| ColumnDesc & | operator[] (const String &name) |
| Get a column by its name. | |
| const ColumnDesc & | operator[] (const String &name) const |
| ColumnDesc & | operator[] (uInt index) |
| Get a column by its index. | |
| const ColumnDesc & | operator[] (uInt index) const |
Private Member Functions | |
| ColumnDesc & | addColumn (const ColumnDesc &) |
| Add a column. | |
| ColumnDesc & | addColumn (const ColumnDesc &, const String &newname) |
| Add a column with another name. | |
| void | remove (const String &name) |
| Remove a column. | |
| void | rename (const String &newname, const String &oldname) |
| Rename a column in the set. | |
| Bool | allExist (const ColumnDescSet &, Bool &equalDataTypes) const |
| Test if all columns are part of the other set. | |
| void | add (const ColumnDescSet &set) |
| Add another (disjoint) column set. | |
| void | putFile (AipsIO &ios, const TableAttr &) const |
| Put the object. | |
| void | getFile (AipsIO &, const TableAttr &) |
| Get the object. | |
Private Attributes | |
| SimpleOrderedMap< String, ColumnDesc > | cols_p |
| The set of all columns. | |
| Block< void * > | colSeq_p |
| The order of addition of column descriptions. | |
Static Private Attributes | |
| static Bool | registrationDone_p |
| A switch indicating if the registration of the DataManagers has been done (False = not done yet). | |
Friends | |
| class | TableDesc |
| casa::ColumnDescSet::ColumnDescSet | ( | ) |
Construct an empty column set.
| casa::ColumnDescSet::ColumnDescSet | ( | const ColumnDescSet & | ) |
Copy constructor (copy semantics).
| casa::ColumnDescSet::~ColumnDescSet | ( | ) |
| ColumnDescSet& casa::ColumnDescSet::operator= | ( | const ColumnDescSet & | ) |
Assignment (copy semantics).
| ColumnDesc& casa::ColumnDescSet::operator[] | ( | const String & | name | ) |
Get a column by its name.
| const ColumnDesc& casa::ColumnDescSet::operator[] | ( | const String & | name | ) | const [inline] |
Definition at line 97 of file ColDescSet.h.
| ColumnDesc& casa::ColumnDescSet::operator[] | ( | uInt | index | ) | [inline] |
| const ColumnDesc& casa::ColumnDescSet::operator[] | ( | uInt | index | ) | const [inline] |
| uInt casa::ColumnDescSet::ncolumn | ( | ) | const [inline] |
Get nr of columns in this set.
Definition at line 110 of file ColDescSet.h.
References cols_p.
Referenced by casa::TableDesc::ncolumn().
Test if a column is defined in this set.
Definition at line 114 of file ColDescSet.h.
References cols_p.
Referenced by casa::TableDesc::isColumn().
| Bool casa::ColumnDescSet::isEqual | ( | const ColumnDescSet & | other, | |
| Bool & | equalDataTypes | |||
| ) | const |
Test if this set equals another one.
It is equal if the number of columns is equal and all field names in this set occur in the other too. The order of the columns is not important.
The flag equalDataTypes is set to True if the data types of all columns match.
| Bool casa::ColumnDescSet::isSubset | ( | const ColumnDescSet & | other, | |
| Bool & | equalDataTypes | |||
| ) | const |
Test if this set is a subset of another one.
It is similar to isEqual above.
Referenced by isSuperset().
| Bool casa::ColumnDescSet::isStrictSubset | ( | const ColumnDescSet & | other, | |
| Bool & | equalDataTypes | |||
| ) | const |
Test if this set is a strict subset of another one, thus if it is a subset and not equal.
Referenced by isStrictSuperset().
| Bool casa::ColumnDescSet::isSuperset | ( | const ColumnDescSet & | other, | |
| Bool & | equalDataTypes | |||
| ) | const [inline] |
Test if this set is a superset of another one.
Definition at line 135 of file ColDescSet.h.
References isSubset().
| Bool casa::ColumnDescSet::isStrictSuperset | ( | const ColumnDescSet & | other, | |
| Bool & | equalDataTypes | |||
| ) | const [inline] |
Test if this set is a strict superset of another one, thus if it is a superset and not equal.
Definition at line 140 of file ColDescSet.h.
References isStrictSubset().
| Bool casa::ColumnDescSet::isDisjoint | ( | const ColumnDescSet & | other | ) | const |
Test if this and the other column set are disjoint.
| void casa::ColumnDescSet::show | ( | ostream & | os | ) | const |
Get const access to the column descriptions.
Show the columns in the set.
| void casa::ColumnDescSet::checkSubTableDesc | ( | ) | const |
Check recursevily if the descriptions of all subtables are known.
Referenced by casa::TableDesc::checkSubTableDesc().
| ColumnDesc& casa::ColumnDescSet::addColumn | ( | const ColumnDesc & | ) | [private] |
Add a column.
An exception is thrown if a column with this name already exists.
Referenced by casa::TableDesc::addColumn().
| ColumnDesc& casa::ColumnDescSet::addColumn | ( | const ColumnDesc & | , | |
| const String & | newname | |||
| ) | [private] |
Add a column with another name.
An exception is thrown if a column with this name already exists.
| void casa::ColumnDescSet::remove | ( | const String & | name | ) | [private] |
Remove a column.
An exception is thrown if the column with this name does not exist.
Referenced by casa::TableDesc::removeColumn().
Rename a column in the set.
An exception is thrown if the new name already exists or if the old name does not exist.
| Bool casa::ColumnDescSet::allExist | ( | const ColumnDescSet & | , | |
| Bool & | equalDataTypes | |||
| ) | const [private] |
Test if all columns are part of the other set.
The flag equalDataTypes is set to True if the data types of the columns in both sets are the same.
| void casa::ColumnDescSet::add | ( | const ColumnDescSet & | set | ) | [private] |
Add another (disjoint) column set.
If the sets are not disjoint (i.e. the other set contains a column with an already existing name, an exception is thrown and nothing of the other set is added.
Put the object.
friend class TableDesc [friend] |
Definition at line 80 of file ColDescSet.h.
The set of all columns.
Definition at line 194 of file ColDescSet.h.
Referenced by isDefined(), and ncolumn().
Block<void*> casa::ColumnDescSet::colSeq_p [private] |
The order of addition of column descriptions.
Definition at line 198 of file ColDescSet.h.
Referenced by operator[]().
Bool casa::ColumnDescSet::registrationDone_p [static, private] |
A switch indicating if the registration of the DataManagers has been done (False = not done yet).
Definition at line 201 of file ColDescSet.h.
1.5.1