RigsofRods
Soft-body Physics Simulation
Data Structures | Public Member Functions | Private Member Functions | Private Attributes
RoR::ContentManager Class Reference

#include <ContentManager.h>

+ Inheritance diagram for RoR::ContentManager:
+ Collaboration diagram for RoR::ContentManager:

Data Structures

struct  ResourcePack
 

Public Member Functions

void AddResourcePack (ResourcePack const &resource_pack, std::string const &override_rgn="")
 Loads resources if not already loaded. More...
 
void InitManagedMaterials (std::string const &rg_name)
 
void InitContentManager ()
 
void InitModCache (CacheValidity validity)
 
void LoadGameplayResources ()
 Checks GVar settings and loads required resources. More...
 
std::string ListAllUserContent ()
 Used by ModCache for quick detection of added/removed content. More...
 
bool DeleteDiskFile (std::string const &filename, std::string const &rg_name)
 
bool LoadAndParseJson (std::string const &filename, std::string const &rg_name, rapidjson::Document &j_doc)
 
bool SerializeAndWriteJson (std::string const &filename, std::string const &rg_name, rapidjson::Document &j_doc)
 

Private Member Functions

Ogre::DataStreamPtr resourceLoading (const Ogre::String &name, const Ogre::String &group, Ogre::Resource *resource) override
 
void resourceStreamOpened (const Ogre::String &name, const Ogre::String &group, Ogre::Resource *resource, Ogre::DataStreamPtr &dataStream) override
 
bool resourceCollision (Ogre::Resource *resource, Ogre::ResourceManager *resourceManager) override
 
bool handleEvent (Ogre::ScriptCompiler *compiler, Ogre::ScriptCompilerEvent *evt, void *retval) override
 

Private Attributes

bool m_base_resource_loaded
 

Detailed Description

Definition at line 35 of file ContentManager.h.

Member Function Documentation

◆ AddResourcePack()

void ContentManager::AddResourcePack ( ResourcePack const &  resource_pack,
std::string const &  override_rgn = "" 
)

Loads resources if not already loaded.

Parameters
override_rgIf not set, the ResourcePack's RG is used -> resources won't unload until shutdown

Definition at line 98 of file ContentManager.cpp.

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

◆ DeleteDiskFile()

bool ContentManager::DeleteDiskFile ( std::string const &  filename,
std::string const &  rg_name 
)

Definition at line 515 of file ContentManager.cpp.

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

◆ handleEvent()

bool ContentManager::handleEvent ( Ogre::ScriptCompiler *  compiler,
Ogre::ScriptCompilerEvent *  evt,
void *  retval 
)
overrideprivate

Definition at line 339 of file ContentManager.cpp.

+ Here is the call graph for this function:

◆ InitContentManager()

void ContentManager::InitContentManager ( )

Definition at line 147 of file ContentManager.cpp.

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

◆ InitManagedMaterials()

void ContentManager::InitManagedMaterials ( std::string const &  rg_name)

Definition at line 372 of file ContentManager.cpp.

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

◆ InitModCache()

void ContentManager::InitModCache ( CacheValidity  validity)

Definition at line 248 of file ContentManager.cpp.

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

◆ ListAllUserContent()

std::string ContentManager::ListAllUserContent ( )

Used by ModCache for quick detection of added/removed content.

Definition at line 427 of file ContentManager.cpp.

+ Here is the caller graph for this function:

◆ LoadAndParseJson()

bool ContentManager::LoadAndParseJson ( std::string const &  filename,
std::string const &  rg_name,
rapidjson::Document &  j_doc 
)

Definition at line 452 of file ContentManager.cpp.

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

◆ LoadGameplayResources()

void ContentManager::LoadGameplayResources ( )

Checks GVar settings and loads required resources.

Definition at line 399 of file ContentManager.cpp.

+ Here is the caller graph for this function:

◆ resourceCollision()

bool ContentManager::resourceCollision ( Ogre::Resource *  resource,
Ogre::ResourceManager *  resourceManager 
)
overrideprivate

Definition at line 327 of file ContentManager.cpp.

+ Here is the call graph for this function:

◆ resourceLoading()

Ogre::DataStreamPtr ContentManager::resourceLoading ( const Ogre::String &  name,
const Ogre::String &  group,
Ogre::Resource *  resource 
)
overrideprivate

Definition at line 318 of file ContentManager.cpp.

◆ resourceStreamOpened()

void ContentManager::resourceStreamOpened ( const Ogre::String &  name,
const Ogre::String &  group,
Ogre::Resource *  resource,
Ogre::DataStreamPtr &  dataStream 
)
overrideprivate

Definition at line 323 of file ContentManager.cpp.

◆ SerializeAndWriteJson()

bool ContentManager::SerializeAndWriteJson ( std::string const &  filename,
std::string const &  rg_name,
rapidjson::Document &  j_doc 
)

Definition at line 482 of file ContentManager.cpp.

+ Here is the call graph for this function:

Field Documentation

◆ m_base_resource_loaded

bool RoR::ContentManager::m_base_resource_loaded
private

Definition at line 100 of file ContentManager.h.


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