void GeneratorValuetypesC::generate(std::string target, std::string fileprefix) { try { initialize(target, fileprefix); } catch (InitializeError) { return; } // // parse for user sections and open file // out.initUserSections("valuetypes.cpp"); out.open("valuetypes.cpp"); out << "//\n"; out << "// generated by Qedo\n"; out << "//\n\n"; out << "#include \"valuetypes.h\"\n"; out << "#include \"Output.h\"\n"; out << "#include \"RefCountBase.h\"\n\n\n"; out.insertUserSection("file", 2); doGenerate(); // // close file // out.close(); }
void GeneratorValuetypesH::generate(std::string target, std::string fileprefix) { try { initialize(target, fileprefix); } catch (InitializeError) { return; } // // parse for user sections and open file // out.initUserSections("component_valuetypes.h"); out.open("component_valuetypes.h"); out << "//\n"; out << "// generated by Qedo\n"; out << "//\n\n"; out << "#ifndef _VALUETYPES_H_\n"; out << "#define _VALUETYPES_H_\n\n\n"; out << "#include <CORBA.h>\n"; out << "#include \"" << file_prefix_ << "_EQUIVALENT.h\"\n\n\n"; out.insertUserSection("file", 2); doGenerate(); // // close file // out << "#endif\n"; out.close(); }
void GeneratorPersistenceH::generate(std::string target, std::string fileprefix) { try { initialize(target, fileprefix); } catch (InitializeError) { return; } strFilename_ = file_prefix_ + "_PSS.h"; out.open(strFilename_.c_str()); out << "//\n"; out << "// generated by Qedo\n"; out << "//\n\n"; out << "#ifndef _" << file_prefix_ << "_PSS_H_\n"; out << "#define _" << file_prefix_ << "_PSS_H_\n\n\n"; out << "#include <CORBA.h>\n"; out << "#include <sstream>\n"; out << "#include \"CORBADepends.h\"\n"; out << "#include \"GlobalHelpers.h\"\n"; out << "#include \"StorageObject.h\"\n"; out << "#include \"StorageHomeBase.h\"\n"; out << "#include \"Catalog.h\"\n"; out << "#include \"" << file_prefix_ << "_EQUIVALENT.h\"\n\n"; out << "using namespace Qedo;\n\n"; doGenerate(); out << "\n#endif\n"; out.close(); }
void GeneratorPersistenceC::generate(std::string target, std::string fileprefix) { try { initialize(target, fileprefix); } catch (InitializeError) { return; } doGenerate(); }
void GeneratorBusinessH::generate(std::string target, std::string fileprefix) { try { initialize(target, fileprefix); } catch (InitializeError) { return; } doGenerate(); }
void GeneratorVC7::generate(std::string target, std::string fileprefix) { try { initialize(target, fileprefix); } catch (InitializeError) { return; } doGenerate(); generateServant(); }
void MainWindow::connectSignalsFromWidgets() { // Connect signal to update user name field when a URL gets // selected in the combo box connect(m_urlCombo, SIGNAL(activated(const QString &)), this, SLOT(updateUser(const QString &))); // Decide the text of the save/remove-button if URL is changed connect(m_urlCombo, SIGNAL(editTextChanged(const QString &)), this, SLOT(toggleSaveButtonText())); // Decide the text of the save/remove-button if user name is changed connect(m_userEdit, SIGNAL(textChanged(const QString &)), this, SLOT(toggleSaveButtonText())); // Decide the text of the save/remove-button if length is changed connect(m_lengthSpinBox, SIGNAL(valueChanged(int)), this, SLOT(toggleSaveButtonText())); // Connect signal to update user name field if URL-field is changed connect(m_urlCombo, SIGNAL(editTextChanged(const QString &)), this, SLOT(updateUser(const QString &))); // Save of remove a saved login when save/remove-button is clicked connect(m_saveButton, SIGNAL(clicked()), this, SLOT(saveOrRemoveLogin())); // Generate the password when generate-button is clicked connect(m_genButton, SIGNAL(clicked()), this, SLOT(doGenerate())); // Invalidate generated password if one of the inputs gets changed connect(m_masterEdit, SIGNAL(textChanged(const QString &)), this, SLOT(invalidate())); connect(m_urlCombo, SIGNAL(editTextChanged(const QString &)), this, SLOT(invalidate())); connect(m_userEdit, SIGNAL(textChanged(const QString &)), this, SLOT(invalidate())); // Enable generate-button if all inputs are valid connect(m_masterEdit, SIGNAL(textChanged(const QString &)), this, SLOT(enableGenButton())); connect(m_urlCombo, SIGNAL(editTextChanged(const QString &)), this, SLOT(enableGenButton())); connect(m_userEdit, SIGNAL(textChanged(const QString &)), this, SLOT(enableGenButton())); // Enable save-button if the URL not already saved connect(m_masterEdit, SIGNAL(textChanged(const QString &)), this, SLOT(enableSaveButton())); connect(m_urlCombo, SIGNAL(editTextChanged(const QString &)), this, SLOT(enableSaveButton())); connect(m_userEdit, SIGNAL(textChanged(const QString &)), this, SLOT(enableSaveButton())); // Set "master password"-label color connect(m_masterEdit, SIGNAL(textChanged(const QString &)), this, SLOT(setMasterPasswordLabelColor())); }
void updateHook() { if(CartesianPosition_trig && true) { doGenerate(); CartesianPosition_trig = false; } if(ImpedanceTrajectory_trig && true) { doNewTrajectory(); ImpedanceTrajectory_trig = false; } }
void GeneratorCCD::generate(std::string target, std::string fileprefix) { try { initialize(target, fileprefix); } catch (InitializeError) { return; } // setting counter for facettag facet_number_ = 1; doGenerate(); }
void GeneratorCSD::generate(std::string target, std::string fileprefix) { try { initialize(target, fileprefix); } catch (InitializeError) { return; } // TODO: needs to be replaced by cidl pretty printer output idlfilename_ = file_prefix_ + ".cidl"; doGenerate(); }
Graph* RandomGenerator::generate(int grade, int density) { Graph* graph = new Graph(comm, grade, density); doGenerate(graph); #ifdef GRAPH_IS_UNORIENTED doDistribute(graph); #endif return graph; }
void GeneratorBusinessH::generate(std::string target, std::string fileprefix) { try { initialize(target, fileprefix); } catch (InitializeError) { return; } doGenerate(); // generate source code for PSS ph_generator_->generate(target, fileprefix); ph_generator_->destroy(); }
void GeneratorServantH::generate(std::string target, std::string fileprefix) { try { initialize(target, fileprefix); } catch (InitializeError) { return; } // // open file // std::string header_name = file_prefix_ + "_SERVANT"; std::string filename = header_name + ".h"; out.open(filename.c_str()); out << "//\n"; out << "// generated by Qedo\n"; out << "//\n\n"; out << "#ifndef _" << header_name << "_H_\n"; out << "#define _" << header_name << "_H_\n\n\n"; out << "#include <CORBA.h>\n"; out << "#include \"" << file_prefix_ << "_LOCAL_skel.h\"\n"; out << "#include \"SessionContext.h\"\n"; out << "#include \"EntityContext.h\"\n"; out << "#include \"ExtensionContext.h\"\n"; out << "#include \"ServantBase.h\"\n"; out << "#ifndef _QEDO_NO_STREAMS\n"; out << "#include \"PrimaryStreamServant.h\"\n"; out << "#endif\n"; out << "#ifdef _QEDO_NO_QOS\n"; out << "#include \"ExtensionHomeServant.h\"\n"; out << "#endif\n"; out << "#include \"SessionHomeServant.h\"\n"; out << "#include \"EntityHomeServant.h\"\n\n\n"; // // dynamic library identifier // out << "\n//\n// dynamic library identifier\n//\n"; out << "extern \"C\" {\n"; out << "#ifdef _WIN32\n"; out << "__declspec(dllexport)\n"; out << "#endif\n"; out << "void set_library_id( CORBA::Long id );\n"; out << "CORBA::Long get_library_id();\n"; out << "}\n\n"; doGenerate(); // // close file // out << "#endif\n"; out.close(); }
void GeneratorCSD::generate(std::string target, std::string fileprefix) { try { initialize(target, fileprefix); } catch (InitializeError) { return; } idlfilename_ = file_prefix_ + ".idl"; doGenerate(); }
void GeneratorBIDL::generate(string target) { filename_ = target + "_BUSINESS.idl"; out.open(filename_.c_str()); out << "#ifndef __" << target << "_BUSINESS_IDL\n"; out << "#define __" << target << "_BUSINESS_IDL\n"; out << "\n#include \"" << target << "_LOCAL.idl\"\n\n\n"; out << "// local interfaces for each executor or segment\n\n"; doGenerate(target); out << "\n#endif\n"; out.close(); }
int run(int argc, char **argv) { clock_t start = clock(); printf("Running...\n"); fflush(stdout); int ret; if (argc >= 2 && strcmp(argv[1], "-c") == 0) { ret = lcsfile_run((const char**)&argv[2]); } else if (argc >= 2 && strcmp(argv[1], "-g") == 0) { ret = doGenerate(argc, argv); } else { ret = gui_run(); } clock_t stop = clock(); double elapsed = ((double) (stop - start)) / CLOCKS_PER_SEC; printf("Done (%.2fs).\n", elapsed); return ret; }
bool generateDoc(void) { if (!parseCommandline()) { help(); return false; } // initialize the system - load the dtype scripts according to the config initialize(); // read the additional docs file. This file contains docs for each entity // has a simple format [prop PropName] or [link LinkName] for doc target change. Other lines (after stripping # comments) // are accumulated to the last specified doc target loadAdditionalDocStrings(); // generate the doc doGenerate(); return true; }
void GeneratorLIDL::generate(std::string target, std::string fileprefix) { try { initialize(target, fileprefix); } catch (InitializeError) { return; } filename_ = file_prefix_ + "_LOCAL.idl"; out.open(filename_.c_str()); out << "#ifndef __" << file_prefix_ << "_LOCAL_IDL\n"; out << "#define __" << file_prefix_ << "_LOCAL_IDL\n"; out << "\n#include \"" << file_prefix_ << "_EQUIVALENT.idl\"\n\n\n"; out << "// local interfaces\n\n"; doGenerate(); out << "\n#endif\n"; out.close(); }
void GeneratorBIDL::generate(std::string target, std::string fileprefix) { try { initialize(target, fileprefix); } catch (InitializeError) { return; } filename_ = file_prefix_ + "_BUSINESS.idl"; out.open(filename_.c_str()); out << "#ifndef __" << file_prefix_ << "_BUSINESS_IDL\n"; out << "#define __" << file_prefix_ << "_BUSINESS_IDL\n\n"; out << "#include \"" << file_prefix_ << "_LOCAL.idl\"\n\n\n"; out << "//\n// local interfaces for each executor or segment\n//\n\n\n"; doGenerate(); out << "\n#endif\n"; out.close(); }
void GeneratorPSD::generate(std::string target, std::string fileprefix) { try { initialize(target, fileprefix); } catch (InitializeError) { return; } strFilename_ = file_prefix_ + ".psd"; out.open(strFilename_.c_str()); out << "<?xml version = '1.0' ?>\n"; out << "<!DOCTYPE corbacomponent PUBLIC \"-//OMG//DTD CORBA Persistence Descriptor\">\n\n\n"; out << "<corbapersistence>\n\n"; out.indent(); //Since a container is accessible only to one certain database, the database information in //.psd is not neccessary anymore /* out << "<!-- database-info must be specified before all of storagehome's definition -->\n"; out << "<database-info>\n"; out.indent(); out << "<dbname></dbname>\n\n"; out << "<connection>\n"; out.indent(); out << "<param name=\"\" value=\"\"/>\n"; out << "<param name=\"\" value=\"\"/>\n"; out.unindent(); out << "</connection>\n"; out.unindent(); out << "</database-info>\n\n"; */ doGenerate(); out.unindent(); out << "</corbapersistence>\n"; out.close(); }
void GeneratorServantC::generate(string target) { target_ = target; doGenerate(target); }
void GeneratorEIDL::generate(std::string target, std::string fileprefix) { try { initialize(target, fileprefix); } catch (InitializeError) { return; } // // open temp file without includes // filename_ = file_prefix_ + "_EQUIVALENT.idl"; string temp_filename = filename_ + ".temp"; out.open(temp_filename.c_str()); // // forward declarations // out << "//\n// forward declarations\n//\n"; CORBA::ULong len = m_to_generate_interface_seq->length(); CORBA::ULong i; for(i = 0; i < len; i++) { if ((*m_to_generate_interface_seq)[i]->describe()->kind == CORBA__::dk_Interface) { open_module((*m_to_generate_interface_seq)[i]); out << "interface " << (*m_to_generate_interface_seq)[i]->name() << ";\n"; close_module((*m_to_generate_interface_seq)[i]); } if ((*m_to_generate_interface_seq)[i]->describe()->kind == CORBA__::dk_Component) { open_module((*m_to_generate_interface_seq)[i]); out << "interface " << (*m_to_generate_interface_seq)[i]->name() << ";\n"; close_module((*m_to_generate_interface_seq)[i]); }; if ((*m_to_generate_interface_seq)[i]->describe()->kind == CORBA__::dk_Home) { open_module((*m_to_generate_interface_seq)[i]); out << "interface " << (*m_to_generate_interface_seq)[i]->name() << ";\n"; close_module((*m_to_generate_interface_seq)[i]); }; } out << "\n"; // // generate // doGenerate(); out.close(); // // insert includes // std::ifstream temp_file; temp_file.open(temp_filename.c_str()); out.open(filename_.c_str()); out << "#ifndef __" << file_prefix_ << "_EQUIVALENT_IDL\n"; out << "#define __" << file_prefix_ << "_EQUIVALENT_IDL\n\n"; out << "#include \"Components.idl\"\n"; out << "#include \"orb.idl\"\n"; std::map < std::string, bool > ::iterator it; for(it = includes_.begin(); it != includes_.end(); it++) { out << "#include \"" << it->first << "\"\n"; } out << "\n"; out << temp_file; out << "\n#endif\n"; out.close(); temp_file.close(); unlink(temp_filename.c_str()); }
void IssueGenerator::generate(Brush* brush, IssueList& issues) const { doGenerate(brush, issues); }
void IssueGenerator::generate(Entity* entity, IssueList& issues) const { doGenerate(entity, issues); }
void IssueGenerator::generate(Group* group, IssueList& issues) const { doGenerate(group, issues); }
void IssueGenerator::generate(Layer* layer, IssueList& issues) const { doGenerate(layer, issues); }
void IssueGenerator::generate(World* world, IssueList& issues) const { doGenerate(world, issues); }
/** * @brief AbstractProjectGenerator::generate */ void AbstractProjectGenerator::generate() { doGenerate(); }
void GeneratorServantH::generate(std::string target, std::string fileprefix) { try { initialize(target, fileprefix); } catch (InitializeError) { return; } // // open file // std::string header_name = file_prefix_ + "_SERVANT"; std::string filename = header_name + ".h"; out.open(filename.c_str()); out << "//\n"; out << "// generated by Qedo\n"; out << "//\n\n"; out << "#ifndef _" << header_name << "_H_\n"; out << "#define _" << header_name << "_H_\n\n\n"; out << "#include <CORBA.h>\n"; out << "#include <sstream>\n"; out << "#include \"" << file_prefix_ << "_LOCAL_skel.h\"\n"; out << "#include \"SessionContext.h\"\n"; out << "#include \"EntityContext.h\"\n"; out << "#include \"ExtensionContext.h\"\n"; out << "#include \"ServantBase.h\"\n"; out << "#ifndef _QEDO_NO_STREAMS\n"; out << "#include \"PrimaryStreamServant.h\"\n"; out << "#include \"SinkStreamPortServant.h\"\n"; out << "#endif\n"; out << "#ifndef _QEDO_NO_QOS\n"; out << "#include \"ExtensionHomeServant.h\"\n"; out << "#endif\n"; out << "#include \"SessionHomeServant.h\"\n"; out << "#include \"EntityHomeServant.h\"\n"; out << "#include \"" << file_prefix_ << "_PSS.h\"\n"; out << "#include \"Connector.h\"\n\n"; out << "using namespace Qedo;\n\n"; // // dynamic library identifier // out << "\n//\n// dynamic library identifier\n//\n"; out << "extern \"C\" {\n"; out << "#ifdef _WIN32\n"; out << "__declspec(dllexport)\n"; out << "#endif\n"; out << "void set_library_id( CORBA::Long id );\n"; out << "CORBA::Long get_library_id();\n"; out << "}\n\n"; // parse the namespace name from prefix, disadvantage is // that will not allow the user to use '_' in his namespace name // a little farfetched ;-( basic_string <char>::size_type idx; static const basic_string <char>::size_type npos = -1; idx = file_prefix_.find("_"); if(idx!=npos) strNamespace_ = file_prefix_.substr(0, idx); doGenerate(); // // close file // out << "#endif\n"; out.close(); // generate source code for PSS ph_generator_->generate(target, fileprefix); ph_generator_->destroy(); }