Ninja
Public Member Functions | Private Member Functions | Private Attributes | List of all members
DyndepLoader Struct Reference

DyndepLoader loads dynamically discovered dependencies, as referenced via the "dyndep" attribute in build files. More...

#include <dyndep.h>

Public Member Functions

 DyndepLoader (State *state, DiskInterface *disk_interface, Explanations *explanations=nullptr)
 
bool LoadDyndeps (Node *node, DyndepFile *ddf, std::string *err) const
 
bool LoadDyndeps (Node *node, std::string *err) const
 Load a dyndep file from the given node's path and update the build graph with the new information. More...
 

Private Member Functions

bool LoadDyndepFile (Node *file, DyndepFile *ddf, std::string *err) const
 
bool UpdateEdge (Edge *edge, Dyndeps const *dyndeps, std::string *err) const
 

Private Attributes

DiskInterfacedisk_interface_
 
OptionalExplanations explanations_
 
Statestate_
 

Detailed Description

DyndepLoader loads dynamically discovered dependencies, as referenced via the "dyndep" attribute in build files.

Definition at line 46 of file dyndep.h.

Constructor & Destructor Documentation

◆ DyndepLoader()

DyndepLoader::DyndepLoader ( State state,
DiskInterface disk_interface,
Explanations explanations = nullptr 
)
inline

Definition at line 47 of file dyndep.h.

Member Function Documentation

◆ LoadDyndepFile()

bool DyndepLoader::LoadDyndepFile ( Node file,
DyndepFile ddf,
std::string *  err 
) const
private

Definition at line 118 of file dyndep.cc.

References Parser::Load(), and Node::path().

◆ LoadDyndeps() [1/2]

bool DyndepLoader::LoadDyndeps ( Node node,
DyndepFile ddf,
std::string *  err 
) const

Definition at line 35 of file dyndep.cc.

References Node::out_edges(), Edge::outputs_, Node::path(), and Node::set_dyndep_pending().

◆ LoadDyndeps() [2/2]

bool DyndepLoader::LoadDyndeps ( Node node,
std::string *  err 
) const

Load a dyndep file from the given node's path and update the build graph with the new information.

One overload accepts a caller-owned 'DyndepFile' object in which to store the information loaded from the dyndep file.

Definition at line 30 of file dyndep.cc.

Referenced by Cleaner::LoadDyndeps().

◆ UpdateEdge()

bool DyndepLoader::UpdateEdge ( Edge edge,
Dyndeps const *  dyndeps,
std::string *  err 
) const
private

Member Data Documentation

◆ disk_interface_

DiskInterface* DyndepLoader::disk_interface_
private

Definition at line 65 of file dyndep.h.

◆ explanations_

OptionalExplanations DyndepLoader::explanations_
mutableprivate

Definition at line 66 of file dyndep.h.

◆ state_

State* DyndepLoader::state_
private

Definition at line 64 of file dyndep.h.


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