spobject.h.svn-base

来自「股票软件源码」· SVN-BASE 代码 · 共 68 行

SVN-BASE
68
字号
/*
	Cross Platform Core Code.

	Copyright(R) 2001-2002 Balang Software.
	All rights reserved.

	Using:
		class	Object
*/
#if	!defined( __SP_OBJECT_H__ )
#define	__SP_OBJECT_H__

	class STKLIB_API Object
	{
	public:
		virtual	~Object();

		void*	operator new( size_t nSize );
		void*	operator new( size_t nSize, void *p);
		void	operator delete( void *p );

		#if	_MSC_VER>=1200
			void	operator delete(void* p, void* pPlace);
		#endif

#ifdef _DEBUG
		void*	operator new(size_t nSize, LPCSTR lpszFileName, int nLine);
	#if _MSC_VER >= 1200
        void PASCAL operator delete(void *p, LPCSTR lpszFileName, int nLine);
	#endif
#endif

// can't make Object instance directly.
	protected:
		Object();

	public:
		virtual	void	AssertValid( )	const;
		virtual	void	Dump( ) const;

////////////////////////////////////////////////////////////////
// Error status, provide record error status
	public:
		enum
		{
			#define	_SPRING(errCause)	errCause,
			#include	"SpObjErr.inl"
			#undef	_SPRING
			errorEnd
		};

		int			GetLastError( ) const;
		LPCSTR		GetLastErrorString( ) const;
	protected:
		void		SetLastError( int nErr );
	private:
		int			m_nErrorStatus;
	};

#ifdef	_SP_ENABLE_INLINES
#define	_SPOBJ_INLINE	inline
#include	"SpObject.inl"
#undef	_SPOBJ_INLINE
#endif

#endif // __SP_OBJECT_H__

⌨️ 快捷键说明

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