icestack.h

来自「赫赫大名的 OGRE 游戏引擎」· C头文件 代码 · 共 42 行

H
42
字号
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
 *	Contains simple stacks.
 *	\file		IceStack.h
 *	\author		Pierre Terdiman
 *	\date		February, 5, 2000
 */
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Include Guard
#ifndef __ICESTACK_H__
#define __ICESTACK_H__

	class ICECORE_API LIFOStack : public Container
	{
		public:
		//! Constructor
								LIFOStack()					{}
		//! Destructor
								~LIFOStack()				{}
		// Management
		inline_	LIFOStack&		Push(udword entry)			{	Add(entry);	return *this;	}
				bool			Pop(udword &entry);
	};

	class ICECORE_API FIFOStack : public Container
	{
		public:
		//! Constructor
								FIFOStack() : mCurIndex(0)	{}
		//! Destructor
								~FIFOStack()				{}
		// Management
		inline_	FIFOStack&		Push(udword entry)			{	Add(entry);	return *this;	}
				bool			Pop(udword &entry);
		private:
				udword			mCurIndex;			//!< Current index within the container
	};

#endif // __ICESTACK_H__

⌨️ 快捷键说明

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