Fabrique

A build language for complex systems

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

A object that builds DAG nodes in a DAGBuilder::Context. More...

#include <DAGBuilder.h>

Classes

class  Context
 An object that can supply a DAGBuilder with names and types. More...
 

Public Member Functions

 DAGBuilder (Context &)
 
UniqPtr< DAGdag (const std::vector< std::string > &topLevelTargets) const
 Construct a DAG from the current DAGBuilder state.
 
TypeContexttypeContext ()
 
void Define (std::string name, ValuePtr)
 Define a variable with a name and a value.
 
ValuePtr AddRegeneration (const Arguments &commandLineArguments, const std::vector< std::string > &inputFiles, const std::vector< std::string > &outputFiles)
 Add the build steps required to regenerate the DAG if Fabrique input files change.
 
ValuePtr Bool (bool, SourceRange)
 Create a dag::Boolean.
 
std::shared_ptr< class BuildBuild (std::shared_ptr< class Rule >, ValueMap, SourceRange)
 Construct a dag::Build from a dag::Rule and parameters.
 
ValuePtr File (std::string fullPath, const ValueMap &attributes, const FileType &, const SourceRange &src=SourceRange::None())
 Create a dag::File from a path.
 
ValuePtr File (std::string subdir, std::string filename, const ValueMap &attributes, const FileType &, const SourceRange &src=SourceRange::None())
 Create a dag::File from a subdirectory and a filename.
 
ValuePtr Function (const Function::Evaluator, ValueMap scope, const SharedPtrVec< Parameter > &, const FunctionType &, SourceRange=SourceRange::None())
 Define a dag::Function.
 
ValuePtr Integer (int, SourceRange)
 Create a dag::Integer.
 
ValuePtr Rule (std::string command, const ValueMap &arguments, const SharedPtrVec< Parameter > &parameters, const Type &, const SourceRange &from=SourceRange::None())
 Create a dag::Rule in the current scope.
 
ValuePtr String (const std::string &, SourceRange=SourceRange::None())
 Create a dag::String.
 
ValuePtr Struct (const std::vector< Structure::NamedValue > &, const Type &, SourceRange)
 Create a dag::Structure.
 
ValuePtr Target (const std::shared_ptr< class Build > &)
 Create a dag::Target using the current value name.
 
ValuePtr Target (const std::shared_ptr< class File > &)
 
ValuePtr Target (const std::shared_ptr< class List > &)
 

Protected Member Functions

ValuePtr Rule (std::string name, std::string command, const ValueMap &arguments, const SharedPtrVec< Parameter > &parameters, const Type &, const SourceRange &from=SourceRange::None())
 

Protected Attributes

Contextctx_
 
SharedPtrVec< class Filefiles_
 
SharedPtrVec< class Buildbuilds_
 
SharedPtrMap< class Rulerules_
 
SharedPtrMap< class Valuevariables_
 
SharedPtrMap< class Targettargets_
 

Detailed Description

A object that builds DAG nodes in a DAGBuilder::Context.

Definition at line 60 of file DAGBuilder.h.


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