📄 maple.h
字号:
//// *********************************************************************// *// * Author : Gerald Carter// * cartegw@humsci.auburn.edu// * Filename : maple.h// * Date Created : 960404// *// * Description : This is the header file for a C++ class// * implementation of a maple expression tree.// *// * --------------------// * Modifications// * --------------------// *// *********************************************************************//// Test for multiple inclusion#ifndef _MAPLE_H#define _MAPLE_H// Class declaration Tagclass mapleNode;// INCLUDE FILES#include <string.h>#include "syntax.h"// ####################################################################// ## class mapleNode : public syntaxNode// ##class mapleNode : public syntaxNode { private : int value; syntaxNode **syntaxTrees; char *expr_string; // used to generate the recurrence equation for the 'rsolve' command int EvaluateExpressionTree ( ostream&, int ); public : // CONSTRUCTOR mapleNode ( void ) { value = 0; syntaxTrees = 0; expr_string = 0; } ~mapleNode ( void ) { delete []syntaxTrees; } // GENERAL METHODS int SetValue ( int x ) { value = x; return ( x ); } int GetValue ( void ) { return value; } int NumberOfSyntaxTrees ( int i ) { syntaxTrees = new (syntaxNode*)[i]; } int SetSyntaxTree ( syntaxNode* item, int i ) { syntaxTrees[i] = item; } syntaxNode* GetSyntaxTree ( int i ) { return ( syntaxTrees[i] ); } char* GetExprString ( void ) { return ( expr_string ); } char* SetExprString ( char* str) { return ( expr_string = strdup ( str ) ); } // Output functions void PrintTree ( ostream& ); void PrintTreeLabels ( ostream& );}; // end of class mapleNode#endif//********* end of maple.h *******************************************//********************************************************************
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -