Ninja
EdgeEnv Struct Referenceabstract

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

Inheritance diagram for EdgeEnv:

Public Types

enum  EscapeKind { kShellEscape , kDoNotEscape }
 

Public Member Functions

 EdgeEnv (const Edge *const edge, const EscapeKind escape)
 
virtual string LookupVariable (const string &var)
 
virtual std::string LookupVariable (const std::string &var)=0
 
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.
 

Private Attributes

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

Detailed Description

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

Definition at line 391 of file graph.cc.

Member Enumeration Documentation

◆ EscapeKind

Enumerator
kShellEscape 
kDoNotEscape 

Definition at line 392 of file graph.cc.

Constructor & Destructor Documentation

◆ EdgeEnv()

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

Definition at line 394 of file graph.cc.

References edge_, escape_in_out_, and recursive_.

Member Function Documentation

◆ LookupVariable() [1/2]

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

◆ LookupVariable() [2/2]

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

Implemented in BindingEnv.

Referenced by EvalString::Evaluate().

◆ 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 481 of file graph.cc.

References escape_in_out_, GetShellEscapedString(), GetWin32EscapedString(), and kShellEscape.

Referenced by LookupVariable().

Member Data Documentation

◆ edge_

const Edge* const EdgeEnv::edge_
private

Definition at line 404 of file graph.cc.

Referenced by EdgeEnv(), and LookupVariable().

◆ escape_in_out_

EscapeKind EdgeEnv::escape_in_out_
private

Definition at line 405 of file graph.cc.

Referenced by EdgeEnv(), and MakePathList().

◆ lookups_

std::vector<std::string> EdgeEnv::lookups_
private

Definition at line 403 of file graph.cc.

Referenced by LookupVariable().

◆ recursive_

bool EdgeEnv::recursive_
private

Definition at line 406 of file graph.cc.

Referenced by EdgeEnv(), and LookupVariable().


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