V-Gears 0
Free Final Fantasy VII engine.
VGears::MapListFile Class Reference

Handles map list files. More...

#include <VGearsMapListFile.h>

Inheritance diagram for VGears::MapListFile:
Collaboration diagram for VGears::MapListFile:

Public Member Functions

 MapListFile (Ogre::ResourceManager *creator, const String &name, Ogre::ResourceHandle handle, const String &group, bool is_manual=false, Ogre::ManualResourceLoader *loader=nullptr)
 Constructor. More...
 
virtual ~MapListFile ()
 Destructor. More...
 
const std::vector< std::string > GetMapList () const
 Retrieves the list of maps. More...
 
- Public Member Functions inherited from VGears::Resource
 Resource (Ogre::ResourceManager *creator, const String &name, Ogre::ResourceHandle handle, const String &group, bool manual, Ogre::ManualResourceLoader *loader)
 Constructor. More...
 
virtual ~Resource ()=default
 Destructor. More...
 

Static Public Attributes

static const String RESOURCE_TYPE
 The type of resource. More...
 

Protected Member Functions

virtual void loadImpl () override
 Loads the file. More...
 
virtual void unloadImpl () override
 Unloads the file. More...
 
virtual size_t calculateSize (void) const override
 Calculates the size of the map list. More...
 
- Protected Member Functions inherited from VGears::Resource
virtual Ogre::DataStreamPtr openResource ()
 Opens the resource. More...
 

Private Attributes

std::vector< std::string > map_list_
 The list of maps. More...
 

Friends

class MapListFileSerializer
 

Detailed Description

Handles map list files.

Constructor & Destructor Documentation

◆ MapListFile()

VGears::MapListFile::MapListFile ( Ogre::ResourceManager *  creator,
const String name,
Ogre::ResourceHandle  handle,
const String group,
bool  is_manual = false,
Ogre::ManualResourceLoader *  loader = nullptr 
)

Constructor.

Parameters
[in]creatorPointer to the ResourceManager that is creating this resource.
[in]nameThe unique name of the resource.
[in]handle
Todo:
Understand and document.
Parameters
[in]groupThe name of the resource group to which this resource belong.
[in]is_manualTrue if the resource is manually loaded, false otherwise.
[in]loaderPointer to a ManualResourceLoader implementation which will be called when the Resource wishes to load (should be supplied if is_manual is set to true). It can be null, but the Resource will never be able to reload if anything ever causes it to unload. Therefore provision of a proper ManualResourceLoader instance is strongly recommended.

◆ ~MapListFile()

VGears::MapListFile::~MapListFile ( )
virtual

Destructor.

Member Function Documentation

◆ calculateSize()

size_t VGears::MapListFile::calculateSize ( void  ) const
overrideprotectedvirtual

Calculates the size of the map list.

Returns
The size of the map list.
Todo:
Units?

◆ GetMapList()

const std::vector< std::string > VGears::MapListFile::GetMapList ( ) const
inline

Retrieves the list of maps.

Returns
The list of maps.

◆ loadImpl()

void VGears::MapListFile::loadImpl ( void  )
overrideprotectedvirtual

Loads the file.

◆ unloadImpl()

void VGears::MapListFile::unloadImpl ( void  )
overrideprotectedvirtual

Unloads the file.

Friends And Related Function Documentation

◆ MapListFileSerializer

friend class MapListFileSerializer
friend

Member Data Documentation

◆ map_list_

std::vector<std::string> VGears::MapListFile::map_list_
private

The list of maps.

◆ RESOURCE_TYPE

const String VGears::MapListFile::RESOURCE_TYPE
static

The type of resource.


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