⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 context.h

📁 a basic interpreter free basic
💻 H
字号:
#pragma once

class CContext
{
private:
	// Symbol table pointer
	CSymbolTable *m_SymbolTable;
	// Function table pointer
	CFunctionTable *m_FunctionTable;
	// Data stack
	queue<float> *m_DataQueue;
	// Return stack
	stack<int> *m_ReturnStack;
	// List of variables currently in a FOR loop
	stack<forloop_t *> *m_ForList;
	// Code list for the current runtime
	CCode *m_Code;

	// Are we running?
	bool m_Running;

	// Are we branching?
	bool m_Branching;

public:
	CContext(void);
	~CContext(void);

	// Set the symbol table for this current run
	void SetSymbolTable(CSymbolTable * SymbolTable);
	// Get the current symbol table
	CSymbolTable * GetSymbolTable(void);
	// Set the function table for this current run
	void SetFunctionTable(CFunctionTable * FunctionTable);
	// Get the function table
	CFunctionTable * GetFunctionTable(void);
	// Set the data queue for this current run
	void SetDataQueue(queue<float> * DataQueue);
	// Get the current data queue
	queue<float> * GetDataQueue(void);
	// Set the return stack for this run
	void SetReturnStack(stack<int> * ReturnStack);
	// Get the current return stack
	stack<int> * GetReturnStack(void);
	// Set the list of variables in FOR loops
	void SetForList(stack<forloop_t *> * ForList);
	// Get the current for list
	stack<forloop_t *> * GetForList(void);
	// Set the code list
	void SetCode(CCode *Code);
	// Get the code list
	CCode *GetCode();

	// Set the running state
	void SetRunning(bool Value);
	// Get the running state
	bool GetRunning();

	// Are we branching?
	void SetBranching(bool Value);
	// Are we branching?
	bool GetBranching(void);
};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -