Logo Search packages:      
Sourcecode: catcodec version File versions  Download package

static string ReadString ( FileReader reader ) [static]

Read a string (byte length including termination, actual data) from a reader.

Parameters:
readerthe reader to read from
Returns:
the read string

Definition at line 58 of file sample.cpp.

References FileReader::ReadByte(), and FileReader::ReadRaw().

Referenced by Sample::ReadCatEntry().

{
      uint8_t name_len = reader.ReadByte();
      char buffer[256];

      reader.ReadRaw((uint8_t *)buffer, name_len);
      buffer[name_len - 1] = '\0';

      return buffer;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index