Fabrique

A build language for complex systems

 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
fabrique::dag::List Class Reference

The result of evaluating an expression. More...

#include <List.h>

Inheritance diagram for fabrique::dag::List:
fabrique::dag::Value fabrique::HasSource fabrique::Printable fabrique::Typed fabrique::Uncopyable

Public Types

typedef SharedPtrVec< Value >
::const_iterator 
iterator
 

Public Member Functions

 List (const SharedPtrVec< Value > &, const Type &, const SourceRange &)
 
virtual const SequenceTypetype () const override
 
iterator begin () const
 
iterator end () const
 
const SharedPtrVec< Value > & elements () const
 
size_t size () const
 
const Valueoperator[] (size_t) const
 
virtual ValuePtr Add (ValuePtr &) const override
 List addition is concatenation.
 
virtual ValuePtr PrefixWith (ValuePtr &) const override
 Apply the prefix operation: prefix this value with another value.
 
virtual ValuePtr ScalarAdd (ValuePtr &) const override
 Add another fabrique::dag::Value scalar-wise across this Value.
 
virtual const ListasList () const override
 A list representation of this value (or nullptr).
 
virtual bool canScalarAdd (const Value &) const override
 This Value can add a value to itself in a scalar fashion. More...
 
virtual void PrettyPrint (Bytestream &, size_t indent=0) const override
 Print a human-readable representation to an output stream and return that output stream.
 
void Accept (Visitor &v) const override
 
- Public Member Functions inherited from fabrique::dag::Value
virtual bool hasFields () const
 
virtual ValuePtr field (const std::string &) const
 
virtual ValuePtr Negate (const SourceRange &loc) const
 Unary 'not' operator.
 
virtual ValuePtr And (ValuePtr &) const
 Logical and. More...
 
virtual ValuePtr Or (ValuePtr &) const
 Logical or. More...
 
virtual ValuePtr Xor (ValuePtr &) const
 Logical xor. More...
 
virtual ValuePtr Equals (ValuePtr &) const
 Equivalence. More...
 
- Public Member Functions inherited from fabrique::HasSource
 HasSource (const SourceRange &src)
 
const SourceRangesource () const
 
- Public Member Functions inherited from fabrique::Printable
 Printable (const Printable &)
 
Printableoperator= (const Printable &)
 
virtual std::string str () const
 
- Public Member Functions inherited from fabrique::Typed
 Typed (const Type &t)
 

Static Public Member Functions

template<class T >
static Listof (const SharedPtrVec< T > &values, const SourceRange &src, TypeContext &ctx)
 
static Listof (const SharedPtrVec< Value > &, const SourceRange &, TypeContext &ctx)
 

Additional Inherited Members

- Protected Member Functions inherited from fabrique::dag::Value
 Value (const Type &, const SourceRange &)
 

Detailed Description

The result of evaluating an expression.

Definition at line 47 of file List.h.

Member Function Documentation

bool List::canScalarAdd ( const Value ) const
overridevirtual

This Value can add a value to itself in a scalar fashion.

For instance, [ 1 2 ] can add 3 to itself but not vice versa.

Reimplemented from fabrique::dag::Value.

Definition at line 141 of file List.cc.


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