Glib::ustring CSystem::getAsString(void){ std::stringstream l_str; /* id;"name";"description";"icon_file";"dat_file";"bios_file";"home_dir";""rom_dir"; "snap_dir";"tittle_dir";"front_dir";"back_dir";"media_dir";emulator_id; "datname";"datDescription";"datcategory";datversion";"datauthor";datgames; */ l_str << getId() << CSV_SEPARATOR << "\"" << Glib::strescape(getName()) << "\"" << CSV_SEPARATOR << "\"" << Glib::strescape(getDescription()) << "\"" << CSV_SEPARATOR << "\"" << Glib::strescape(getIconFile()) << "\"" << CSV_SEPARATOR << "\"" << Glib::strescape(getDatFile()) << "\"" << CSV_SEPARATOR << "\"" << Glib::strescape(getBiosFile()) << "\"" << CSV_SEPARATOR << "\"" << Glib::strescape(getHomeDir()) << "\"" << CSV_SEPARATOR << "\"" << Glib::strescape(getRomsDir()) << "\"" << CSV_SEPARATOR << "\"" << Glib::strescape(getSnapDir()) << "\"" << CSV_SEPARATOR << "\"" << Glib::strescape(getTitleDir()) << "\"" << CSV_SEPARATOR << "\"" << Glib::strescape(getFrontDir()) << "\"" << CSV_SEPARATOR << "\"" << Glib::strescape(getBackDir()) << "\"" << CSV_SEPARATOR << "\"" << Glib::strescape(getMediaDir()) << "\"" << CSV_SEPARATOR << getEmulatorId() << CSV_SEPARATOR << "\"" << Glib::strescape(getDatName()) << "\"" << CSV_SEPARATOR << "\"" << Glib::strescape(getDatDescription()) << "\"" << CSV_SEPARATOR << "\"" << Glib::strescape(getDatCategory()) << "\"" << CSV_SEPARATOR << "\"" << Glib::strescape(getDatVersion()) << "\"" << CSV_SEPARATOR << "\"" << Glib::strescape(getDatAuthor()) << "\"" << CSV_SEPARATOR << getDatGames() << CSV_SEPARATOR << std::endl; return l_str.str(); }
void HTMLWriter::endHeader() { if (!getIconFile().isEmpty()) { stream << "<link rel=\"shortcut icon\" href=\""<< getIconFile() <<"\" type=\"image/x-icon\">" ; writeLineFormating() ; stream << "<link rel=\"icon\" href=\""<< getIconFile() <<"\" type=\"image/x-icon\">" ; writeLineFormating() ; } stream << "<title>"<< getTitle() << "</title>" ; writeLineFormating() ; if (!getCssFile().isEmpty()) { stream << "<link rel=\"stylesheet\" type=\"text/css\" href=\""<< getCssFile() << "\">" ; writeLineFormating() ; } else { stream << "<style type=\"text/css\">" ; writeLineFormating() ; for (QMap<section_type_t,QStringList>::const_iterator it=styles.begin();it!=styles.end();++it) { QString html_class=sectionName(it.key()); QStringList attributes=it.value(); stream << "." << html_class << " {"; for (QStringList::const_iterator itAttribute=attributes.begin();itAttribute!=attributes.end();++itAttribute) { stream << *itAttribute << "; "; } stream << "}" ; writeLineFormating() ; } stream << "</style>" ; writeLineFormating() ; } stream << "</head>" ; writeLineFormating() ; }