#ifndef VCZH_GLOBALSTORAGE
#define VCZH_GLOBALSTORAGE
#include "Pointer.h"
#include "String.h"
namespace
{
class
:
public
,
private
{
private
:
bool
=
false
;
public
:
(
const
wchar_t
*
);
();
bool
();
virtual
void
() =
0
;
};
extern
*
(
const
wchar_t
*
);
extern
*
(
const
&
);
extern
void
();
extern
void
();
}
#define BEGIN_GLOBAL_STORAGE_CLASS(NAME) \
class NAME : public vl::GlobalStorage \
{ \
public: \
NAME() \
:vl::GlobalStorage(L ## #NAME) \
{ \
InitializeClearResource(); \
} \
~NAME() \
{ \
if(!Cleared())ClearResource(); \
} \
#define INITIALIZE_GLOBAL_STORAGE_CLASS \
void InitializeClearResource() \
{ \
#define FINALIZE_GLOBAL_STORAGE_CLASS \
} \
void ClearResource() \
{ \
#define END_GLOBAL_STORAGE_CLASS(NAME) \
} \
}; \
NAME& Get##NAME() \
{ \
static NAME __global_storage_##NAME; \
return __global_storage_##NAME; \
} \
#define EXTERN_GLOBAL_STORAGE_CLASS(NAME)\
class NAME;\
extern NAME& Get##NAME();\
#endif