Eleron  1.0
 All Classes Namespaces Files Functions Variables Enumerations Enumerator
DoxyRunner Class Reference

This class spawns and runs Doxygen in a separate thread, and could serve as an example of how to create plugins for unity that call a command line application and then get the data back into Unity safely. More...

Public Member Functions

 DoxyRunner (string exepath, string[] args, DoxyThreadSafeOutput safeoutput, Action< int > callback)
 
void updateOuputString (string output)
 
void RunThreadedDoxy ()
 

Static Public Member Functions

static int Run (Action< string > output, TextReader input, string exe, params string[] args)
 Runs the specified executable with the provided arguments and returns the process' exit code. More...
 
static string EscapeArguments (params string[] args)
 Quotes all arguments that contain whitespace, or begin with a quote and returns a single argument string for use with Process.Start(). More...
 
static string FindExePath (string exe)
 Expands environment variables and, if unqualified, locates the exe in the working directory or the evironment's path. More...
 

Public Attributes

Action< int > onCompleteCallBack
 
string EXE = null
 
string[] Args
 

Detailed Description

This class spawns and runs Doxygen in a separate thread, and could serve as an example of how to create plugins for unity that call a command line application and then get the data back into Unity safely.

Constructor & Destructor Documentation

DoxyRunner.DoxyRunner ( string  exepath,
string[]  args,
DoxyThreadSafeOutput  safeoutput,
Action< int >  callback 
)

Member Function Documentation

static string DoxyRunner.EscapeArguments ( params string[]  args)
static

Quotes all arguments that contain whitespace, or begin with a quote and returns a single argument string for use with Process.Start().

Parameters
argsA list of strings for arguments, may not contain null, '\0', '', or '
'
Returns
The combined list of escaped/quoted strings
Exceptions
System.ArgumentNullExceptionRaised when one of the arguments is null
System.ArgumentOutOfRangeExceptionRaised if an argument contains '\0', '', or '
'
static string DoxyRunner.FindExePath ( string  exe)
static

Expands environment variables and, if unqualified, locates the exe in the working directory or the evironment's path.

Parameters
exeThe name of the executable file
Returns
The fully-qualified path to the file
Exceptions
System.IO.FileNotFoundExceptionRaised when the exe was not found
static int DoxyRunner.Run ( Action< string >  output,
TextReader  input,
string  exe,
params string[]  args 
)
static

Runs the specified executable with the provided arguments and returns the process' exit code.

Parameters
outputRecieves the output of either std/err or std/out
inputProvides the line-by-line input that will be written to std/in, null for empty
exeThe executable to run, may be unqualified or contain environment variables
argsThe list of unescaped arguments to provide to the executable
Returns
Returns process' exit code after the program exits
Exceptions
System.IO.FileNotFoundExceptionRaised when the exe was not found
System.ArgumentNullExceptionRaised when one of the arguments is null
System.ArgumentOutOfRangeExceptionRaised if an argument contains '\0', '', or '
'
void DoxyRunner.RunThreadedDoxy ( )
void DoxyRunner.updateOuputString ( string  output)

Member Data Documentation

string [] DoxyRunner.Args
string DoxyRunner.EXE = null
Action<int> DoxyRunner.onCompleteCallBack

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