ToyMaker Game Engine 0.0.2
ToyMaker is a game engine developed and maintained by Zoheb Shujauddin.
Loading...
Searching...
No Matches
ToyMaker::SoundFromFile Class Reference

JSON serialization of a sound resource loaded from a file. More...

#include <types.hpp>

Inheritance diagram for ToyMaker::SoundFromFile:
ToyMaker::ResourceConstructor< Sound, SoundFromFile > ToyMaker::IResourceConstructor

Public Member Functions

 SoundFromFile ()
 Creates a SoundFromFile object.
Public Member Functions inherited from ToyMaker::ResourceConstructor< Sound, SoundFromFile >
std::string getResourceConstructorName_ () const override
 Gets the resource constructor type string of the constructor.
Public Member Functions inherited from ToyMaker::IResourceConstructor
virtual ~IResourceConstructor ()=default
 Destroys this resource constructor (when the application is terminated.).

Static Public Member Functions

static std::string getResourceConstructorName ()
 Gets the resource constructor type string for this constructor.

Private Member Functions

std::shared_ptr< IResourcecreateResource (const nlohmann::json &methodParameters) override
 Creates a Sound resource based on its parameters.

Additional Inherited Members

Protected Member Functions inherited from ToyMaker::ResourceConstructor< Sound, SoundFromFile >
 ResourceConstructor (int explicitlyInitializeMe)
 Construct a new ResourceConstructor object.
Protected Member Functions inherited from ToyMaker::IResourceConstructor
 IResourceConstructor ()=default
 Construct a new IResourceConstructor object.
Static Protected Member Functions inherited from ToyMaker::IResourceConstructor
template<typename TResource, typename TResourceConstructor>
static void RegisterResourceConstructor ()
 Registers this resource constructor against its respective ResourceFactory during static initialization.

Detailed Description

JSON serialization of a sound resource loaded from a file.

Member Function Documentation

◆ createResource()

std::shared_ptr< IResource > SoundFromFile::createResource ( const nlohmann::json & methodParameters)
overrideprivatevirtual

Creates a Sound resource based on its parameters.

Parameters
methodParametersThe parameters associated with this model object.
Returns
std::shared_ptr<IResource> A reference to the constructed resource.

Implements ToyMaker::IResourceConstructor.

◆ getResourceConstructorName()

std::string ToyMaker::SoundFromFile::getResourceConstructorName ( )
inlinestatic

Gets the resource constructor type string for this constructor.

Returns
std::string This object's resource constructor type string.

The documentation for this class was generated from the following files:
  • ToyMaker_Main/include/toymaker/engine/sound/types.hpp
  • ToyMaker_Main/src/sound/types.cpp