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 9 #include <dxconfig.h> 10 11 12 13 14 #ifndef _JavaNet_h 15 #define _JavaNet_h 16 17 #include "Network.h" 18 19 // 20 // Class name definition: 21 // 22 #define ClassJavaNet "JavaNet" 23 24 class Node; 25 class ImageNode; 26 class MacroNode; 27 class Command; 28 29 // 30 // Network class definition: 31 // 32 class JavaNet : public Network 33 { 34 35 private: 36 37 friend class DXApplication; // For the constructor 38 39 const char* getHtmlHeader(); 40 41 42 protected: 43 44 // 45 // Called only by DXApplication 46 // 47 JavaNet(); 48 49 static String UnsupportedTools[]; 50 51 static List* MakeUnsupportedToolList(JavaNet*); 52 53 char* base_name; 54 55 char* html_file; 56 char* make_file; 57 char* applet_file; 58 char* bean_file; 59 60 FILE* html_f; 61 FILE* make_f; 62 FILE* applet_f; 63 FILE* bean_f; 64 65 boolean setOutputName (const char*); 66 boolean netToApplet(); 67 68 Command* saveWebPageCmd; 69 Command* saveAppletCmd; 70 Command* saveBeanCmd; 71 72 // 73 // In addition to the work done in Network, we need to print references to 74 // special macros used in exporting gifs and wrls 75 // 76 virtual boolean printMacroReferences(FILE *f, boolean inline_define, 77 PacketIFCallback echoCallback, void *echoClientData); 78 79 boolean requires(const char* format); 80 81 82 public: 83 84 // 85 // Destructor: 86 // 87 ~JavaNet(); 88 89 virtual boolean saveWebPage(); 90 virtual boolean saveApplet(); 91 virtual boolean saveBean(); 92 getSaveWebPageCommand()93 virtual Command* getSaveWebPageCommand() { return this->saveWebPageCmd; } getSaveAppletCommand()94 virtual Command* getSaveAppletCommand() { return this->saveAppletCmd; } 95 virtual Command* getSaveBeanCommand(); 96 97 virtual boolean isJavified(); 98 99 virtual boolean saveNetwork(const char *name, boolean force = FALSE); 100 101 virtual void changeExistanceWork(Node *n, boolean adding); 102 103 // 104 // Returns a pointer to the class name. 105 // getClassName()106 const char* getClassName() { return ClassJavaNet; } 107 }; 108 109 110 #endif // _JavaNet_h 111 112