forked from osoumen/C700
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPGChunk.h
38 lines (30 loc) · 841 Bytes
/
PGChunk.h
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
/*
* PGChunk.h
* C700
*
* Created by osoumen on 12/10/17.
* Copyright 2012 __MyCompanyName__. All rights reserved.
*
*/
#pragma once
#include "C700defines.h"
#include "DataBuffer.h"
#include "FileAccess.h"
class PGChunk : public FileAccess, public DataBuffer {
public:
PGChunk( int allocMemSize );
PGChunk( const void *data, int dataSize );
virtual ~PGChunk();
bool AppendDataFromVP( InstParams *vp );
bool ReadDataToVP( InstParams *vp );
bool writeChunk( int type, const void* data, int byte ); //容量不足で全部を書き込めないときはfalse
bool readChunkHead( int *type, long *byte );
static int getPGChunkSize( const InstParams *vp );
typedef struct {
int type;
long size; //ヘッダを除いたデータサイズ
} MyChunkHead;
private:
static const int CKID_NULL_DATA = 0;
int mNumPrograms;
};