Ogre::PageProvider Class Reference
Components » Paging

Abstract class that can be implemented by the user application to provide a way to retrieve or generate page data from a source of their choosing. More...

`#include <OgrePageManager.h>`

## Public Member Functions

| PageProvider ()
virtual | ~PageProvider ()
virtual bool | loadProceduralPage (Page *page, PagedWorldSection *section)
| Give a provider the opportunity to load page content procedurally. More...
virtual bool | prepareProceduralPage (Page *page, PagedWorldSection *section)
| Give a provider the opportunity to prepare page content procedurally. More...
virtual StreamSerialiser * | readPageStream (PageID pageID, PagedWorldSection *section)
| Get a serialiser set up to read Page data for the given PageID, or null if this provider cannot supply one. More...
virtual StreamSerialiser * | readWorldStream (const String &filename)
| Get a serialiser set up to read PagedWorld data for the given world filename. More...
virtual bool | unloadProceduralPage (Page *page, PagedWorldSection *section)
| Give a provider the opportunity to unload page content procedurally. More...
virtual bool | unprepareProceduralPage (Page *page, PagedWorldSection *section)
| Give a provider the opportunity to unprepare page content procedurally. More...
virtual StreamSerialiser * | writePageStream (PageID pageID, PagedWorldSection *section)
| Get a serialiser set up to write Page data for the given PageID, or null if this provider cannot supply one. More...
virtual StreamSerialiser * | writeWorldStream (const String &filename)
| Get a serialiser set up to write PagedWorld data for the given world filename. More...

## Detailed Description

Abstract class that can be implemented by the user application to provide a way to retrieve or generate page data from a source of their choosing.

Note
  All of the methods in this class can be called in a background, non-render thread.

Definition at line 59 of file OgrePageManager.h.

## Constructor & Destructor Documentation

## PageProvider()

Ogre::PageProvider::PageProvider | ( |  | ) |

Definition at line 62 of file OgrePageManager.h.

## ~PageProvider()

virtual Ogre::PageProvider::~PageProvider | ( |  | ) |

virtual

Definition at line 63 of file OgrePageManager.h.

## Member Function Documentation

## loadProceduralPage()

virtual bool Ogre::PageProvider::loadProceduralPage | ( | Page * | page,
|  | PagedWorldSection * | section
| ) |  |

virtual

Give a provider the opportunity to load page content procedurally.

Remarks
  This call will happen in the main render thread so it can access GPU resources. Use prepareProceduralPage for background preparation.

Returns
  true if the page was populated, false otherwise

Definition at line 78 of file OgrePageManager.h.

## prepareProceduralPage()

virtual bool Ogre::PageProvider::prepareProceduralPage | ( | Page * | page,
|  | PagedWorldSection * | section
| ) |  |

virtual

Give a provider the opportunity to prepare page content procedurally.

Remarks
  This call may well happen in a separate thread so it should not access GPU resources, use loadProceduralPage for that

Returns
  true if the page was populated, false otherwise

Definition at line 71 of file OgrePageManager.h.

## readPageStream()

virtual StreamSerialiser* Ogre::PageProvider::readPageStream | ( | PageID | pageID,
|  | PagedWorldSection * | section
| ) |  |

virtual

Get a serialiser set up to read Page data for the given PageID, or null if this provider cannot supply one.

Remarks
  The StreamSerialiser returned is the responsibility of the caller to delete.

Parameters

  pageID | The ID of the page being requested
  section | The parent section to which this page will belong

Definition at line 116 of file OgrePageManager.h.

## readWorldStream()

virtual StreamSerialiser* Ogre::PageProvider::readWorldStream | ( | const String & | filename | ) |

virtual

Get a serialiser set up to read PagedWorld data for the given world filename.

Remarks
  The StreamSerialiser returned is the responsibility of the caller to delete.

Definition at line 101 of file OgrePageManager.h.

## unloadProceduralPage()

virtual bool Ogre::PageProvider::unloadProceduralPage | ( | Page * | page,
|  | PagedWorldSection * | section
| ) |  |

virtual

Give a provider the opportunity to unload page content procedurally.

Remarks
  You should not call this method directly. This call will happen in the main render thread so it can access GPU resources. Use _unprepareProceduralPage for background preparation.

Returns
  true if the page was populated, false otherwise

Definition at line 86 of file OgrePageManager.h.

## unprepareProceduralPage()

virtual bool Ogre::PageProvider::unprepareProceduralPage | ( | Page * | page,
|  | PagedWorldSection * | section
| ) |  |

virtual

Give a provider the opportunity to unprepare page content procedurally.

Remarks
  You should not call this method directly. This call may well happen in a separate thread so it should not access GPU resources, use _unloadProceduralPage for that

Returns
  true if the page was unpopulated, false otherwise

Definition at line 94 of file OgrePageManager.h.

## writePageStream()

virtual StreamSerialiser* Ogre::PageProvider::writePageStream | ( | PageID | pageID,
|  | PagedWorldSection * | section
| ) |  |

virtual

Get a serialiser set up to write Page data for the given PageID, or null if this provider cannot supply one.

Remarks
  The StreamSerialiser returned is the responsibility of the caller to delete.

Parameters

  pageID | The ID of the page being requested
  section | The parent section to which this page will belong

Definition at line 126 of file OgrePageManager.h.

## writeWorldStream()

virtual StreamSerialiser* Ogre::PageProvider::writeWorldStream | ( | const String & | filename | ) |

virtual

Get a serialiser set up to write PagedWorld data for the given world filename.

Remarks
  The StreamSerialiser returned is the responsibility of the caller to delete.

Definition at line 107 of file OgrePageManager.h.

The documentation for this class was generated from the following file:

- OgrePageManager.h

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.