Recovered from cvs revision 2007-10-07 09:17:00
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: Awk.cpp,v 1.28 2007/10/04 04:48:27 bacon Exp $
|
||||
* $Id: Awk.cpp,v 1.29 2007/10/05 15:11:30 bacon Exp $
|
||||
*
|
||||
* {License}
|
||||
*/
|
||||
@ -175,11 +175,12 @@ namespace ASE
|
||||
void onRunStart (const Run& run)
|
||||
{
|
||||
wrapper->runErrorReported = false;
|
||||
wrapper->stopRequested = false;
|
||||
|
||||
if (wrapper->OnRunStart != nullptr)
|
||||
{
|
||||
wrapper->OnRunStart (wrapper);
|
||||
//wrapper->OnRunStart (wrapper);
|
||||
wrapper->OnRunStart (
|
||||
gcnew Context(wrapper, run));
|
||||
}
|
||||
}
|
||||
void onRunEnd (const Run& run)
|
||||
@ -195,14 +196,18 @@ namespace ASE
|
||||
|
||||
if (wrapper->OnRunEnd != nullptr)
|
||||
{
|
||||
wrapper->OnRunEnd (wrapper);
|
||||
//wrapper->OnRunEnd (wrapper);
|
||||
wrapper->OnRunEnd (
|
||||
gcnew Context(wrapper, run));
|
||||
}
|
||||
}
|
||||
void onRunReturn (const Run& run, const Argument& ret)
|
||||
{
|
||||
if (wrapper->OnRunReturn != nullptr)
|
||||
{
|
||||
wrapper->OnRunReturn (wrapper);
|
||||
//wrapper->OnRunReturn (wrapper);
|
||||
wrapper->OnRunReturn (
|
||||
gcnew Context(wrapper, run));
|
||||
}
|
||||
}
|
||||
|
||||
@ -212,7 +217,9 @@ namespace ASE
|
||||
|
||||
if (wrapper->OnRunStatement != nullptr)
|
||||
{
|
||||
wrapper->OnRunStatement (wrapper);
|
||||
//wrapper->OnRunStatement (wrapper);
|
||||
wrapper->OnRunStatement (
|
||||
gcnew Context(wrapper, run));
|
||||
}
|
||||
}
|
||||
|
||||
@ -738,12 +745,11 @@ namespace ASE
|
||||
return false;
|
||||
}
|
||||
|
||||
// callback needs to be enabled to support the Stop method
|
||||
//if (OnRunStart != nullptr || OnRunEnd != nullptr ||
|
||||
// OnRunReturn != nullptr || OnRunStatement != nullptr)
|
||||
//{
|
||||
if (OnRunStart != nullptr || OnRunEnd != nullptr ||
|
||||
OnRunReturn != nullptr || OnRunStatement != nullptr)
|
||||
{
|
||||
awk->enableRunCallback (this);
|
||||
//}
|
||||
}
|
||||
|
||||
if (args == nullptr || args->Length <= 0)
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: Awk.hpp,v 1.32 2007/10/04 14:26:21 bacon Exp $
|
||||
* $Id: Awk.hpp,v 1.33 2007/10/05 15:11:30 bacon Exp $
|
||||
*
|
||||
* {License}
|
||||
*/
|
||||
@ -263,12 +263,12 @@ namespace ASE
|
||||
public:
|
||||
property Awk^ Owner
|
||||
{
|
||||
Awk^ get () { return this->owner; }
|
||||
Awk^ get () { return this->owner; }
|
||||
}
|
||||
|
||||
bool Stop ()
|
||||
{
|
||||
return run.stop () == 0;
|
||||
return run.stop () == 0;
|
||||
}
|
||||
|
||||
/* TODO:
|
||||
@ -643,15 +643,10 @@ namespace ASE
|
||||
virtual bool Run ();
|
||||
virtual bool Run (System::String^ entryPoint, cli::array<System::String^>^ args);
|
||||
|
||||
/**
|
||||
* sets the request to stop the Run method
|
||||
*/
|
||||
virtual void Stop ();
|
||||
|
||||
delegate void RunStartHandler (Awk^ awk);
|
||||
delegate void RunEndHandler (Awk^ awk);
|
||||
delegate void RunReturnHandler (Awk^ awk);
|
||||
delegate void RunStatementHandler (Awk^ awk);
|
||||
delegate void RunStartHandler (Context^ ctx);
|
||||
delegate void RunEndHandler (Context^ ctx);
|
||||
delegate void RunReturnHandler (Context^ ctx);
|
||||
delegate void RunStatementHandler (Context^ ctx);
|
||||
|
||||
/*event*/ RunStartHandler^ OnRunStart;
|
||||
/*event*/ RunEndHandler^ OnRunEnd;
|
||||
@ -757,7 +752,6 @@ namespace ASE
|
||||
void setError (ERROR num);
|
||||
void retrieveError ();
|
||||
bool runErrorReported; // only used if the run-callback is activated.
|
||||
bool stopRequested;
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user