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

📄 messages.h~

📁 ALGAE是一个快速创建算法演示的框架。目前支持的算法实现语言包括java和c
💻 H~
字号:
#ifndef MESSAGES_H#define MESSAGES_H#include <algae/config.h>#include <string>#include <iostream>#include <algae/algae.h>#define String STD string//// Messages provides the interface for messages sent// from the server (algorithm) between the AlgAE client// (the graphic display).// class Messages {private:  Messages(): in(CIN), out(COUT) {}  Messages (const Messages& ): in(CIN), out(COUT) {}  void operator= (const Messages&) {}public:  Messages (STD istream& inputs, STD ostream& outputs);  // Inputs from the client  //   [These may block until the client actually sends a signal. They may  //    also terminate the program if the client shuts down unexpectedly.]  bool canContinue();  bool clientIsPausing() const;  String getMenuSelection();  String promptForInput (const String& prompt);  String stdInput();    // Outputs to the client  void beginEdgeList();  void endEdgeList();  void beginComponentList();  void endComponentList();  void touch (int sourceID, int destID,	      AlgAE::Directions dir, AlgAE::Color color,	      const String& edgeLabel);  void node (int objectID, AlgAE::Color color,	     const String& label, bool vertical);  void node (int objectID, const String& label);  void hide (int objectID);    void beginAlgorithm();  void endAlgorithm();  void beginFrame();  void endFrame(const String& frameIdentifier);  void menuItem (const String& itemName);  void status (const String& statusMsg);  void algorithmName (const String& algName, const String& aboutString);  void quit();  void message (const String& msg);  void stdOutput (const String& msg);private:  STD istream& in;  STD ostream& out;  bool touchingEdges;  bool continuingPermitted;  bool pausing;    bool getLine(String& line);  String encode (const String&);  String decode (const String&);  };#undef String#endif

⌨️ 快捷键说明

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