📄 messages.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 + -