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

📄 variable.h

📁 Decompilation Dos Program is a technique that allows you to recover lost source code. It is also nee
💻 H
字号:
#ifndef _VARIABLE_H
#define _VARIABLE_H

#include "Global.h"
// Enumerations for the known Variable Types.
enum {
	VAR_CHAR=0,VAR_INT,VAR_LONG,VAR_VOID,
	VAR_LIB_FUNCTION,VAR_USER_FUNCTION,VAR_STRUCT,VAR_UNION,
	VAR_TYPEDEF,VAR_REGISTER,VAR_UNKNOWN
	};

class Variable
{
public:
  int Operand;			// Type of operand.
  Word Data1;			// Operand 1. (Value depends on the Type).
  Sword Data2;			// Used for indexing addr. modes.
  operator char *();
  void operator = (Variable &v);
  Variable &operator - (int offset);
  int operator == (Variable &v);
  int SameKind(Variable &v);
  int IsCVariable();		// is this variable a valid 'C' variable?
  Word GetAddress();
};

class VariableList
{
public:
  Byte Type;			// Type of this variable.
  int Size;			// sizeof(this variable).
  char Name[32];		// Name of this variable.
  Variable Data;			// This variable.
  Byte readOnly;		// Is this variable read-only? i.e. can't del
  VariableList *Next;

  VariableList();
  ~VariableList();
  inline void Flush() { VariableList::~VariableList(); }
  void Display();
  void Add(Variable &v,int _type,int _size,char *_name=0,int _readonly=0);
  void Del(Variable &v);
  void MakeAllReadOnly();
  int GetType(Variable &v);
  char *GetName(Variable &v,int _type=-1);
  int IsPresent(Variable &v,int _type=-1);
  int PartOfAnyVariable(Variable &v1,Variable &v2,int &v2Type);
  void NameUnknownVariables();
};

#endif		// Variable.h

⌨️ 快捷键说明

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