From f86ec57e142bbd46822850d534538e03d7352a21 Mon Sep 17 00:00:00 2001 From: David Williams Date: Sun, 16 Jun 2013 18:25:20 +0200 Subject: [PATCH] Adding skeletons of new paging classes. --- .../include/PolyVoxCore/FilePager.h | 63 +++++++++++++++++++ .../PolyVoxCore/include/PolyVoxCore/Pager.h | 48 ++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 library/PolyVoxCore/include/PolyVoxCore/FilePager.h create mode 100644 library/PolyVoxCore/include/PolyVoxCore/Pager.h diff --git a/library/PolyVoxCore/include/PolyVoxCore/FilePager.h b/library/PolyVoxCore/include/PolyVoxCore/FilePager.h new file mode 100644 index 00000000..49ac5637 --- /dev/null +++ b/library/PolyVoxCore/include/PolyVoxCore/FilePager.h @@ -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 +#include + +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& volumeProxy, const Region& region) + { + } + + virtual void dataOverflowHandler(const ConstVolumeProxy& volumeProxy, const Region& region) + { + } + + protected: + std::string m_strFolderName; +} + +#endif //__PolyVox_FilePager_H__ diff --git a/library/PolyVoxCore/include/PolyVoxCore/Pager.h b/library/PolyVoxCore/include/PolyVoxCore/Pager.h new file mode 100644 index 00000000..1281fdba --- /dev/null +++ b/library/PolyVoxCore/include/PolyVoxCore/Pager.h @@ -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& volumeProxy, const Region& region); + virtual void dataOverflowHandler(const ConstVolumeProxy& volumeProxy, const Region& region); +} + +#endif //__PolyVox_Pager_H__