📄 inst_07.cc
字号:
// file: $isip/class/search/Instance/inst_07.cc// version: $Id: inst_07.cc,v 1.4 2003/01/23 20:00:30 alphonso Exp $//// isip include files//#include "Instance.h"// method: eq//// arguments:// const Instance& instance: (input) instance to compare//// return: true if the instances are equivalent, else false//// compare two instances and determine if they are equivalent//boolean Instance::eq(const Instance& instance_a) const { // compare the history pointers // if (history_d != instance_a.history_d) { return false; } // compare the symbol pointers // if (symbol_d != instance_a.symbol_d) { return false; } // if we reached this far then they must be equal // return true; }// method: setHistory//// arguments:// const History* new_hist: (input) the history to copy//// return: a boolean indicating status//// this method sets the instance's history to the input history//boolean Instance::setHistory(const History* new_hist_a) { // set the history // return (history_d = const_cast<History *>(new_hist_a));}// method: getHistory//// arguments: none//// return: a boolean indicating status//// this method gets the instance's history//History* Instance::getHistory() const { // get the history // return history_d;}// method: setSymbol//// arguments:// const Symbol& new_symbol: (input) the symbol to copy//// return: a boolean indicating status//// this method sets the instance's symbol to the input symbol//boolean Instance::setSymbol(const Context* new_symbol_a) { // set the symbol // return (symbol_d = const_cast<Context *>(new_symbol_a));}// method: getSymbol//// arguments: none//// return: a boolean indicating status//// this method gets the instance's symbol//Context* Instance::getSymbol() const { // get the symbol // return symbol_d;}// method: setSymbolStack//// arguments:// const History* new_stack: (input) the symbol stack to copy//// return: a boolean indicating status//// this method sets the instance's symbol stack to the input symbol stack//boolean Instance::setSymbolStack(const History* new_stack_a) { // set the history // return (symbol_stack_d = const_cast<History *>(new_stack_a));}// method: getSymbolStack//// arguments: none//// return: a boolean indicating status//// this method gets the instance's symbol stack//History* Instance::getSymbolStack() const { // get the symbol stack // return symbol_stack_d;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -