Beispiel #1
0
/**
  *@brief Writes general xml information.
  *Calls other functions to insert login and result information.
  *@param device: target of writing, here filename.
  *@param usr for user name.
  *@param psswd for password.
  *@param email.
  */
bool XmlWriter::writeXmlFile(QIODevice *device)
{
    xmlwriter.setDevice(device);
    xmlwriter.writeStartDocument();
    writeItems();
    xmlwriter.writeEndDocument();

    return true;
}
void TStatusLine::writeDefs( opstream& os, TStatusDef *td )
{
    int count = 0;
    for( TStatusDef *t = td; t != 0; t = t->next )
        count++;
    os << count;
    for( ; td != 0; td = td->next )
        {
        os << td->min << td->max;
        writeItems( os, td->items );
        }
}
// Function:     writeItemsAndTotal
// Inputs:       NA
// Outputs:      NA
// Description:  Write the items and subtotal, tax, and total to file.
//
void ContractorSale::writeItemsAndTotal(int saleNum)
{
    writeItems(saleNum);

    std::ofstream output(SALES_FILE_NAME.c_str(), std::ios::app);
    output    << BAR << TAB << SUBTOTAL << getSubTotal() << std::endl;
    output    << BAR << TAB << SALE_CONT << std::endl;
    output    << BAR << TAB << CONT_ID << contractorID << std::endl;
    output    << BAR << TAB << DISCOUNT << OPEN_PERC << discount*100 << CLOSE_PERC << amtDiscounted << std::endl;
    output    << BAR << TAB << SUBTOTAL << getSubTotal() << std::endl;
    output    << BAR << TAB << TAX << OPEN_PERC << getTaxRate()*100 << CLOSE_PERC << getTotalTax() << std::endl;
    output    << BAR << TAB << TOTAL_AMT << getTotalAmt() << std::endl;
    output.close();
}
Beispiel #4
0
void GameDatas::write(QString path){
    RPM::writeJSON(Common::pathCombine(path, RPM::pathCommonEvents),
                     *m_commonEventsDatas);
    RPM::writeJSON(Common::pathCombine(path, RPM::pathVariables),
                     *m_variablesDatas);
    writeSystem(path);
    writeBattleSystem(path);
    writeItems(path);
    writeSkills(path);
    writeWeapons(path);
    writeArmors(path);
    writeHeroes(path);
    writeMonsters(path);
    writeTroops(path);
    writeClasses(path);
    writeTilesets(path);
    writeAnimations(path);
    writeStatus(path);
    writeTitleScreenGameOver(path);
}
Beispiel #5
0
/**
 * Standard output for a SOM
 * Parameter: _os The output stream
 */
void ClassificationMap::printSelf(std::ostream& _os) const
{
    _os << itemAt(0).size() << " " <<
        somLayout->id() << " " << somWidth << " " << somHeight << " gaussian" << std::endl;
    writeItems(_os);
}