OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
Table Class Referenceabstract

The base class for all OPAL tables. More...

#include <Table.h>

Inheritance diagram for Table:
Inheritance graph
[legend]
Collaboration diagram for Table:
Collaboration graph
[legend]

Classes

struct  Cell
 Descriptor for printing a table cell. More...
 

Public Types

typedef std::vector< CellCellArray
 An array of cell descriptors. More...
 

Public Member Functions

virtual ~Table ()
 
virtual bool canReplaceBy (Object *newObject)
 Test if object can be replaced. More...
 
virtual void fill ()=0
 Refill the buffer. More...
 
virtual const std::string getCategory () const
 Return the object category as a string. More...
 
virtual bool shouldTrace () const
 Trace flag. More...
 
virtual bool shouldUpdate () const
 Update flag. More...
 
virtual double getCell (const PlaceRep &row, const std::string &col)=0
 Return value in selected table cell. More...
 
virtual std::vector< double > getColumn (const RangeRep &range, const std::string &col)=0
 Return column [b]col[/b] of this table, limited by [b]range[/b]. More...
 
virtual CellArray getDefault () const =0
 Return the default print columns. More...
 
virtual double getLength ()=0
 Return the length of the table. More...
 
virtual const BeamlinegetLine () const =0
 Return embedded CLASSIC beamline. More...
 
virtual std::vector< double > getRow (const PlaceRep &, const std::vector< std::string > &)=0
 Return a table row. More...
 
virtual void invalidate ()
 Mark this table as invalid, if it is dynamic. More...
 
virtual bool isDependent (const std::string &name) const =0
 Find out if table depends on the object identified by [b]name[/b]. More...
 
virtual Expressions::PtrToScalar< double > makeColumnExpression (const std::string &) const =0
 
virtual bool matches (Table *rhs) const =0
 Check that [b]rhs[/b] is of same type as [b]this[/b]. More...
 
virtual void printTable (std::ostream &, const CellArray &) const =0
 Print list for the table. More...
 
- Public Member Functions inherited from Object
virtual ~Object ()
 
virtual bool canReplaceBy (Object *object)
 Test if replacement is allowed. More...
 
virtual Objectclone (const std::string &name)=0
 Return a clone. More...
 
void copyAttributes (const Object &)
 Copy attributes from another object. More...
 
virtual void execute ()
 Execute the command. More...
 
virtual AttributefindAttribute (const std::string &name)
 Find an attribute by name. More...
 
virtual const AttributefindAttribute (const std::string &name) const
 Find an attribute by name. More...
 
virtual const std::string getCategory () const =0
 Return the object category as a string. More...
 
virtual bool shouldTrace () const =0
 Trace flag. More...
 
virtual bool shouldUpdate () const =0
 Update flag. More...
 
virtual ObjectmakeTemplate (const std::string &, TokenStream &, Statement &)
 Macro handler function. More...
 
virtual ObjectmakeInstance (const std::string &name, Statement &, const Parser *)
 Macro handler function. More...
 
virtual void parse (Statement &)
 Parse the object. More...
 
virtual void parseShortcut (Statement &, bool eval=true)
 Parser for single-attribute commands. More...
 
virtual void print (std::ostream &) const
 Print the object. More...
 
virtual void printValue (std::ostream &) const
 
virtual void printHelp (std::ostream &) const
 Print help. More...
 
virtual void replace (Object *oldObject, Object *newObject)
 Replace references. More...
 
virtual void update ()
 Update this object. More...
 
bool isBuiltin () const
 True, if [b]this[/b] is a built-in object. More...
 
virtual bool isShared () const
 Shared flag. More...
 
virtual void setShared (bool)
 Set/reset shared flag. More...
 
void setDirty (bool)
 Set/reset the [b]modified[/b] flag. More...
 
bool isDirty () const
 True, if the [b]modified[/b] flag is set. More...
 
void setFlag (bool)
 Flag/unflag this object, e. g. to control output of objects for. More...
 
bool isFlagged () const
 True, if [b]this[/b] is flagged by setFlag(true). More...
 
const ObjectgetBaseObject () const
 Return the object's base type object. More...
 
const std::string & getOpalName () const
 Return object name. More...
 
ObjectgetParent () const
 Return parent pointer. More...
 
bool isTreeMember (const Object *subTree) const
 Test for tree membership. More...
 
void setOpalName (const std::string &name)
 Set object name. More...
 
void setParent (Object *)
 Set parent object. More...
 
void clear ()
 Clear the occurrence counter. More...
 
int increment ()
 Increment and return the occurrence counter. More...
 
int occurrenceCount ()
 Return the occurrence counter. More...
 
void registerReference (Invalidator *a)
 Register a reference to this object. More...
 
void unregisterReference (Invalidator *a)
 Unegister a reference to this object. More...
 
void registerOwnership (const AttributeHandler::OwnerType &itsClass) const
 
- Public Member Functions inherited from RCObject
int addReference () const
 Increment reference count. More...
 
int removeReference () const
 Decrement the reference count. More...
 
bool isShared () const
 Test for sharing. More...
 

Static Public Member Functions

static Tablefind (const std::string &name)
 Find named Table. More...
 

Protected Member Functions

 Table (int size, const char *name, const char *help)
 Constructor for exemplars. More...
 
 Table (const std::string &name, Table *parent)
 Constructor for clones. More...
 
- Protected Member Functions inherited from Object
 Object (int size, const char *name, const char *help)
 Constructor for exemplars. More...
 
 Object (const std::string &name, Object *parent)
 Constructor for clones. More...
 
- Protected Member Functions inherited from RCObject
 RCObject ()
 Default constructor. More...
 
 RCObject (const RCObject &)
 Copy constructor. More...
 
virtual ~RCObject ()=0
 
RCObjectoperator= (const RCObject &right)
 

Protected Attributes

bool dynamic
 Flag dynamic table. More...
 
bool refill
 Refill flag. More...
 
- Protected Attributes inherited from Object
bool builtin
 Built-in flag. More...
 
bool modified
 Dirty flag. More...
 
bool flagged
 Object flag. More...
 

Private Member Functions

 Table ()
 
 Table (const Table &)
 
void operator= (const Table &)
 

Additional Inherited Members

- Public Attributes inherited from Object
std::vector< AttributeitsAttr
 The object attributes. More...
 

Detailed Description

The base class for all OPAL tables.

Definition at line 42 of file Table.h.

Member Typedef Documentation

◆ CellArray

typedef std::vector<Cell> Table::CellArray

An array of cell descriptors.

Definition at line 63 of file Table.h.

Constructor & Destructor Documentation

◆ ~Table()

Table::~Table ( )
virtual

Definition at line 30 of file Table.cpp.

References Object::builtin, OpalData::getInstance(), and OpalData::unregisterTable().

Here is the call graph for this function:

◆ Table() [1/4]

Table::Table ( int  size,
const char *  name,
const char *  help 
)
protected

Constructor for exemplars.

Definition at line 70 of file Table.cpp.

◆ Table() [2/4]

Table::Table ( const std::string &  name,
Table parent 
)
protected

Constructor for clones.

Definition at line 76 of file Table.cpp.

References OpalData::getInstance(), and OpalData::registerTable().

Here is the call graph for this function:

◆ Table() [3/4]

Table::Table ( )
private

◆ Table() [4/4]

Table::Table ( const Table )
private

Member Function Documentation

◆ canReplaceBy()

bool Table::canReplaceBy ( Object newObject)
virtual

Test if object can be replaced.

Reimplemented from Object.

Definition at line 36 of file Table.cpp.

◆ fill()

virtual void Table::fill ( )
pure virtual

◆ find()

Table * Table::find ( const std::string &  name)
static

Find named Table.

Definition at line 41 of file Table.cpp.

References OpalData::find(), OpalData::getInstance(), and name.

Referenced by Expressions::AColumn::evaluate(), Expressions::ARow::evaluate(), Expressions::SCell::evaluate(), and List::execute().

Here is the call graph for this function:

◆ getCategory()

const std::string Table::getCategory ( ) const
virtual

Return the object category as a string.

Implements Object.

Definition at line 50 of file Table.cpp.

◆ getCell()

virtual double Table::getCell ( const PlaceRep row,
const std::string &  col 
)
pure virtual

Return value in selected table cell.

Referenced by Expressions::SCell::evaluate().

◆ getColumn()

virtual std::vector< double > Table::getColumn ( const RangeRep range,
const std::string &  col 
)
pure virtual

Return column [b]col[/b] of this table, limited by [b]range[/b].

Referenced by Expressions::AColumn::evaluate().

◆ getDefault()

virtual CellArray Table::getDefault ( ) const
pure virtual

Return the default print columns.

Referenced by List::list().

◆ getLength()

virtual double Table::getLength ( )
pure virtual

Return the length of the table.

◆ getLine()

virtual const Beamline * Table::getLine ( ) const
pure virtual

Return embedded CLASSIC beamline.

◆ getRow()

virtual std::vector< double > Table::getRow ( const PlaceRep ,
const std::vector< std::string > &   
)
pure virtual

Return a table row.

Referenced by Expressions::ARow::evaluate().

◆ invalidate()

void Table::invalidate ( )
virtual

Mark this table as invalid, if it is dynamic.

Definition at line 65 of file Table.cpp.

References dynamic, and refill.

◆ isDependent()

virtual bool Table::isDependent ( const std::string &  name) const
pure virtual

Find out if table depends on the object identified by [b]name[/b].

Referenced by OpalData::define().

◆ makeColumnExpression()

virtual Expressions::PtrToScalar< double > Table::makeColumnExpression ( const std::string &  ) const
pure virtual

◆ matches()

virtual bool Table::matches ( Table rhs) const
pure virtual

Check that [b]rhs[/b] is of same type as [b]this[/b].

◆ operator=()

void Table::operator= ( const Table )
private

◆ printTable()

virtual void Table::printTable ( std::ostream &  ,
const CellArray  
) const
pure virtual

Print list for the table.

Referenced by List::list().

◆ shouldTrace()

bool Table::shouldTrace ( ) const
virtual

Trace flag.

Implements Object.

Definition at line 55 of file Table.cpp.

◆ shouldUpdate()

bool Table::shouldUpdate ( ) const
virtual

Update flag.

Implements Object.

Definition at line 60 of file Table.cpp.

Member Data Documentation

◆ dynamic

bool Table::dynamic
protected

Flag dynamic table.

Definition at line 153 of file Table.h.

Referenced by invalidate().

◆ refill

bool Table::refill
protected

Refill flag.

Definition at line 158 of file Table.h.

Referenced by invalidate().


The documentation for this class was generated from the following files: