Exemple #1
0
bool TRFactory::WriteDescription(fstream& outfile, const TRDescription& inDescription)
{
    bool theSuccess = true;

    // Write out the start block
    outfile << "start" << " " << inDescription.GetType() << " " << inDescription.GetName() << std::endl;

    // Write out the property tags
    TRDescription::const_iterator theIter;
    for(theIter = inDescription.begin(); theIter != inDescription.end(); theIter++)
    {
        outfile << "    " << theIter->first << " = " << theIter->second << std:: endl;
    }

    // Write out the end block.
    outfile << "end" << std::endl;

    return theSuccess;
}