Students_Graphs_I_29.03.2013 / std.easygen.h

ru en cn

с начала прошло: 4286 д. 10:53
страница обновлена: 22.12.2024 22:45

std.easygen.h: easygen.h

#pragma once

#include 
#include 
#include 
#include 
#include 
#include 
#include 

using namespace std;

extern "C" {
   #include "parser.h"
}

class genError
{
   string err1;
public:
   genError(const string& s): err1(s) {}
   string err() {return err1;}
   static void processParseError();
};

class prxRecord
{
   friend class testInfo;
   friend class prxObject;
   recWithData a;
   prxRecord() {a.recPart = 0; a.pointerToData = 0;}
   prxRecord(const recWithData& b) : a(b) {};
public:
   prxObject operator [] (const string& name);
   void print();
   void autoGen();
};
            
class prxObject
{
   friend class prxRecord;
   objWithData a;
   prxObject(const objWithData& b) : a(b) {};
public:
   prxRecord operator [] (int index);
   INT64 operator = (const INT64& value);
   int operator = (const int& value);
   string operator = (const string& value);
   real operator = (const real& value);
   operator INT64();
   operator int();
   operator real();
   operator string();
   void print();
   void autoGen();
};

class testInfo
{
   map params;
   prxRecord desc;
   char* buf;
public:
   testInfo(int argc, char* argv[]);
   ~testInfo();
   char* loadFormatFile(const string& fileName);
   void paramsToVars();
   INT64 getIntParam(const string& name);
   real getFloatParam(const string& name);
   prxObject operator [](const string& name);
   void print();
   void autoGen();
};
Дальневосточный федеральный университет