Adding skeletons of new paging classes.

This commit is contained in:
David Williams 2013-06-16 18:25:20 +02:00
parent a1d773f5e7
commit f86ec57e14
2 changed files with 111 additions and 0 deletions

View File

@ -0,0 +1,63 @@
/*******************************************************************************
Copyright (c) 2005-2009 David Williams
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
*******************************************************************************/
#ifndef __PolyVox_FilePager_H__
#define __PolyVox_FilePager_H__
#include "PolyVoxCore/Impl/TypeDef.h"
#include "PolyVoxCore/Pager.h"
#include <fstream>
#include <string>
namespace PolyVox
{
/**
* Provides an interface for performing paging of data.
*/
class FilePager : public Pager
{
public:
/// Constructor
FilePager(const std::string& strFolderName)
:Pager()
{
}
/// Destructor
virtual ~FilePager() {};
virtual void dataRequiredHandler(const ConstVolumeProxy<VoxelType>& volumeProxy, const Region& region)
{
}
virtual void dataOverflowHandler(const ConstVolumeProxy<VoxelType>& volumeProxy, const Region& region)
{
}
protected:
std::string m_strFolderName;
}
#endif //__PolyVox_FilePager_H__

View File

@ -0,0 +1,48 @@
/*******************************************************************************
Copyright (c) 2005-2009 David Williams
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
*******************************************************************************/
#ifndef __PolyVox_Pager_H__
#define __PolyVox_Pager_H__
#include "PolyVoxCore/Impl/TypeDef.h"
#include "PolyVoxCore/ConstVolumeProxy.h"
namespace PolyVox
{
/**
* Provides an interface for performing paging of data.
*/
class Pager
{
public:
/// Constructor
Pager() {};
/// Destructor
virtual ~Pager() {};
virtual void dataRequiredHandler(const ConstVolumeProxy<VoxelType>& volumeProxy, const Region& region);
virtual void dataOverflowHandler(const ConstVolumeProxy<VoxelType>& volumeProxy, const Region& region);
}
#endif //__PolyVox_Pager_H__