📄 mfx_function.h
字号:
//-- {CycleCode: 266} file [0..894]
//-- {StartSubRegion: 268} module.ifndef [0..218]
// MFX_Function.h: interface for the MFX_Function class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_MFX_FUNCTION_H__A46D2661_B869_46BB_83D9_D13E42EAA48A__INCLUDED_)
//-- {StartSubRegion: 269} module.define [219..295]
#define AFX_MFX_FUNCTION_H__A46D2661_B869_46BB_83D9_D13E42EAA48A__INCLUDED_
//-- {AddDecl: 267} module.vulnerableDeclarations [296..804]
//## begin module.epilog preserve=yes
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
//获取Model文件夹
CString MFXGetModelPath();
long MFXRounding(double x);
void * MFXGetMemShareBlack(UINT nSize = 1);
//释放共用内存块
void MFXUnLockMemShareBlack();
template < typename T >
class Singleton
{
static T * ms_Singeton;
public:
Singleton ()
{
ASSERT( ! ms_Singeton );
int offset = (int) (T*)1-(int)(Singleton <T> *)(T*)1;
ms_Singeton = (T *) ((int)this + offset);
}
~Singleton()
{
ASSERT( ms_Singeton );
ms_Singeton = 0;
}
static T& GetSingleton()
{
ASSERT( ms_Singeton );
return ( * ms_Singeton );
}
static T* GetSignleton()
{
return ms_Singeton;
}
};
template < typename T> T* Singleton<T>::ms_Singeton = 0;
//template <typename MyTYPE >
//inline MyTYPE * MFXAllot( )
//{
// return NULL;
//}
//## end module.epilog
//-- {StartSubRegion: 270} module.endif [805..894]
#endif // !defined(AFX_MFX_FUNCTION_H__A46D2661_B869_46BB_83D9_D13E42EAA48A__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -