Пример #1
0
 NTA_Int32 WriteBuffer::writeString(const NTA_Byte *value, NTA_Size size)
 {
   NTA_Int32 result = write("<s n=", 5);
   if(result != 0) return result;
   result = writeT(size, 0);
   if(result != 0) return result;
   result = writeT('>', 0);
   if(result != 0) return result;
   if(size) {
     result = write(value, size);
     if(result != 0) return result;
   }
   result = write("</s>", 4);
   return result;
 }
Пример #2
0
    void ESMWriter::startRecord(const std::string& name, uint32_t flags)
    {
        mRecordCount++;

        writeName(name);
        RecordData rec;
        rec.name = name;
        rec.position = mStream->tellp();
        rec.size = 0;
        writeT<uint32_t>(0); // Size goes here
        writeT<uint32_t>(0); // Unused header?
        writeT(flags);
        mRecords.push_back(rec);

        assert(mRecords.back().size == 0);
    }
Пример #3
0
 Int32 WriteBuffer::write(const Real64 * value, Size size)
 {
   return writeT(value, size);
 }
Пример #4
0
 Int32 WriteBuffer::write(Real64 value)
 {
   return writeT(value);
 }
Пример #5
0
 Int32 WriteBuffer::write(UInt64 value)
 {
   return writeT(value);
 }
Пример #6
0
 Int32 WriteBuffer::write(Int32 value)
 {
   return writeT(value);
 }
Пример #7
0
 Int32 WriteBuffer::write(Byte value)
 {
   return writeT(value);
 }
Пример #8
0
 void writeHNT(const std::string& name, const T& data, int size)
 {
     startSubRecord(name);
     writeT(data, size);
     endRecord(name);
 }