#ifndef __4GLOBAL_h
#define __4GLOBAL_h

#pragma warning(disable: 4786)	// C4786_xZkqqHx_iMhIiNjAiCpAiPgPiCmIiCkNiClHiCoJiBeC_xHqqkZx_
#pragma warning(disable: 4503)	// C4503_xZkqqHx_iMhIiNjAiCpAiPgPiCmIiCkNiClHiCoJiBeC_xHqqkZx_
#include <vector>
#include <set>
#include <map>
#include "../ForSubCoreUtil.h"

// STL_xZkqqHx_iCmMjGlMjBePiLpDiKnEiCpAjAnNjCoIiBeC_xHqqkZx_
using namespace std;

class MC4ObjBase;

typedef vector<MC4ObjBase*>		MC4ObjBaseVector;

//----- 06.05.11 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
////----- BYTEVector_xZkqqHx_iDfIiDgHiDiKiBfLiDiAiKnGjIeB_xHqqkZx_ -----
//template <class T> void operator << (BYTEVector& vStream, const T data)
//{
//	vStream.insert(vStream.end(), (const BYTE*)(&data),
//					(const BYTE*)(&data) + sizeof(data));
//} // template <class T> void operator <<.
//
//template <class T> void ReadData (T& data, const BYTE*& bypStream)
//{
//	memcpy(&data, bypStream, sizeof(data));
//	bypStream += sizeof(data);
//} // template <class T> void ReadData.
//----- 06.05.11 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

class MC4Document;

extern MC4Document*		g_pDoc;

//----- 06.05.11 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//extern IMpgMolipMain*	g_pMolipMainI;
//#define FFMainI			g_pMolipMainI
//#define FFUtilErrI      g_pMolipMainI->GetUtilErrI()
//#define FFUtilMathI     g_pMolipMainI->GetUtilMathI()
//#define FFUtilFileI     g_pMolipMainI->GetUtilFileI()
//#define FFUtilFontI     g_pMolipMainI->GetUtilFontI()
//#define FFUtilStrI      g_pMolipMainI->GetUtilStrI()
//#define FFUtilPrintI    g_pMolipMainI->GetUtilPrintI()
//#define FFUtilCoordI    g_pMolipMainI->GetUtilCoordI()
//#define FFUtilZlibPngI  g_pMolipMainI->GetUtilZlibPngI()
//#define FFUtilMiscI     g_pMolipMainI->GetUtilMisc()
//
//template<class T> T* FFClassCreate (T*)
//{
//	return g_pMolipMainI->GetClassInstanceI()->CreateDelete((T*)NULL);
//}
//
//template<class T> void FFClassDelete (T* p)
//{
//	if (p == NULL)
//		FFUtilErrI->ThrowMiscException(L"Error:FMpgClassDelete(NULL)");
//	g_pMolipMainI->GetClassInstanceI()->CreateDelete(p);
//}
//----- 06.05.11 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

#define ALIGNMENT4(x) ((long(x) / 4 + ((long(x) % 4) ? 1 : 0)) * 4)
#define ALIGNMENT8(x) ((long(x) / 8 + ((long(x) % 8) ? 1 : 0)) * 8)

#endif//__4GLOBAL_h
