Cyrus Mod Loader
Loading...
Searching...
No Matches
Cyrus::PropClassStorage Class Reference

#include <storage.h>

Public Member Functions

CYRUS void addPropertyClass (PropertyClass *propClass)
 
CYRUS void removePropertyClass (PropertyClass *propClass)
 
CYRUS PropertyClassfindByClassName (const std::string &className)
 Finds a PropertyClass by its class name.
 
CYRUS std::vector< PropertyClass * > findAllByClassName (const std::string &className)
 Finds all PropertyClass objects with the given class name.
 
CYRUS PropertyClasswaitForClass (const std::string &className, int timeout=5000)
 Waits for a PropertyClass with the given class name to be available.
 
CYRUS void debugWriteToFile (const std::string &filename)
 Writes the details of all PropertyClass objects to a file for debugging.
 
CYRUS std::unordered_map< std::string, int > getAllClasses ()
 

Member Function Documentation

◆ addPropertyClass()

void Cyrus::PropClassStorage::addPropertyClass ( PropertyClass * propClass)

◆ debugWriteToFile()

void Cyrus::PropClassStorage::debugWriteToFile ( const std::string & filename)

Writes the details of all PropertyClass objects to a file for debugging.

This method is thread-safe.

Parameters
filenameThe name of the file to write to.

◆ findAllByClassName()

std::vector< PropertyClass * > Cyrus::PropClassStorage::findAllByClassName ( const std::string & className)

Finds all PropertyClass objects with the given class name.

This method is thread-safe.

Parameters
classNameThe name of the class to find.
Returns
A vector of pointers to the found PropertyClass objects.

◆ findByClassName()

PropertyClass * Cyrus::PropClassStorage::findByClassName ( const std::string & className)

Finds a PropertyClass by its class name.

This method is thread-safe.

Parameters
classNameThe name of the class to find.
Returns
Pointer to the PropertyClass if found, nullptr otherwise.

◆ getAllClasses()

std::unordered_map< std::string, int > Cyrus::PropClassStorage::getAllClasses ( )

◆ removePropertyClass()

void Cyrus::PropClassStorage::removePropertyClass ( PropertyClass * propClass)

◆ waitForClass()

PropertyClass * Cyrus::PropClassStorage::waitForClass ( const std::string & className,
int timeout = 5000 )

Waits for a PropertyClass with the given class name to be available.

This method blocks until the PropertyClass is found or the timeout is reached.

Parameters
classNameThe name of the class to wait for.
timeoutThe maximum time to wait in milliseconds (default is 5000).
Returns
Pointer to the found PropertyClass if available, nullptr otherwise.