class
Table
: public Object
(Return to index)
The base class for all MAD tables.
It implements the common behaviour of tables, it can also be used via
dynamic casting to determine whether an object represents a table.
Type: |
Abstract |
Superclasses: |
public Object |
Include file: |
./AbstractObjects/Table.hh |
Inheritance
Synopsis (including inherited members):
- Public members:
- Protected Members:
Documentation:
- Public members:
-
struct Cell
;
- Descriptor for printing a table cell.
-
typedef std::vector<Cell> CellArray
;
- An array of cell descriptors.
-
virtual bool canReplaceBy
(Object*)
;
- Test if object can be replaced.
A table cannot be replaced, thus this method never returns true.
-
virtual void fill
()
= 0
;
- Refill the buffer.
If refill is true, call the table algorithm to fill the buffer.
-
static Table* find
(const string&)
;
- Find named Table.
If a table with name name exists, return a pointer to that table.
If no such table exists, throw MadException.
-
virtual const string getCategory
()const
;
- Return the object category as a string.
Return the string "TABLE".
-
virtual double getCell
(const PlaceRep&,const string&)
= 0
;
- Return value in selected table cell.
Return the value stored in the table cell identified by the row
at row and the column name col.
-
virtual std::vector<double> getColumn
(const RangeRep&,const string&)
= 0
;
- Return column col of this table, limited by range.
-
virtual CellArray getDefault
()const
= 0
;
- Return the default print columns.
Returns an array of column descriptors, which, when applied to a
row of the table, gives the default print columns for this table.
-
virtual double getLength
()
= 0
;
- Return the length of the table.
Returns the geometric length of the underlying beam line.
-
virtual const Beamline* getLine
()const
= 0
;
- Return embedded CLASSIC beamline.
Returns the CLASSIC beamline representing the table.
The data of the table are attached to each position in the line.
-
virtual std::vector<double> getRow
(const PlaceRep&,const std::vector<string>&)
= 0
;
- Return a table row.
Returns the values stored in the row specified by the first argument,
with columns selected by the names stored in the second argument.
-
virtual void invalidate
()
;
- Mark this table as invalid, if it is dynamic.
-
virtual bool isDependent
(const string&)const
= 0
;
- Find out if table depends on the object identified by name.
Must be overridden in derived classes.
-
virtual Expressions::PtrToScalar<double> makeColumnExpression
(const string&)const
= 0
;
- Return expression to compute the value in a column of the table.
The row is identified by setting a ``current'' row pointer in
listTFS() or printTable(). The expression then
computes the value in the column identified by the argument.
-
virtual void makeTFS
(std::ostream&,const CellArray&)const
= 0
;
- Write TFS file for this table.
-
virtual bool matches
(Table*)const
= 0
;
- Check that rhs is of same type as this.
-
virtual void printTable
(std::ostream&,const CellArray&)const
= 0
;
- Print list for the table.
-
virtual bool shouldTrace
()const
;
- Trace flag.
If true, the object's execute() function should be traced.
Always true for tables.
-
virtual bool shouldUpdate
()const
;
- Update flag.
If true, the data structure should be updated before calling execute().
Always true for tables.
-
void tfsTableDescriptors
(std::ostream&)const
;
- Write TFS descriptors existing for all tables.
- Protected members:
-
Table
(int,const char*,const char*)
;
- Constructor for exemplars.
-
Table
(const string&,Table*)
;
- Constructor for clones.
-
bool dynamic
;
- Flag dynamic table.
If true, the table is dynamic. If it is also invalidated,
it will be refilled when fill() is called.
-
bool refill
;
- Refill flag.
If true, the table has been invalidated. If it is also dynammic,
it will be refilled when fill() is called.
Documentation generated by fci on Mon Feb 7 12:30:10 2000