An integer (of unspecified precision). More...
#include <Primitive.h>
Public Member Functions | |
Integer (int, const Type &, SourceRange src=SourceRange::None()) | |
std::string | str () const |
virtual ValuePtr | Add (ValuePtr &) const override |
Add this fabrique::dag::Value to a following Value. More... | |
virtual ValuePtr | Equals (ValuePtr &) const override |
Equivalence. More... | |
void | Accept (Visitor &v) const override |
Public Member Functions inherited from fabrique::dag::Primitive< int > | |
virtual int | value () const |
virtual void | PrettyPrint (Bytestream &b, size_t=0) const override |
Print a human-readable representation to an output stream and return that output stream. | |
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 | PrefixWith (ValuePtr &) const |
Apply the prefix operation: prefix this value with another value. | |
virtual ValuePtr | ScalarAdd (ValuePtr &) const |
Add another fabrique::dag::Value scalar-wise across this Value. | |
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 const List * | asList () const |
A list representation of this value (or nullptr). | |
virtual bool | canScalarAdd (const Value &) const |
This Value can add a value to itself in a scalar fashion. More... | |
Public Member Functions inherited from fabrique::HasSource | |
HasSource (const SourceRange &src) | |
const SourceRange & | source () const |
Public Member Functions inherited from fabrique::Printable | |
Printable (const Printable &) | |
Printable & | operator= (const Printable &) |
Public Member Functions inherited from fabrique::Typed | |
Typed (const Type &t) | |
virtual const Type & | type () const |
Additional Inherited Members | |
Protected Member Functions inherited from fabrique::dag::Primitive< int > | |
Primitive (const Type &t, const int &val, SourceRange src) | |
Protected Member Functions inherited from fabrique::dag::Value | |
Value (const Type &, const SourceRange &) | |
Protected Attributes inherited from fabrique::dag::Primitive< int > | |
const int | value_ |
An integer (of unspecified precision).
Definition at line 88 of file Primitive.h.
|
overridevirtual |
Add this fabrique::dag::Value to a following Value.
The implementation of addition is type-dependent: it might make sense to add, concatenate or apply a logical AND.
Reimplemented from fabrique::dag::Value.
Definition at line 123 of file Primitive.cc.
|
overridevirtual |
Equivalence.
Reimplemented from fabrique::dag::Value.
Definition at line 135 of file Primitive.cc.
References fabrique::TypeContext::booleanType().