An action that transforms files into other files. More...
#include <Rule.h>
Public Member Functions | |
ValuePtr | Call (const ValueMap &, DAGBuilder &, SourceRange) const override |
Call this function with (named) arguments. | |
const std::string & | name () const |
const std::string & | command () const |
bool | hasDescription () const |
const std::string & | description () const |
const ValueMap & | arguments () const |
Arguments define the action (e.g., command = 'cc'). | |
std::string | str () const |
void | setSelf (std::weak_ptr< Rule >) |
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::Callable | |
const SharedPtrVec< Parameter > & | parameters () const |
bool | hasParameterNamed (const std::string &) const |
void | CheckArguments (const ValueMap &args, const StringMap< SourceRange > &argLocations, const SourceRange &callLocation) const |
template<class T > | |
StringMap< const T * > | NameArguments (const UniqPtrVec< T > &v) const |
Name all of the arguments in v according to the rules for positional and keyword arguments. | |
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 | Add (ValuePtr &) const |
Add this fabrique::dag::Value to a following Value. More... | |
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 ValuePtr | Equals (ValuePtr &) const |
Equivalence. 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 |
Static Public Member Functions | |
static const std::string & | RegenerationRuleName () |
static Rule * | Create (std::string name, std::string command, const ValueMap &arguments, const SharedPtrVec< Parameter > ¶meters, const Type &, const SourceRange &from=SourceRange::None()) |
Additional Inherited Members | |
Protected Types inherited from fabrique::dag::Callable | |
typedef std::function < ValuePtr(const ValueMap &, DAGBuilder &, SourceRange)> | Evaluator |
Protected Member Functions inherited from fabrique::dag::Callable | |
Callable (const SharedPtrVec< Parameter > &, Evaluator) | |
Protected Member Functions inherited from fabrique::dag::Value | |
Value (const Type &, const SourceRange &) | |