1 /***********************************************************************/ 2 /* Open Visualization Data Explorer */ 3 /* (C) Copyright IBM Corp. 1989,1999 */ 4 /* ALL RIGHTS RESERVED */ 5 /* This code licensed under the */ 6 /* "IBM PUBLIC LICENSE - Open Visualization Data Explorer" */ 7 /***********************************************************************/ 8 #ifndef _EchoNode_h 9 #define _EchoNode_h 10 11 #include <dxconfig.h> 12 #include "../base/defines.h" 13 14 15 16 #include "ModuleMessagingNode.h" 17 18 19 // 20 // Class name definition: 21 // 22 #define ClassEchoNode "EchoNode" 23 24 // 25 // Referenced Classes 26 // 27 class NodeDefinition; 28 class Network; 29 30 // 31 // EchoNode class definition: 32 // 33 class EchoNode : public ModuleMessagingNode 34 { 35 private: 36 // 37 // Private member data: 38 // 39 40 protected: 41 // 42 // Protected member data: 43 // 44 45 // 46 // Called when a message is received from the executive after 47 // this->ExecModuleMessageHandler() is registered in 48 // this->Node::netPrintNode() to receive messages for this node. 49 // The format of the message coming back is defined by the derived class. 50 // 51 virtual void execModuleMessageHandler(int id, const char *line); 52 53 // 54 // Returns a string that is used to register 55 // this->ExecModuleMessageHandler() when this->hasModuleMessageProtocol() 56 // return TRUE. This version, returns an id that is unique to this 57 // instance of this node. 58 // 59 virtual const char *getModuleMessageIdString(); 60 61 62 public: 63 // 64 // Constructor: 65 // 66 EchoNode(NodeDefinition *nd, Network *net, int instnc); 67 68 // 69 // Destructor: 70 // 71 ~EchoNode(); 72 73 // 74 // Determine if this node is a node of the given class 75 // 76 virtual boolean isA(Symbol classname); 77 78 // 79 // Returns a pointer to the class name. 80 // getClassName()81 const char* getClassName() 82 { 83 return ClassEchoNode; 84 } 85 }; 86 87 88 #endif // _EchoNode_h 89