📄 ogrepaginglandscapequeue.h
字号:
/***************************************************************************
OgrePagingLandScapeQueue.h - description
-------------------
begin : Mon Aug 04 2003
copyright : (C) 2003 by Jose A. Milan
email : spoke2@supercable.es
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as *
* published by the Free Software Foundation; either version 2 of the *
* License, or (at your option) any later version. *
* *
***************************************************************************/
#ifndef PAGINGLANDSCAPEQUEUE_H
#define PAGINGLANDSCAPEQUEUE_H
#include <queue>
namespace Ogre {
/** This class holds classes T given to it by the plugin in a FIFO queue. */
template<class T>
class PagingLandScapeQueue
{
public:
//-----------------------------------------------------------------------
PagingLandScapeQueue( )
{
};
//-----------------------------------------------------------------------
virtual ~PagingLandScapeQueue( )
{
while ( mQueue.size() > 0 )
{
//T* tmp = mQueue.front( );
mQueue.pop( );
//delete tmp;
}
};
//-----------------------------------------------------------------------
void push( T* e )
{
mQueue.push( e );
};
//-----------------------------------------------------------------------
T* pop( )
{
T* tmp = 0;
if ( mQueue.size() > 0 )
{
tmp = mQueue.front( );
mQueue.pop( );
}
return tmp;
};
//-----------------------------------------------------------------------
int getSize( ) const
{
return (int)mQueue.size( );
};
protected:
std::queue< T* > mQueue;
};
} //namespace
#endif //PAGINGLANDSCAPEQUEUE_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -