Fabrique

A build language for complex systems

 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
fabrique::ast::Action Class Reference

A build action that can transform inputs into outputs. More...

#include <Action.h>

Inheritance diagram for fabrique::ast::Action:
fabrique::ast::Expression fabrique::ast::HasParameters fabrique::ast::Node fabrique::Typed fabrique::HasSource fabrique::Printable fabrique::Visitable< Visitor > fabrique::Uncopyable

Public Member Functions

const UniqPtrVec< Argument > & arguments () const
 
virtual void PrettyPrint (Bytestream &, size_t indent=0) const override
 Print a human-readable representation to an output stream and return that output stream.
 
virtual void Accept (Visitor &) const
 
virtual dag::ValuePtr evaluate (EvalContext &) const override
 
- 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::Visitable< Visitor >
virtual void Accept (Visitor &) const =0
 
- Public Member Functions inherited from fabrique::Typed
 Typed (const Type &t)
 
virtual const Typetype () const
 
- Public Member Functions inherited from fabrique::ast::HasParameters
 HasParameters (UniqPtrVec< Parameter > &)
 
const UniqPtrVec< Parameter > & parameters () const
 
const std::set< std::string > & parameterNames () const
 
void CheckArguments (const UniqPtrVec< Argument > &, const SourceRange &) const
 
ParamIterator begin () const
 
ParamIterator end () 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.
 

Static Public Member Functions

static ActionCreate (UniqPtrVec< Argument > &, UniqPtr< UniqPtrVec< Parameter >> &, const SourceRange &, TypeContext &)
 An action definition has both arguments and parameters. More...
 

Additional Inherited Members

- Public Types inherited from fabrique::ast::HasParameters
using ParamIterator = UniqPtrVec< Parameter >::const_iterator
 
- Protected Member Functions inherited from fabrique::ast::Expression
 Expression (const Type &t, const SourceRange &src)
 
- Protected Member Functions inherited from fabrique::ast::Node
 Node (const SourceRange &src)
 

Detailed Description

A build action that can transform inputs into outputs.

Definition at line 53 of file Action.h.

Member Function Documentation

Action * Action::Create ( UniqPtrVec< Argument > &  args,
UniqPtr< UniqPtrVec< Parameter >> &  params,
const SourceRange src,
TypeContext ctx 
)
static

An action definition has both arguments and parameters.

Arguments define the action itself and parameters declare what callers can pass in.

If no explicit 'in' or 'out' parameters are specified, an action assumes that the first two parameters are in:list[file] and out:list[file].

Definition at line 80 of file Action.cc.

References fabrique::TypeContext::fileListType(), fabrique::TypeContext::fileType(), and fabrique::TypeContext::functionType().


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