Logo Search packages:      
Sourcecode: nant version File versions  Download package

NAnt::VisualCpp::Tasks::MidlTask Class Reference

Inheritance diagram for NAnt::VisualCpp::Tasks::MidlTask:

NAnt::Core::Tasks::ExternalProgramBase NAnt::Core::Task NAnt::Core::Element

List of all members.


Detailed Description

This tasks allows you to run MIDL.exe.

This task only supports a small subset of the MIDL.EXE command line switches, but you can use the options element to specify any other unsupported commands you want to specify.

            <![CDATA[
        <midl
            env="win32"
            Oi="cf"
            tlb="${outputdir}\TempAtl.tlb"
            header="${outputdir}\TempAtl.h"
            iid="${outputdir}\TempAtl_i.c"
            proxy="${outputdir}\TempAtl_p.c"
            filename="TempAtl.idl"
        >
            <defines>
                <define name="_DEBUG"/>
                <define name="WIN32" value="1"/>
            </defines>
            <options>
                <option name="/mktyplib203"/>
                <option name="/error" value="allocation"/>
            </options>
        </midl>
            ]]>

Definition at line 68 of file MidlTask.cs.


Public Member Functions

void Execute ()
 Executes the task unless it is skipped.
void Initialize (XmlNode elementNode)
 Performs default initialization.
void InitializeTaskConfiguration ()
 Initializes the configuration of the task using configuration settings retrieved from the NAnt configuration file.
bool IsLogEnabledFor (Level messageLevel)
 Determines whether build output is enabled for the given Level.
override void Log (Level messageLevel, string message, params object[] args)
 Logs a formatted message with the given priority.
override void Log (Level messageLevel, string message)
 Logs a message with the given priority.

Static Public Member Functions

static Element InitializeBuildElement (Element parent, XmlNode childNode, Element buildElement, Type elementType)

Public Attributes

const int UnknownExitCode = -1000
 Defines the exit code that will be returned by ExitCode if the process could not be started, or did not exit (in time).

Protected Member Functions

void CopyTo (Element clone)
 Copies all instance data of the Element to a given Element.
override void ExecuteTask ()
 This is where the work is done.
XmlNode GetAttributeConfigurationNode (FrameworkInfo framework, string attributeName)
 Locates the XML node for the specified attribute in the project configuration node.
override void InitializeElement (XmlNode elementNode)
 <note>Deprecated (to be deleted).</note>
virtual void InitializeTask (XmlNode taskNode)
 Initializes the task.
virtual void InitializeXml (XmlNode elementNode, PropertyDictionary properties, FrameworkInfo framework)
 Initializes all build attributes and child elements.
virtual void PrepareProcess (Process process)
 Updates the ProcessStartInfo of the specified Process.
virtual Process StartProcess ()
 Starts the process and handles errors.

Properties

string Acf [get, set]
 The /acf switch allows the user to supply an explicit ACF file name. The switch also allows the use of different interface names in the IDL and ACF files.
string Align [get, set]
 The /align switch is functionally the same as the MIDL /Zp option and is recognized by the MIDL compiler solely for backward compatibility with MkTypLib.
bool AppConfig [get, set]
 The /app_config switch selects application-configuration mode, which allows you to use some ACF keywords in the IDL file. With this MIDL compiler switch, you can omit the ACF and specify an interface in a single IDL file.
virtual ArgumentCollection Arguments [get]
 The command-line arguments for the external program.
virtual DirectoryInfo BaseDirectory [get, set]
 Gets the working directory for the application.
string Char [get, set]
 The /char switch helps to ensure that the MIDL compiler and C compiler operate together correctly for all char and small types.
string Client [get, set]
 The /client switch directs the MIDL compiler to generate client-side C source files for an RPC interface.
string CommandLine [get]
 Gets the command-line arguments, separated by spaces.
string CStub [get, set]
 The /cstub switch specifies the name of the client stub file for an RPC interface.
virtual bool CustomXmlProcessing [get]
 Gets a value indicating whether the element is performing additional processing using the XmlNode that was used to initialize the element.
OptionCollection Defines [get]
 Macro definitions to pass to mdil.exe. Each entry will generate a /D.
FileInfo DllData [get, set]
 Specifies the file name for the generated dlldata file for a proxy DLL. The default file name Dlldata.c is used if DllData is not specified.
string Env [get, set]
 The /env switch selects the environment in which the application runs.
virtual TextWriter ErrorWriter [get, set]
 Gets or sets the TextWriter to which error output of the external program will be written.
virtual string ExeName [get, set]
 The name of the executable that should be used to launch the external program.
int ExitCode [get]
 Gets the value that the process specified when it terminated.
bool FailOnError [get, set]
 Determines if task failure stops the build, or is just reported. The default is .
FileInfo Filename [get, set]
 Name of .IDL file to process.
FileInfo Header [get, set]
 Specifies the name of the header file.
bool IfDefined [get, set]
 If then the task will be executed; otherwise, skipped. The default is .
FileInfo Iid [get, set]
 Specifies the name of the interface identifier file for a COM interface, overriding the default name obtained by adding _i.c to the IDL file name.
FileSet IncludeDirs [get, set]
 The list of directories in which to search for include files.
virtual Location Location [get, set]
 Gets or sets the location in the build file where the element is defined.
string LogPrefix [get]
 The prefix used when sending messages to the log.
override string Name [get]
 The name of the task.
XmlNamespaceManager NamespaceManager [get, set]
 Gets or sets the XmlNamespaceManager.
string Oi [get, set]
 The /Oi switch directs the MIDL compiler to use a fully-interpreted marshaling method. The /Oic and /Oicf switches provide additional performance enhancements.
OptionCollection Options [get]
 Additional options to pass to midl.exe.
virtual FileInfo Output [get, set]
 Gets the file to which the standard output should be redirected.
virtual bool OutputAppend [get, set]
 Gets a value indicating whether output will be appended to the Output.
virtual TextWriter OutputWriter [get, set]
 Gets or sets the TextWriter to which standard output messages of the external program will be written.
object Parent [get, set]
 Gets or sets the parent of the element.
override string ProgramArguments [get]
 Gets the command-line arguments for the external program.
override string ProgramFileName [get]
 Filename of program to execute.
virtual Project Project [get, set]
 Gets or sets the Project to which this element belongs.
virtual PropertyDictionary Properties [get]
 Gets the properties local to this Element and the Project.
FileInfo Proxy [get, set]
 Specifies the name of the interface proxy file for a COM interface.
Level Threshold [get, set]
 Gets or sets the log threshold for this Task. By default the threshold of a task matches the threshold of the project.
int TimeOut [get, set]
 The maximum amount of time the application is allowed to execute, expressed in milliseconds. Defaults to no time-out.
FileInfo Tlb [get, set]
 Specifies a file name for the type library generated by the MIDL compiler.
OptionCollection Undefines [get]
 Macro undefines (/U) to pass to mdil.
bool UnlessDefined [get, set]
 Opposite of IfDefined. If then the task will be executed; otherwise, skipped. The default is .
virtual bool UseRuntimeEngine [get, set]
 Specifies whether the external program should be executed using a runtime engine, if configured. The default is .
bool Verbose [get, set]
 Determines whether the task should report detailed build log messages. The default is .
virtual XmlNode XmlNode [get, set]
 Gets or sets the XML node of the element.

Private Member Functions

bool NeedsCompiling (FileInfo outputFile)
 Check output files to see if we need rebuilding.
bool NeedsCompiling ()
 Check output files to see if we need rebuilding.
void WriteResponseFile (TextWriter writer)
 Writes the response file for midl.exe.

Private Attributes

string _acf
string _align
bool _appConfig
string _char
string _client
string _cstub
OptionCollection _defines = new OptionCollection()
FileInfo _dlldata
string _env = "win32"
FileInfo _filename
FileInfo _header
FileInfo _iid
FileSet _includeDirs = new FileSet()
string _Oi
OptionCollection _options = new OptionCollection()
FileInfo _proxy
string _responseFileName
FileInfo _tlb
OptionCollection _undefines = new OptionCollection()
const string PROG_FILE_NAME = "midl.exe"

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

Generated by  Doxygen 1.6.0   Back to index