makefile::Rule Class Reference

Represents a makefile rule, including Prerequisite and Command. More...

#include <Rule.h>

Inheritance diagram for makefile::Rule:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Rule ()
virtual ~Rule ()
virtual string toString ()
void addTarget (const string &t)
 Adds a target string.
void addTarget (Variable &t)
 Adds a Variable as a Target.
void addTarget (Variable *t)
void addPrereq (string p)
 Adds a string as a prerequisite.
void addPrereq (Variable &p)
 Adds a Variable as a prerequisite.
void addPrereq (Variable *p)
void addPrereq (Rule &r)
 Adds an other rule as a prerequisite for this rule.
void addPrereq (Rule *r)
void addCommand (string c, bool doEcho=true, bool ignoreErrors=false)
 Adds a string as a command to the Rule.

Private Attributes

std::vector< stringtargets
std::vector< stringprerequisites
std::vector< stringcommands

Detailed Description

Represents a makefile rule, including Prerequisite and Command.
Examples:

example.cpp.

Definition at line 41 of file Rule.h.


Constructor & Destructor Documentation

makefile::Rule::Rule (  )  [inline]

Definition at line 48 of file Rule.h.

virtual makefile::Rule::~Rule (  )  [inline, virtual]

Definition at line 50 of file Rule.h.


Member Function Documentation

void makefile::Rule::addCommand ( string  c,
bool  doEcho = true,
bool  ignoreErrors = false 
) [inline]

Adds a string as a command to the Rule.

Parameters:
c 
Examples:
example.cpp.

Definition at line 111 of file Rule.h.

Referenced by HuginBase::PanoramaMakefilelibExport::createcheckProgCmd(), createfiles_make(), HuginBase::PanoramaMakefilelibExport::createItems(), HuginBase::AssistantMakefilelibExport::createItems(), HuginBase::PanoramaMakefilelibExport::echoInfo(), HuginBase::AssistantMakefilelibExport::echoInfo(), main(), HuginBase::PanoramaMakefilelibExport::printSystemInfo(), makefile::tester::TestConditional::TestConditional(), makefile::tester::TestRule::TestRule(), makefile::tester::TestVariable::TestVariable(), trycond(), and tryrule().

void makefile::Rule::addPrereq ( Rule r  )  [inline]

Definition at line 103 of file Rule.h.

void makefile::Rule::addPrereq ( Rule r  )  [inline]

Adds an other rule as a prerequisite for this rule.

Definition at line 96 of file Rule.h.

References targets.

void makefile::Rule::addPrereq ( Variable p  )  [inline]

Definition at line 91 of file Rule.h.

References makefile::Variable::getRef(), and makefile::VariableRef::toString().

void makefile::Rule::addPrereq ( Variable p  )  [inline]

Adds a Variable as a prerequisite.

A VariableRef is taken from the Variable and added.

Parameters:
p 

Definition at line 87 of file Rule.h.

References makefile::Variable::getRef(), and makefile::VariableRef::toString().

void makefile::Rule::addPrereq ( string  p  )  [inline]

Adds a string as a prerequisite.

Parameters:
p 
Examples:
example.cpp.

Definition at line 79 of file Rule.h.

Referenced by HuginBase::PanoramaMakefilelibExport::createItems(), HuginBase::AssistantMakefilelibExport::createItems(), main(), makefile::tester::TestRule::TestRule(), trycond(), and tryrule().

void makefile::Rule::addTarget ( Variable t  )  [inline]

Definition at line 71 of file Rule.h.

References makefile::Variable::getRef(), and makefile::VariableRef::toString().

void makefile::Rule::addTarget ( Variable t  )  [inline]

Adds a Variable as a Target.

A VariableRef is taken from the Variable and added.

Parameters:
t 

Definition at line 67 of file Rule.h.

References makefile::Variable::getRef(), and makefile::VariableRef::toString().

void makefile::Rule::addTarget ( const string t  )  [inline]

Adds a target string.

Parameters:
t 
Examples:
example.cpp.

Definition at line 59 of file Rule.h.

Referenced by createfiles_make(), HuginBase::PanoramaMakefilelibExport::createItems(), HuginBase::AssistantMakefilelibExport::createItems(), main(), makefile::tester::TestConditional::TestConditional(), makefile::tester::TestRule::TestRule(), makefile::tester::TestVariable::TestVariable(), trycond(), and tryrule().

string makefile::Rule::toString (  )  [virtual]

Returns:
A string representation of the MakefileItem.

Implements makefile::MakefileItem.

Definition at line 29 of file Rule.cpp.

References commands, cstr, prerequisites, and targets.

Referenced by tryrule().


Member Data Documentation

std::vector<string> makefile::Rule::commands [private]

Definition at line 45 of file Rule.h.

Referenced by toString().

std::vector<string> makefile::Rule::prerequisites [private]

Definition at line 44 of file Rule.h.

Referenced by toString().

std::vector<string> makefile::Rule::targets [private]

Definition at line 43 of file Rule.h.

Referenced by addPrereq(), and toString().


The documentation for this class was generated from the following files:
Generated on 31 Oct 2014 for Hugintrunk by  doxygen 1.4.7