Ninja
Rule Struct Reference

An invocable build command and associated metadata (description, etc.). More...

#include <eval_env.h>

Public Member Functions

void AddBinding (const std::string &key, const EvalString &val)
 
const EvalStringGetBinding (const std::string &key) const
 
bool IsPhony () const
 
const std::string & name () const
 
 Rule (const std::string &name)
 

Static Public Member Functions

static bool IsReservedBinding (const std::string &var)
 
static std::unique_ptr< RulePhony ()
 

Private Types

typedef std::map< std::string, EvalStringBindings
 

Private Attributes

Bindings bindings_
 
std::string name_
 
bool phony_ = false
 

Friends

struct ManifestParser
 

Detailed Description

An invocable build command and associated metadata (description, etc.).

Definition at line 66 of file eval_env.h.

Member Typedef Documentation

◆ Bindings

typedef std::map<std::string, EvalString> Rule::Bindings
private

Definition at line 86 of file eval_env.h.

Constructor & Destructor Documentation

◆ Rule()

Rule::Rule ( const std::string & name)
inlineexplicit

Definition at line 67 of file eval_env.h.

References name(), and name_.

Referenced by Phony().

Member Function Documentation

◆ AddBinding()

void Rule::AddBinding ( const std::string & key,
const EvalString & val )

Definition at line 55 of file eval_env.cc.

References bindings_.

◆ GetBinding()

const EvalString * Rule::GetBinding ( const std::string & key) const

Definition at line 59 of file eval_env.cc.

References bindings_.

◆ IsPhony()

bool Rule::IsPhony ( ) const

Definition at line 72 of file eval_env.cc.

References phony_.

◆ IsReservedBinding()

bool Rule::IsReservedBinding ( const std::string & var)
static

Definition at line 77 of file eval_env.cc.

Referenced by ManifestParser::ParseRule().

◆ name()

const std::string & Rule::name ( ) const
inline

◆ Phony()

std::unique_ptr< Rule > Rule::Phony ( )
static

Definition at line 66 of file eval_env.cc.

References Rule().

Referenced by State::State().

Friends And Related Symbol Documentation

◆ ManifestParser

friend struct ManifestParser
friend

Definition at line 83 of file eval_env.h.

References ManifestParser.

Referenced by ManifestParser.

Member Data Documentation

◆ bindings_

Bindings Rule::bindings_
private

Definition at line 87 of file eval_env.h.

Referenced by AddBinding(), and GetBinding().

◆ name_

std::string Rule::name_
private

Definition at line 85 of file eval_env.h.

Referenced by name(), and Rule().

◆ phony_

bool Rule::phony_ = false
private

Definition at line 88 of file eval_env.h.

Referenced by IsPhony().


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