vfxpointer.h

来自「获取文件的生产厂商和版本号信息」· C头文件 代码 · 共 39 行

H
39
字号
//-------------------------------------------------------------------------------
// Pointer class
// Acts like a pointer. Cleans memory in destructor.
//
// Designed and coded by Gene M. Angelo
// Copyright (c) 2001 Gene M. Angelo
//
// This code is made public domain by the author it may be used in products 
// commercial or otherwise as long as all copyright notices remain in tact.
//-------------------------------------------------------------------------------

//-------------------------------------------------------------------------------
#ifndef _VFXPOINTER_H_
#define _VFXPOINTER_H_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

//-------------------------------------------------------------------------------
class CVFXPointer : public CObject  
	{
	DECLARE_DYNAMIC(CVFXPointer)
	public:
		CVFXPointer(void* pPtr = NULL, bool bAutoDelete = true);
		virtual ~CVFXPointer();

	public:
		void* GetPtr();
		bool IsNull() const;
		void operator = (void* pPtr);

	private:
		void* m_pPtr;
		bool m_bAutoDelete;
	};

#endif // #ifndef _VFXPOINTER_H_

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?