Ejemplo n.º 1
0
 void MapWriter::writeEntityHeader(const Model::Entity& entity, std::ostream& stream) {
     stream << "{\n";
     
     const Model::PropertyList& properties = entity.properties();
     Model::PropertyList::const_iterator it, end;
     for (it = properties.begin(), end = properties.end(); it != end; ++it) {
         const Model::Property& property = *it;
         stream << "\"" << property.key() << "\" \"" << property.value() << "\"" << "\n";
     }
 }
Ejemplo n.º 2
0
 size_t MapWriter::writeEntityHeader(Model::Entity& entity, FILE* stream) {
     size_t lineCount = 0;
     std::fprintf(stream, "{\n"); lineCount++;
     
     const Model::PropertyList& properties = entity.properties();
     Model::PropertyList::const_iterator it, end;
     for (it = properties.begin(), end = properties.end(); it != end; ++it) {
         const Model::Property& property = *it;
         std::fprintf(stream, "\"%s\" \"%s\"\n", property.key().c_str(), property.value().c_str()); lineCount++;
     }
     return lineCount;
 }
 EntitySnapshot::EntitySnapshot(const Model::Entity& entity) {
     m_uniqueId = entity.uniqueId();
     m_properties = entity.properties();
 }