YAPOG  0.0.1
Yet Another Pokemon Online Game
yap::ContentManager Class Reference

#include <ContentManager.hpp>

Collaboration diagram for yap::ContentManager:

List of all members.

Public Member Functions

void Init (const Path &rootPath)
const PathGetContentPath () const
void SetImagePath (const Path &path)
void SetTexturePath (const Path &path)
void SetFontPath (const Path &path)
void SetSoundBufferPath (const Path &path)
void SetMusicPath (const Path &path)
sf::Image & LoadImage (const String &name)
sf::Texture & LoadTexture (const String &name)
sf::Font & LoadFont (const String &name)
sf::SoundBuffer & LoadSoundBuffer (const String &name)
sf::Music & LoadMusic (const String &name)
void UnloadImage (const String &name)
void UnloadTexture (const String &name)
void UnloadFont (const String &name)
void UnloadSoundBuffer (const String &name)
void UnloadMusic (const String &name)
IFStreamLoadFile (const String &name, IFStream &iFStream)
IFStreamLoadFile (const Path &rootPath, const ID &id, IFStream &iFStream)

Static Public Member Functions

static ContentManagerInstance ()

Private Member Functions

 DISALLOW_COPY (ContentManager)
 ContentManager (const Path &rootPath)
 ~ContentManager ()

Private Attributes

Path rootPath_
Path imagePath_
Path texturePath_
Path fontPath_
Path soundBufferPath_
Path musicPath_
collection::Map< String,
sf::Image * > 
images_
collection::Map< String,
sf::Texture * > 
textures_
collection::Map< String,
sf::Font * > 
fonts_
collection::Map< String,
sf::SoundBuffer * > 
soundBuffers_
collection::Map< String,
sf::Music * > 
musics_

Static Private Attributes

static const Path DEFAULT_ROOT_PATH = Path ("Content/")
static const Path DEFAULT_IMAGE_PATH = Path ("Image/")
static const Path DEFAULT_TEXTURE_PATH = Path ("Image/")
static const Path DEFAULT_FONT_PATH = Path ("Font/")
static const Path DEFAULT_SOUND_BUFFER_PATH = Path ("Sound/")
static const Path DEFAULT_MUSIC_PATH = Path ("Sound/")
static const String DEFAULT_DATA_RESOURCE_FILE_EXTENSION = ".xml"

Detailed Description

Definition at line 20 of file ContentManager.hpp.


Constructor & Destructor Documentation

yap::ContentManager::ContentManager ( const Path rootPath)
private

Definition at line 18 of file ContentManager.cpp.

yap::ContentManager::~ContentManager ( )
private

Definition at line 33 of file ContentManager.cpp.


Member Function Documentation

yap::ContentManager::DISALLOW_COPY ( ContentManager  )
private
const Path & yap::ContentManager::GetContentPath ( ) const

Definition at line 63 of file ContentManager.cpp.

void yap::ContentManager::Init ( const Path rootPath)

Definition at line 58 of file ContentManager.cpp.

Here is the caller graph for this function:

ContentManager & yap::ContentManager::Instance ( )
static

Definition at line 51 of file ContentManager.cpp.

Here is the caller graph for this function:

IFStream & yap::ContentManager::LoadFile ( const String name,
IFStream iFStream 
)

Definition at line 203 of file ContentManager.cpp.

Here is the caller graph for this function:

IFStream & yap::ContentManager::LoadFile ( const Path rootPath,
const ID id,
IFStream iFStream 
)

Definition at line 215 of file ContentManager.cpp.

Here is the call graph for this function:

sf::Font & yap::ContentManager::LoadFont ( const String name)

Definition at line 125 of file ContentManager.cpp.

Here is the call graph for this function:

sf::Image & yap::ContentManager::LoadImage ( const String name)

Definition at line 93 of file ContentManager.cpp.

Here is the call graph for this function:

sf::Music & yap::ContentManager::LoadMusic ( const String name)

Definition at line 157 of file ContentManager.cpp.

Here is the call graph for this function:

sf::SoundBuffer & yap::ContentManager::LoadSoundBuffer ( const String name)

Definition at line 141 of file ContentManager.cpp.

Here is the call graph for this function:

sf::Texture & yap::ContentManager::LoadTexture ( const String name)

Definition at line 109 of file ContentManager.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void yap::ContentManager::SetFontPath ( const Path path)

Definition at line 78 of file ContentManager.cpp.

Here is the caller graph for this function:

void yap::ContentManager::SetImagePath ( const Path path)

Definition at line 68 of file ContentManager.cpp.

void yap::ContentManager::SetMusicPath ( const Path path)

Definition at line 88 of file ContentManager.cpp.

Here is the caller graph for this function:

void yap::ContentManager::SetSoundBufferPath ( const Path path)

Definition at line 83 of file ContentManager.cpp.

Here is the caller graph for this function:

void yap::ContentManager::SetTexturePath ( const Path path)

Definition at line 73 of file ContentManager.cpp.

Here is the caller graph for this function:

void yap::ContentManager::UnloadFont ( const String name)

Definition at line 185 of file ContentManager.cpp.

Here is the call graph for this function:

void yap::ContentManager::UnloadImage ( const String name)

Definition at line 173 of file ContentManager.cpp.

Here is the call graph for this function:

void yap::ContentManager::UnloadMusic ( const String name)

Definition at line 197 of file ContentManager.cpp.

Here is the call graph for this function:

void yap::ContentManager::UnloadSoundBuffer ( const String name)

Definition at line 191 of file ContentManager.cpp.

Here is the call graph for this function:

void yap::ContentManager::UnloadTexture ( const String name)

Definition at line 179 of file ContentManager.cpp.

Here is the call graph for this function:


Member Data Documentation

const String yap::ContentManager::DEFAULT_DATA_RESOURCE_FILE_EXTENSION = ".xml"
staticprivate

Definition at line 67 of file ContentManager.hpp.

const Path yap::ContentManager::DEFAULT_FONT_PATH = Path ("Font/")
staticprivate

Definition at line 63 of file ContentManager.hpp.

const Path yap::ContentManager::DEFAULT_IMAGE_PATH = Path ("Image/")
staticprivate

Definition at line 61 of file ContentManager.hpp.

const Path yap::ContentManager::DEFAULT_MUSIC_PATH = Path ("Sound/")
staticprivate

Definition at line 65 of file ContentManager.hpp.

const Path yap::ContentManager::DEFAULT_ROOT_PATH = Path ("Content/")
staticprivate

Definition at line 60 of file ContentManager.hpp.

const Path yap::ContentManager::DEFAULT_SOUND_BUFFER_PATH = Path ("Sound/")
staticprivate

Definition at line 64 of file ContentManager.hpp.

const Path yap::ContentManager::DEFAULT_TEXTURE_PATH = Path ("Image/")
staticprivate

Definition at line 62 of file ContentManager.hpp.

Path yap::ContentManager::fontPath_
private

Definition at line 73 of file ContentManager.hpp.

collection::Map<String, sf::Font*> yap::ContentManager::fonts_
private

Definition at line 79 of file ContentManager.hpp.

Path yap::ContentManager::imagePath_
private

Definition at line 71 of file ContentManager.hpp.

collection::Map<String, sf::Image*> yap::ContentManager::images_
private

Definition at line 77 of file ContentManager.hpp.

Path yap::ContentManager::musicPath_
private

Definition at line 75 of file ContentManager.hpp.

collection::Map<String, sf::Music*> yap::ContentManager::musics_
private

Definition at line 81 of file ContentManager.hpp.

Path yap::ContentManager::rootPath_
private

Definition at line 69 of file ContentManager.hpp.

Path yap::ContentManager::soundBufferPath_
private

Definition at line 74 of file ContentManager.hpp.

collection::Map<String, sf::SoundBuffer*> yap::ContentManager::soundBuffers_
private

Definition at line 80 of file ContentManager.hpp.

Path yap::ContentManager::texturePath_
private

Definition at line 72 of file ContentManager.hpp.

collection::Map<String, sf::Texture*> yap::ContentManager::textures_
private

Definition at line 78 of file ContentManager.hpp.


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