wx.Build.NamedAction Class Reference

Inheritance diagram for wx.Build.NamedAction:

Inheritance graph

List of all members.

Public Member Functions

void AppendBooCode (List< string > booCodeLines, string indention, BuildToolFamilyEnv env)
void CollectChoicePoints (IDictionary< string, ICollection< string >> collectionOfChoicePoints)
bool ContainsPrerequisite (IBuildProduct prereq)
bool Execute (BuildToolFamilyEnv env, DateTime validityOfBuildSystem)
ICollection
< IBuildProduct
GetPrerequisites ()
System.Diagnostics.ProcessStartInfo GetProgramStartInfo (BuildToolFamilyEnv env)
ICollection
< IBuildProduct
GetTargets ()
DateTime GetValidity ()
DateTime GetValidityDemand ()
 NamedAction (string name, IBuildAction action)
bool TargetsAreConsistent (DateTime validityOfBuildSystem)

Properties

IBuildAction Action [get]
IBuildActionProvider ActionProvider [get]
FeatureList Features [get]
string Name [get]
ICollection< Type > ParameterTypes [get]
ActionPriority Priority [get]
BuildProject Project [get, set]
IDictionary< string,
EnvironmentVarInfo
UsedVars [get]


Detailed Description

This class of actions simply associates an action with a name. This name will be printed in the log file on execution. This may be especially useful in conjunction with collections of build actions and BOO code creation: Collections provide BOO code enabling to define the actually chosen alternative action providing the name.

        CollectionOfBuildActions alternativeActions=new CollectionOfBuildActions();
        alternativeActions.Add(new NamedAction("option 1", ...));
        alternativeActions.Add(new NamedAction("option 2", ...));
        AlternativeBuildActions alternatives=new AlternativeBuildActions("choice", target, alternativeActions); 
This will result into the following BOO code when running alternatives.AppendBooCode(..):
        alternatives=new System.Collection.Generic.

Constructor & Destructor Documentation

wx.Build.NamedAction.NamedAction ( string  name,
IBuildAction  action 
)


Member Function Documentation

void wx.Build.NamedAction.AppendBooCode ( List< string >  booCodeLines,
string  indention,
BuildToolFamilyEnv  env 
)

This method will create BOO source code and append this code to the provided text writer.

Parameters:
env This is an environment that different tools of the same family may use to exchange information. This store is typically used to save information on configuration files or thinsgs of that kind that will be shared among all tools of the same family.
booCode The code that will actually build something. Each list entry will be a line of code in the resulting BOO program.
indention A string that shall preceed all created lines.
Refer to IBuildActionProvider.AppendToBooPreamble() for an example.
Exceptions:
NotSupportedException Will be thrown if this feature is not supported.

Implements wx.Build.IBuildAction.

void wx.Build.NamedAction.CollectChoicePoints ( IDictionary< string, ICollection< string >>  collectionOfChoicePoints  ) 

This method collects all choice points within this action. Choice points are represented by a name and a collection of alternatives.

Parameters:
collectionOfChoicePoints The collection that will be extended by the choice points of this action.
The current implementation provides a choice point for the compilation and linking of C/C++ programs, "CppDevelopmentSystem" of the alternatives "GCC" and "MS VC". Thus, actions on C/C++ compilation will add the following choice point:
            if (!collectionOfChoicePoints.ContainsKey("CppDevelopmentSystem"))
                collectionOfChoicePoints.Add("CppDevelopmentSystem", new List&lt;string&gt;());
            collectionOfChoicePoints["CppDevelopmentSystem"].Add("GCC");
            collectionOfChoicePoints["CppDevelopmentSystem"].Add("MS VC");

Implements wx.Build.IBuildAction.

bool wx.Build.NamedAction.ContainsPrerequisite ( IBuildProduct  prereq  ) 

True iff prereq is among the GetPrerequisites().

Implements wx.Build.IBuildAction.

bool wx.Build.NamedAction.Execute ( BuildToolFamilyEnv  env,
DateTime  validityOfBuildSystem 
)

Implements wx.Build.IBuildAction.

ICollection<IBuildProduct> wx.Build.NamedAction.GetPrerequisites (  ) 

This is a collection of preconditions that have to be achieved before running this project. Preconds will be used by internal references to determine applicability of a project and to determine, whether the project has to be rebuilt. Refer to Targets .

Implements wx.Build.IBuildAction.

System.Diagnostics.ProcessStartInfo wx.Build.NamedAction.GetProgramStartInfo ( BuildToolFamilyEnv  env  ) 

If this action starts an external program via System.Diagnostics.Process, this will be the start info of the program to start. The result is null if this does not start a program as process. However, even actions that use process info may return null . This information is not mandatory.

Implements wx.Build.IBuildAction.

ICollection<IBuildProduct> wx.Build.NamedAction.GetTargets (  ) 

This returns a collection of those objects that are known to be generated or updated after this has been achieved. This helps internal inferences. This may be null if this project is not about files and other reusable build targets.

The internal inference will refer to this propertiy in order to determine, which action to run for a specific target. So, only mention targets, that are actually achieved running this action. This collection will also be used to determine, whether this project has to be run again on rebuilding. If the Preconds have earlier validity than this, then the action will be omitted on rebuilding.

Implements wx.Build.IBuildAction.

DateTime wx.Build.NamedAction.GetValidity (  ) 

Returns validity timstamp of this object. Whenever this is equal or later than all prerequisites, this is considered consistent with the prerequisites on rebuilding.

Implements wx.Build.IBuildObject.

DateTime wx.Build.NamedAction.GetValidityDemand (  ) 

This is the counterpart of the Validity . If this occurs as a prerequisite, this shall be compared with the Validity of the target in order to assess whether rebuild is necessary or not.

Implements wx.Build.IBuildObject.

bool wx.Build.NamedAction.TargetsAreConsistent ( DateTime  validityOfBuildSystem  ) 

True, if this action is not required to run because all targets are up to date.

Parameters:
validityOfBuildSystem indicates the last change of either this DLL or the assembly defining the project. So, all action will be repeated (even if rebuild is specified) if the project definition changes or the implementation of the build system has been enhanced since the final build. This argument will be computed and propagated by the project.

Implements wx.Build.IBuildAction.


Property Documentation

IBuildAction wx.Build.NamedAction.Action [get]

This is the action that will actually be executed.

IBuildActionProvider wx.Build.NamedAction.ActionProvider [get]

This action is created directly using the CTor.

Implements wx.Build.IBuildAction.

FeatureList wx.Build.NamedAction.Features [get]

the features of the contained action are my features.

Implements wx.Build.IBuildAction.

string wx.Build.NamedAction.Name [get]

The name of the action.

Implements wx.Build.IBuildAction.

ICollection<Type> wx.Build.NamedAction.ParameterTypes [get]

Returns a collection (typically an array) of relevant parameter types in the BuildConfig. This may be empty or null if instances of this class do not refer to parameter types.

Implements wx.Build.IBuildAction.

ActionPriority wx.Build.NamedAction.Priority [get]

Priority of this action. May be everything but user-defined.

Implements wx.Build.IBuildAction.

BuildProject wx.Build.NamedAction.Project [get, set]

The getter returns the project of the encapsulated action. the setter is a NOP.

Implements wx.Build.IBuildAction.

IDictionary<string, EnvironmentVarInfo> wx.Build.NamedAction.UsedVars [get]

This returns null since useually shell variables are not used by actions.

Implements wx.Build.IBuildAction.


The wx.NET Build System.   (c) 2009-2010 Harald Meyer auf'm Hofe