Subversion Repositories spk

Rev

Rev 1 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 cycrow 1
#ifndef __XBOD_H__
2
#define __XBOD_H__
3
 
4
#include <stdlib.h>
5
 
6
#define BOB_SECTION_NAME_CUT_BEGIN 0x43555431 // CUT1
7
#define BOB_SECTION_NAME_CUT_END 0x2f435554 // /CU1
8
 
9
class CXBod
10
{
11
public:
12
	static const int HeaderStart	= BOB_SECTION_NAME_CUT_BEGIN; 
13
	static const int HeaderEnd		= BOB_SECTION_NAME_CUT_END;
14
 
15
	CXBod() { m_sData = 0; m_lSize = 0; m_bUsedMalloc = false; }
16
	~CXBod()
17
	{
18
		if ( m_sData )
19
		{
20
			if ( m_bUsedMalloc )
21
				free(m_sData);
22
			else
23
				delete m_sData;
24
		}
25
	}
26
 
27
	int LoadData(const unsigned char *data, const size_t size);
28
 
29
private:
30
	bool			 m_bUsedMalloc;
31
	unsigned char	*m_sData;
32
	size_t			 m_lSize;
33
};
34
 
35
#endif //__XBOD_H__