Recovered from cvs revision 2007-07-18 11:12:00
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: Awk.hpp,v 1.3 2007/07/16 11:12:12 bacon Exp $
|
||||
* $Id: Awk.hpp,v 1.4 2007/07/17 09:46:19 bacon Exp $
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
@@ -38,7 +38,19 @@ namespace ASE
|
||||
|
||||
ref class Extio
|
||||
{
|
||||
public:
|
||||
Extio (): handle (nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
property Object^ Handle
|
||||
{
|
||||
Object^ get () { return this->handle; }
|
||||
void set (Object^ handle) { this->handle = handle; }
|
||||
}
|
||||
|
||||
private:
|
||||
Object^ handle;
|
||||
};
|
||||
|
||||
ref class Pipe: public Extio
|
||||
@@ -102,7 +114,7 @@ namespace ASE
|
||||
Awk ();
|
||||
virtual ~Awk ();
|
||||
|
||||
bool Open ();
|
||||
//bool Open ();
|
||||
void Close ();
|
||||
|
||||
bool Parse ();
|
||||
@@ -113,7 +125,6 @@ namespace ASE
|
||||
bool AddFunction (System::String^ name, int minArgs, int maxArgs, FunctionHandler^ handler);
|
||||
bool DeleteFunction (System::String^ name);
|
||||
|
||||
|
||||
property System::IO::Stream^ SourceInputStream
|
||||
{
|
||||
System::IO::Stream^ get ()
|
||||
@@ -139,6 +150,30 @@ namespace ASE
|
||||
this->sourceOutputStream = stream;
|
||||
}
|
||||
}
|
||||
|
||||
delegate int OpenPipe (Pipe^ pipe);
|
||||
delegate int ClosePipe (Pipe^ pipe);
|
||||
delegate int ReadPipe (Pipe^ pipe);
|
||||
delegate int WritePipe (Pipe^ pipe);
|
||||
delegate int FlushPipe (Pipe^ pipe);
|
||||
|
||||
delegate int OpenFile (File^ file);
|
||||
delegate int CloseFile (File^ file);
|
||||
delegate int ReadFile (File^ file);
|
||||
delegate int WriteFile (File^ file);
|
||||
delegate int FlushFile (File^ file);
|
||||
|
||||
event OpenPipe^ OpenPipeHandler;
|
||||
event ClosePipe^ ClosePipeHandler;
|
||||
event ReadPipe^ ReadPipeHandler;
|
||||
event WritePipe^ WritePipeHandler;
|
||||
event FlushPipe^ FlushPipeHandler;
|
||||
|
||||
event OpenFile^ OpenFileHandler;
|
||||
event CloseFile^ CloseFileHandler;
|
||||
event ReadFile^ ReadFileHandler;
|
||||
event WriteFile^ WriteFileHandler;
|
||||
event FlushFile^ FlushFileHandler;
|
||||
|
||||
protected:
|
||||
ASE::Awk* awk;
|
||||
@@ -147,7 +182,19 @@ namespace ASE
|
||||
System::IO::Stream^ sourceOutputStream;
|
||||
|
||||
public protected:
|
||||
int Awk::DispatchFunction (System::String^ name);
|
||||
int DispatchFunction (System::String^ name);
|
||||
|
||||
int FireOpenFile (File^ file);
|
||||
int FireCloseFile (File^ file);
|
||||
int FireReadFile (File^ file);
|
||||
int FireWriteFile (File^ file);
|
||||
int FireFlushFile (File^ file);
|
||||
|
||||
int FireOpenPipe (Pipe^ pipe);
|
||||
int FireClosePipe (Pipe^ pipe);
|
||||
int FireReadPipe (Pipe^ pipe);
|
||||
int FireWritePipe (Pipe^ pipe);
|
||||
int FireFlushPipe (Pipe^ pipe);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user