bbtkTranscriptor.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00040 #ifndef __bbtkTranscriptor_h__
00041 #define __bbtkTranscriptor_h__
00042
00043 #include "bbtkVirtualExec.h"
00044
00045 #include "bbtkSystem.h"
00046 #include <iostream>
00047
00048 namespace bbtk
00049 {
00050
00051 class Transcriptor : public VirtualExec
00052 {
00053 BBTK_OBJECT_INTERFACE(Transcriptor);
00054 typedef VirtualExec Superclass;
00055 public:
00056 static Pointer New(const std::string& filename);
00057
00058
00060 void SetInputs(const std::map<std::string,std::string>& m) { mInputs = m; }
00061
00064
00065
00066 void SetNoExecMode(bool b)
00067 {
00068 if (b)
00069 m_Fp << " e->SetNoExecMode(true);" << std::endl;
00070 else
00071 m_Fp << " e->SetNoExecMode(false);" << std::endl;
00072 }
00073
00074 void SetNoErrorMode(bool b)
00075 {
00076 if (b)
00077 m_Fp << " e->SetNoErrorMode(true);" << std::endl;
00078 else
00079 m_Fp << " e->SetNoErrorMode(false);" << std::endl;
00080 }
00081
00082 bool GetNoExecMode() const { return false; }
00083 bool GetNoErrorMode() const { return false; }
00084
00086 void SetDialogMode(DialogModeType t) { mDialogMode = t; }
00087
00089 void LoadPackage(const std::string &name );
00090
00092 void UnLoadPackage(const std::string &name );
00093
00095 void BeginPackage (const std::string &name );
00096
00098 void EndPackage ();
00099
00102 void Define (const std::string &name,
00103 const std::string& pack,
00104 const std::string &scriptfilename);
00105
00108 void SetCurrentFileName (const std::string &name );
00109
00111 void EndDefine ();
00112
00114 void Kind(const std::string& kind);
00115
00117 void Create ( const std::string& boxType, const std::string& boxName);
00118
00120 void Destroy (const std::string &boxName);
00121
00123 void Connect (const std::string &boxfrom,
00124 const std::string &output,
00125 const std::string &boxto,
00126 const std::string &input);
00127
00129 void Execute(const std::string &box);
00130
00132 void DefineInput (const std::string &name,
00133 const std::string &box,
00134 const std::string &input,
00135 const std::string &help);
00136
00138 void DefineOutput (const std::string &name,
00139 const std::string &box,
00140 const std::string &output,
00141 const std::string &help);
00142
00144 void Set (const std::string &box,
00145 const std::string &input,
00146 const std::string &value);
00147
00149 std::string Get (const std::string &box,
00150 const std::string &output);
00151
00153 void SetWorkspaceName( const std::string& n );
00154
00156 void Author(const std::string &authorName);
00157
00159 void Category(const std::string &category);
00160
00162 void Description(const std::string & d);
00163
00165 void PrintBoxes();
00166
00168 std::string ShowGraph(const std::string &nameblackbox,
00169 const std::string &detailStr,
00170 const std::string &levelStr,
00171 const std::string &output_file,
00172 const std::string &custom_header,
00173 const std::string &custom_title,
00174 bool system_display = true);
00175
00177 std::string ShowGraphInstances(const std::string &nameblackbox, int detail, int level, bool system_display=true);
00178
00180 void ShowRelations(const std::string &nameblackbox, const std::string &detailStr, const std::string &levelStr);
00181
00182 void Reset();
00183
00185 void SetMessageLevel(const std::string &kind,
00186 int level);
00187
00189 void HelpMessages();
00190
00192 void Print(const std::string & message);
00193
00194
00195
00196
00197 protected:
00198
00199 private:
00201 Transcriptor(const std::string& filename);
00202
00204 std::map<std::string,std::string> mInputs;
00205
00207 DialogModeType mDialogMode;
00208
00210
00211 std::ofstream m_Fp;
00212 };
00213 }
00214 #endif