TSMColumn.h
Classes
- TSMColumn -- A column in the Tiled Storage Manager (full description)
Interface
- Public Members
- TSMColumn (TiledStMan* stman, int dataType, const String& columnName)
- virtual ~TSMColumn()
- const String& columnName() const
- virtual int dataType() const
- void setShapeColumn (const IPosition& shape)
- const IPosition& shapeColumn() const
- TSMDataColumn* makeDataColumn()
- TSMCoordColumn* makeCoordColumn (uInt axesNumber)
- TSMIdColumn* makeIdColumn()
- TSMColumn* unlink()
- Protected Members
- TSMColumn (const TSMColumn& that)
- Private Members
- TSMColumn& operator= (const TSMColumn&)
Review Status
- Reviewed By:
- UNKNOWN
- Date Reviewed:
- before2004/08/25
Prerequisite
Etymology
TSMColumn handles a column for the Tiled Storage Manager.
Synopsis
TSMColumn serves 2 purposes:
- It is the initial object for all columns in TiledStMan.
- It serves as a base class for the specialized TiledStMan
column classes dealing with data, coordinates and id values.
The protocol used for creating the derived
TSMDataColumn,
TSMCoordColumn, and
TSMIdColumn
objects is somewhat complicated. It works as follows:
When the table is set up, a TSMColumn object gets created for all
columns in a TiledStMan storage manager. The TiledStMan initialization
function lets each TSMColumn object create its specialized TSMXXColumn
object (using make{Coord,Id,Data}Column). At the end of the setup process
the TSMColumn objects are deleted and the DataManagerColumn pointers
in the BaseColumn objects get replaced by those to the specialized
objects. In that way no needless virtual function calls are done.
Motivation
TSMColumn is needed for the initial DataManagerColumn setup process.
It is also useful as a base class for all TiledStMan column objects.
Member Description
Create a column of the given type.
It will maintain a pointer to its parent storage manager.
Frees up the storage.
Get the name of the column.
virtual int dataType() const
Return the data type of the column.
Set the fixed shape of the column.
Get the fixed shape of the column.
Make a TSM data column object.
Add the pixel length to the total data pixel length.
Make a TSM coordinate column object.
Make a TSM id column object.
TSMColumn* unlink()
Unlink the underlying column.
It clears the pointer and returns its original value.
This is used to get a pointer directly to the underlying TSMXXColumn
object in the BaseColumn classes. In that way only 1 instead
of 2 virtual function calls are needed for a get or put.
TSMColumn (const TSMColumn& that)
The copy constructor can only be used to copy a derived class.
TSMColumn& operator= (const TSMColumn&)
Forbid assignment.