2007-07-16 20:16:00 +00:00
|
|
|
/*
|
2007-09-03 14:20:00 +00:00
|
|
|
* $Id: StdAwk.hpp,v 1.7 2007/09/01 15:43:16 bacon Exp $
|
2007-07-16 20:16:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <ase/net/Awk.hpp>
|
|
|
|
|
|
|
|
namespace ASE
|
|
|
|
{
|
|
|
|
namespace Net
|
|
|
|
{
|
2007-07-17 20:20:00 +00:00
|
|
|
|
2007-07-25 18:53:00 +00:00
|
|
|
public ref class StdAwk abstract: public Awk
|
2007-07-16 20:16:00 +00:00
|
|
|
{
|
|
|
|
public:
|
2007-07-21 01:21:00 +00:00
|
|
|
StdAwk ();
|
|
|
|
~StdAwk ();
|
|
|
|
|
2007-08-21 23:24:00 +00:00
|
|
|
protected:
|
2007-09-03 14:20:00 +00:00
|
|
|
int random_seed;
|
2007-09-02 00:43:00 +00:00
|
|
|
System::Random^ random;
|
|
|
|
|
2007-08-21 23:24:00 +00:00
|
|
|
bool Sin (System::String^ name, array<Argument^>^ args, Return^ ret);
|
|
|
|
bool Cos (System::String^ name, array<Argument^>^ args, Return^ ret);
|
|
|
|
bool Tan (System::String^ name, array<Argument^>^ args, Return^ ret);
|
2007-09-02 00:43:00 +00:00
|
|
|
bool Atan (System::String^ name, array<Argument^>^ args, Return^ ret);
|
|
|
|
bool Atan2 (System::String^ name, array<Argument^>^ args, Return^ ret);
|
|
|
|
bool Log (System::String^ name, array<Argument^>^ args, Return^ ret);
|
|
|
|
bool Exp (System::String^ name, array<Argument^>^ args, Return^ ret);
|
|
|
|
bool Sqrt (System::String^ name, array<Argument^>^ args, Return^ ret);
|
|
|
|
bool Int (System::String^ name, array<Argument^>^ args, Return^ ret);
|
2007-09-03 14:20:00 +00:00
|
|
|
bool Rand (System::String^ name, array<Argument^>^ args, Return^ ret);
|
|
|
|
bool Srand (System::String^ name, array<Argument^>^ args, Return^ ret);
|
|
|
|
bool Systime (System::String^ name, array<Argument^>^ args, Return^ ret);
|
|
|
|
bool Strftime (System::String^ name, array<Argument^>^ args, Return^ ret);
|
|
|
|
bool Strfgmtime (System::String^ name, array<Argument^>^ args, Return^ ret);
|
2007-08-21 23:24:00 +00:00
|
|
|
|
2007-07-25 18:53:00 +00:00
|
|
|
public protected:
|
|
|
|
// File
|
|
|
|
virtual int OpenFile (File^ file) override;
|
|
|
|
virtual int CloseFile (File^ file) override;
|
|
|
|
virtual int ReadFile (
|
|
|
|
File^ file, cli::array<char_t>^ buf, int len) override;
|
|
|
|
virtual int WriteFile (
|
|
|
|
File^ file, cli::array<char_t>^ buf, int len) override;
|
|
|
|
virtual int FlushFile (File^ file) override;
|
2007-07-17 20:20:00 +00:00
|
|
|
|
2007-07-25 18:53:00 +00:00
|
|
|
// Pipe
|
|
|
|
virtual int OpenPipe (Pipe^ pipe) override;
|
|
|
|
virtual int ClosePipe (Pipe^ pipe) override;
|
|
|
|
virtual int ReadPipe (
|
|
|
|
Pipe^ pipe, cli::array<char_t>^ buf, int len) override;
|
|
|
|
virtual int WritePipe (
|
|
|
|
Pipe^ pipe, cli::array<char_t>^ buf, int len) override;
|
|
|
|
virtual int FlushPipe (Pipe^ pipe) override;
|
|
|
|
};
|
2007-07-16 20:16:00 +00:00
|
|
|
}
|
2007-07-21 01:21:00 +00:00
|
|
|
}
|