Vigilante Game Framework  1.0.0.8
A 2D/3D C++ Game Framework using SFML.
Public Member Functions | List of all members
VContent Class Reference

Content Management System for loading and storing Textures, Fonts and Sound Effects. More...

#include <VContent.h>

Public Member Functions

bool TextureExists (const sf::String &name)
 
bool ImageExists (const sf::String &name)
 
bool FontExists (const sf::String &name)
 
bool SoundExists (const sf::String &name)
 
sf::Texture & LoadTexture (const sf::String &name)
 
sf::Image & LoadImage (const sf::String &name)
 
sf::Font & LoadFont (const sf::String &name)
 
sf::SoundBuffer & LoadSound (const sf::String &name)
 
bool StoreTexture (const sf::String &name, const sf::Texture &texture)
 
bool StoreImage (const sf::String &name, const sf::Image &image)
 
bool StoreFont (const sf::String &name, const sf::Font &font)
 
bool StoreSound (const sf::String &name, const sf::SoundBuffer &sound)
 
bool UnloadTexture (const sf::String &name)
 
bool UnloadImage (const sf::String &name)
 
bool UnloadFont (const sf::String &name)
 
bool UnloadSound (const sf::String &name)
 
void UnloadAll ()
 Unload All Content.
 

Detailed Description

Content Management System for loading and storing Textures, Fonts and Sound Effects.

Member Function Documentation

◆ FontExists()

bool VContent::FontExists ( const sf::String &  name)
Parameters
nameFile path of the font used for the sf::Font object.
Returns
True if sf::Font is stored in the content handler.

◆ ImageExists()

bool VContent::ImageExists ( const sf::String &  name)
Parameters
nameFile path of the texture used for the sf::Image object.
Returns
True if sf::Image is stored in the content handler.

◆ LoadFont()

sf::Font& VContent::LoadFont ( const sf::String &  name)

Loads/Gets font by name to an sf::Font object.

Parameters
nameFile path of the font used for the sf::Font object.
Returns
True if sf::Font is stored in the content handler.

◆ LoadImage()

sf::Image& VContent::LoadImage ( const sf::String &  name)

Loads/Gets image by name to an sf::Image object.

Parameters
nameFile path of the texture used for the sf::Image object.
Returns
True if sf::Image is stored in the content handler.

◆ LoadSound()

sf::SoundBuffer& VContent::LoadSound ( const sf::String &  name)

Loads/Gets sound by name to an sf::SoundBuffer object.

Parameters
nameFile path of the sound file used for the sf::SoundBuffer object.
Returns
True if sf::SoundBuffer is stored in the content handler.

◆ LoadTexture()

sf::Texture& VContent::LoadTexture ( const sf::String &  name)

Loads/Gets texture by name to an sf::Texture object.

Parameters
nameFile path of the texture used for the sf::Texture object.
Returns
Reference of the sf::Texture if found. A runtime error will be thrown if not found or cannot be loaded.

◆ SoundExists()

bool VContent::SoundExists ( const sf::String &  name)
Parameters
nameFile path of the sound file used for the sf::SoundBuffer object.
Returns
True if sf::SoundBuffer is stored in the content handler.

◆ StoreFont()

bool VContent::StoreFont ( const sf::String &  name,
const sf::Font &  font 
)

Store preloaded Font with a name.

Parameters
nameFile path of the texture used for the sf::Font object.
fontFont object to store.
Returns
True if sf::Font is stored in the content handler.

◆ StoreImage()

bool VContent::StoreImage ( const sf::String &  name,
const sf::Image &  image 
)

Store preloaded Image with a name.

Parameters
nameFile path of the image used for the sf::Image object.
imageImage object to store.
Returns
True if sf::Image is stored in the content handler.

◆ StoreSound()

bool VContent::StoreSound ( const sf::String &  name,
const sf::SoundBuffer &  sound 
)

Store preloaded Sound with a name.

Parameters
nameFile path of the texture used for the sf::SoundBuffer object.
soundSound object to store.
Returns
True if sf::SoundBuffer is stored in the content handler.

◆ StoreTexture()

bool VContent::StoreTexture ( const sf::String &  name,
const sf::Texture &  texture 
)

Store preloaded Texture with a name.

Parameters
nameFile path of the texture used for the sf::Texture object.
textureTexture object to store.
Returns
True if sf::Texture is stored in the content handler.

◆ TextureExists()

bool VContent::TextureExists ( const sf::String &  name)
Parameters
nameFile path of the texture used for the sf::Texture object.
Returns
True if sf::Texture is stored in the content handler.

◆ UnloadFont()

bool VContent::UnloadFont ( const sf::String &  name)

Unload Font

Parameters
nameFile path of the font used for the sf::Font object.
Returns
True if sf::Font is stored in the content handler.

◆ UnloadImage()

bool VContent::UnloadImage ( const sf::String &  name)

Unload Image

Parameters
nameFile path of the image used for the sf::Image object.
Returns
True if sf::Image is stored in the content handler.

◆ UnloadSound()

bool VContent::UnloadSound ( const sf::String &  name)

Unload Sound

Parameters
nameFile path of the sound file used for the sf::SoundBuffer object.
Returns
True if sf::SoundBuffer is stored in the content handler.

◆ UnloadTexture()

bool VContent::UnloadTexture ( const sf::String &  name)

Unload Texture

Parameters
nameFile path of the texture used for the sf::Texture object.
Returns
True if sf::Texture is stored in the content handler.

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