44 #ifndef OPAL_Expressions_HH
45 #define OPAL_Expressions_HH 1
95 virtual void print(std::ostream &,
int precedence = 99)
const = 0;
109 public OwnPtr<Scalar<T> > {
127 template <
class T>
class ArrayOfPtrs:
public std::vector<PtrToScalar<T> > {
166 virtual void print(std::ostream &,
int precedence = 99)
const = 0;
180 public OwnPtr<OArray<T> > {
266 template <
class T>
inline
271 template <
class T>
inline
276 template <
class T>
inline
281 template <
class T>
inline
290 template <
class T>
inline
295 template <
class T>
inline
300 template <
class T>
inline
305 template <
class T>
inline
315 template <
class T>
inline
321 template <
class T>
inline
327 template <
class T>
inline
333 template <
class T>
inline
341 template <
class T>
inline
347 template <
class T>
inline
353 template <
class T>
inline
359 template <
class T>
inline
368 template <
class T>
inline
374 template <
class T>
inline
380 template <
class T>
inline
386 template <
class T>
inline
Representation objects and parsers for attribute expressions.
std::string parseStringValue(Statement &, const char msg[])
PtrToScalar< bool > parseBool(Statement &)
Parse boolean expression.
PtrToScalar< double > parseReal(Statement &)
Parse real expression.
PtrToArray< double > parseRealConstArray(Statement &)
Parse real array constant.
std::vector< std::string > parseStringArray(Statement &)
Parse string array.
RangeRep parseRange(Statement &)
Parse range specification.
PlaceRep parsePlace(Statement &)
Parse place specification.
SRefAttr< double > * parseReference(Statement &)
Parse variable reference.
std::vector< std::list< Token > > parseTokenListArray(Statement &)
Parse a token list array (for LIST commands).
PtrToArray< double > parseRealArray(Statement &)
Parse real array expression.
PtrToScalar< double > parseTableExpression(Statement &, const Table *)
Parse table expression (depends on a table's rows).
std::list< Token > parseTokenList(Statement &)
Parse a token list (for macro argument and the like).
TableRowRep parseTableRow(Statement &)
Parse a token list (for macro argument and the like).
std::string parseString(Statement &, const char msg[])
Parse string value.
void parseDelimiter(Statement &stat, char delim)
Test for one-character delimiter.
double parseRealConst(Statement &)
Parse real constant.
PtrToArray< bool > parseBoolArray(Statement &)
Parse boolean array expression.
void operator=(const Scalar &)
virtual T evaluate() const =0
Evaluate.
virtual Scalar< T > * clone() const =0
Copy scalar expression.
virtual bool isConstant() const
Test for constant.
virtual void print(std::ostream &, int precedence=99) const =0
Print expression.
A pointer to a scalar expression.
PtrToScalar & operator=(const PtrToScalar &)=default
PtrToScalar(Scalar< T > *rhs)
Constructor from an object just created.
PtrToScalar(const PtrToScalar &rhs)
An array of pointers to scalar expressions.
virtual bool isConstant() const
Test for constant.
virtual std::vector< T > evaluate() const =0
Evaluate.
virtual void print(std::ostream &, int precedence=99) const =0
Print expression.
virtual OArray< T > * clone() const =0
Copy expression.
void operator=(const OArray &)
A pointer to an array expression.
PtrToArray(OArray< T > *rhs)
Constructor from object just created.
PtrToArray & operator=(const PtrToArray< T > &)=default
PtrToArray(const PtrToArray &rhs)
An attribute defined as a reference to a scalar.
Representation of a place within a beam line or sequence.
Representation of a range within a beam line or sequence.
The base class for all OPAL tables.
Representation of a table row reference.
A pointer which owns the object pointed at.
Interface for statements.