Ninja
Public Member Functions | Static Public Member Functions | Private Types | Private Attributes | Friends | List of all members
Rule Struct Reference

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

#include <eval_env.h>

Public Member Functions

void AddBinding (const string &key, const EvalString &val)
 
const EvalStringGetBinding (const string &key) const
 
const string & name () const
 
 Rule (const string &name)
 

Static Public Member Functions

static bool IsReservedBinding (const string &var)
 

Private Types

typedef map< string, EvalStringBindings
 

Private Attributes

Bindings bindings_
 
string name_
 

Friends

struct ManifestParser
 

Detailed Description

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

Definition at line 55 of file eval_env.h.

Member Typedef Documentation

◆ Bindings

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

Definition at line 71 of file eval_env.h.

Constructor & Destructor Documentation

◆ Rule()

Rule::Rule ( const string &  name)
inlineexplicit

Definition at line 56 of file eval_env.h.

Member Function Documentation

◆ AddBinding()

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

Definition at line 53 of file eval_env.cc.

References bindings_.

Referenced by ManifestParser::ParseRule().

◆ GetBinding()

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

Definition at line 57 of file eval_env.cc.

References bindings_.

Referenced by EdgeEnv::LookupVariable().

◆ IsReservedBinding()

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

Definition at line 65 of file eval_env.cc.

Referenced by ManifestParser::ParseRule().

◆ name()

const string& Rule::name ( ) const
inline

Friends And Related Function Documentation

◆ ManifestParser

friend struct ManifestParser
friend

Definition at line 68 of file eval_env.h.

Member Data Documentation

◆ bindings_

Bindings Rule::bindings_
private

Definition at line 72 of file eval_env.h.

Referenced by AddBinding(), GetBinding(), ManifestParser::ParseRule(), and TEST_F().

◆ name_

string Rule::name_
private

Definition at line 70 of file eval_env.h.


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