Annwvyn::AnnJsonLevel Class Reference

Level object loaded from a JSON file. More...

#include <AnnJsonLevel.hpp>

Inheritance diagram for Annwvyn::AnnJsonLevel:
Collaboration diagram for Annwvyn::AnnJsonLevel:

Classes

struct  AnnJson
 

Public Member Functions

 AnnJsonLevel (std::string path, bool preload=true)
 Construct a JSON level from a file. More...
 
 AnnJsonLevel (bool, std::string jsonCode, bool preload=true)
 Construct a json level from code. First boolean is thrown away. More...
 
virtual ~AnnJsonLevel ()
 Dtor. More...
 
void load () override
 Load method. This goes through the loaded JSON and create the object for you. More...
 
void runLogic () override
 Run logic, actually empty here. More...
 

Private Types

using AnnJsonOpaquePtr = std::unique_ptr< AnnJson >
 PimplPointerType. More...
 

Private Member Functions

void processJson ()
 Do initial processing on JSON. More...
 

Private Attributes

AnnJsonOpaquePtr jsonFile
 Pimpl. More...
 
const bool preloadResources
 If set to false, resource group will not be initialized. More...
 

Detailed Description

Level object loaded from a JSON file.

Definition at line 10 of file AnnJsonLevel.hpp.

Member Typedef Documentation

◆ AnnJsonOpaquePtr

PimplPointerType.

Definition at line 15 of file AnnJsonLevel.hpp.

Constructor & Destructor Documentation

◆ AnnJsonLevel() [1/2]

AnnJsonLevel::AnnJsonLevel ( std::string  path,
bool  preload = true 
)

Construct a JSON level from a file.

Definition at line 143 of file AnnJsonLevel.cpp.

Here is the call graph for this function:

◆ AnnJsonLevel() [2/2]

AnnJsonLevel::AnnJsonLevel ( bool  ,
std::string  jsonCode,
bool  preload = true 
)

Construct a json level from code. First boolean is thrown away.

Definition at line 171 of file AnnJsonLevel.cpp.

Here is the call graph for this function:

◆ ~AnnJsonLevel()

AnnJsonLevel::~AnnJsonLevel ( )
virtual

Dtor.

Definition at line 181 of file AnnJsonLevel.cpp.

Member Function Documentation

◆ load()

void AnnJsonLevel::load ( )
override

Load method. This goes through the loaded JSON and create the object for you.

Definition at line 185 of file AnnJsonLevel.cpp.

Here is the call graph for this function:

◆ processJson()

void AnnJsonLevel::processJson ( )
private

Do initial processing on JSON.

Definition at line 207 of file AnnJsonLevel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ runLogic()

void AnnJsonLevel::runLogic ( )
override

Run logic, actually empty here.

Definition at line 203 of file AnnJsonLevel.cpp.

Member Data Documentation

◆ jsonFile

AnnJsonOpaquePtr Annwvyn::AnnJsonLevel::jsonFile
private

Pimpl.

Definition at line 31 of file AnnJsonLevel.hpp.

◆ preloadResources

const bool Annwvyn::AnnJsonLevel::preloadResources
private

If set to false, resource group will not be initialized.

Definition at line 35 of file AnnJsonLevel.hpp.


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