Ninja
Public Types | Public Member Functions | Private Attributes | List of all members
EdgeEnv Struct Referenceabstract

An Env for an Edge, providing $in and $out. More...

Inheritance diagram for EdgeEnv:
Inheritance graph
[legend]

Public Types

enum  EscapeKind { kShellEscape, kDoNotEscape }
 

Public Member Functions

 EdgeEnv (const Edge *const edge, const EscapeKind escape)
 
virtual std::string LookupVariable (const std::string &var)=0
 
virtual string LookupVariable (const string &var)
 
std::string MakePathList (const Node *const *span, size_t size, char sep) const
 Given a span of Nodes, construct a list of paths suitable for a command line. More...
 

Private Attributes

const Edge *const edge_
 
EscapeKind escape_in_out_
 
vector< string > lookups_
 
bool recursive_
 

Detailed Description

An Env for an Edge, providing $in and $out.

Definition at line 326 of file graph.cc.

Member Enumeration Documentation

◆ EscapeKind

Enumerator
kShellEscape 
kDoNotEscape 

Definition at line 327 of file graph.cc.

Constructor & Destructor Documentation

◆ EdgeEnv()

EdgeEnv::EdgeEnv ( const Edge *const  edge,
const EscapeKind  escape 
)
inline

Definition at line 329 of file graph.cc.

Member Function Documentation

◆ LookupVariable() [1/2]

virtual std::string Env::LookupVariable ( const std::string &  var)
pure virtualinherited

Implemented in BindingEnv.

Referenced by EvalString::Evaluate().

◆ LookupVariable() [2/2]

string EdgeEnv::LookupVariable ( const string &  var)
virtual

◆ MakePathList()

std::string EdgeEnv::MakePathList ( const Node *const *  span,
size_t  size,
char  sep 
) const

Given a span of Nodes, construct a list of paths suitable for a command line.

Definition at line 381 of file graph.cc.

References GetShellEscapedString(), and GetWin32EscapedString().

Member Data Documentation

◆ edge_

const Edge* const EdgeEnv::edge_
private

Definition at line 339 of file graph.cc.

◆ escape_in_out_

EscapeKind EdgeEnv::escape_in_out_
private

Definition at line 340 of file graph.cc.

◆ lookups_

vector<string> EdgeEnv::lookups_
private

Definition at line 338 of file graph.cc.

◆ recursive_

bool EdgeEnv::recursive_
private

Definition at line 341 of file graph.cc.


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