#pragma once
#include <windows.h>

const static int SIZE_BUF_1 = 1000;
const static int SIZE_BUF_4 = 30000;
const static int SIZE_BUF_4_2 = 10000;

class sCode
{
public:
	char *pCode;
	int vSize;
	int vStrLen1;
	int vStrLen2;
	bool vThen;
	bool vPoint;
	bool vLoop;
	bool vIf;
	bool vBrañket1;
	bool vBrañket2;
	int vCountB1;
	int vCountB2;
	int vIndex1_2;
	int vIndexComma1;
	int vIndexComma2;
	bool vFlagComma;
	bool vSquareBrañket1;
	bool vSquareBrañket2;
	int vCountSB1;
	int vCountSB2;
	int vIndex1_3;

	sCode()
	{
		pCode = NULL;
		vSize = 0;
		vStrLen1 = 0;
		vStrLen2 = 0;
		vThen = false;
		vPoint = false;
		vLoop = false;
		vIf = false;
		vBrañket1 = false;
		vBrañket2 = false;
		vCountB1 = 0;
		vCountB2 = 0;
		vIndex1_2 = -1;
		vIndexComma1 = -1;
		vIndexComma2 = -1;
		vFlagComma = false;
		vSquareBrañket1 = false;
		vSquareBrañket2 = false;
		vCountSB1 = 0;
		vCountSB2 = 0;
	}

	~sCode()
	{
		if (vSize > 0)
		{
			if (pCode) delete pCode;
		}
	}
};

class sOutputCode
{
private:
	int vvi;
	char *pStr;
	int vLenStr;
public:
	sCode **szBuffer4;
	int vCountBuffer4;

	bool fInputCode(sCode *vInputCode);
	bool fOutputCode(sCode *vOutputCode);
	bool fFreeMem();
	bool fFindStr(char *vStr);
	bool fInputStr(char *vStr);
	bool fFindCode(sCode *vCode);
	int fGetIntFind();
	sCode * fGetCodeToInt(int vInt);

	sOutputCode();
	sOutputCode(int vSizeMass);
	~sOutputCode();
};