1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#pragma once
#include "Record.h"
namespace DocFileFormat
{
class UnknownRecord: public Record
{
public:
byte* _bytes;
unsigned int _size;
UnknownRecord():
Record(), _bytes(NULL), _size(0)
{
}
UnknownRecord( IBinaryReader* _reader, unsigned int size, unsigned int typeCode, unsigned int version, unsigned int instance ):
Record( _reader, size, typeCode, version, instance ), _bytes(NULL), _size(0)
{
this->_size = (unsigned int)( this->Reader->GetSize() - this->Reader->GetPosition() );
if ( this->_size >= size )
{
this->_size = size;
}
this->_bytes = this->Reader->ReadBytes( this->_size, true );
}
virtual ~UnknownRecord()
{
RELEASEARRAYOBJECTS( this->_bytes );
}
virtual Record* NewObject( IBinaryReader* _reader, unsigned int bodySize, unsigned int typeCode, unsigned int version, unsigned int instance )
{
return new UnknownRecord( _reader, bodySize, typeCode, version, instance );
}
};
}