23 namespace architecture {
28 char scratch[1 << 10];
33 inStream.
read(scratch, 4);
35 if(!(torc == scratch)) {
36 mErr() <<
"This is not a valid Torc database. Magic \"" << scratch
37 <<
"\" does not match expected \"" << torc <<
"\"." << std::endl;
56 if(versionHeader !=
">>>>Version >>>>")
throw -1;
64 inStream.
read(nameLength);
66 if(nameLength >
sizeof(scratch))
throw -1;
67 inStream.
read(scratch, nameLength);
68 scratch[nameLength] = 0;
size_t readVersions(DigestStream &inStream, bool inShowVersion=false)
Read the version information.
std::istream & read(uint8_t &outValue)
Read and return a uint8_t.
ostream & mErr(void)
Returns the database console error stream.
DottedVersion mFormat
The database format version.
Header for the Versions class.
boost::uint16_t uint16_t
Imported type name.
void readSectionHeader(string &outHeader)
Read and return a section header.
ostream & mOut(void)
Returns the database console output stream.
DottedVersion mVendor
The vendor data version.
string mVendorString
The vendor data version string.
boost::uint32_t uint32_t
Imported type name.
uint32_t mBuild
The database build number.
Encapsulation of a device or family digest stream.
size_t getBytesRead(void) const
Returns the number of bytes read.