Definition at line 20 of file Mapcycle.h.
#include <Mapcycle.h>
◆ Mapcycle() [1/3]
proofps_dd::Mapcycle::Mapcycle |
( |
| ) |
|
◆ ~Mapcycle()
proofps_dd::Mapcycle::~Mapcycle |
( |
| ) |
|
◆ Mapcycle() [2/3]
proofps_dd::Mapcycle::Mapcycle |
( |
const Mapcycle & | | ) |
|
|
delete |
◆ Mapcycle() [3/3]
proofps_dd::Mapcycle::Mapcycle |
( |
Mapcycle && | | ) |
|
|
delete |
◆ availableMapsAdd() [1/2]
bool proofps_dd::Mapcycle::availableMapsAdd |
( |
const std::string & | sMapFilename | ) |
|
|
protected |
◆ availableMapsAdd() [2/2]
bool proofps_dd::Mapcycle::availableMapsAdd |
( |
const std::vector< std::string > & | vMapFilenames | ) |
|
|
protected |
◆ availableMapsGet()
const std::set< std::string > & proofps_dd::Mapcycle::availableMapsGet |
( |
| ) |
const |
◆ availableMapsGetAsCharPtrArray()
const char ** proofps_dd::Mapcycle::availableMapsGetAsCharPtrArray |
( |
| ) |
const |
This is convenience function to be used with GUI: Dear ImGUI requires this kind of array as source of items of Listbox.
It is better if Maps provide it so we can avoid inconsistency. The elements are the same as in the availableMapsGet() container.
- Returns
- A char array with same size as the availableMapsGet() container, where all elements point to the corresponding null-terminated string of the string object of the availableMapsGet() container. Null when size of availableMapsGet() container is 0.
Definition at line 146 of file Mapcycle.cpp.
◆ availableMapsGetElem()
const std::string & proofps_dd::Mapcycle::availableMapsGetElem |
( |
const size_t & | index | ) |
const |
◆ availableMapsNoChangingGet()
const std::set< std::string > & proofps_dd::Mapcycle::availableMapsNoChangingGet |
( |
| ) |
const |
◆ availableMapsNoChangingGetElem()
const std::string & proofps_dd::Mapcycle::availableMapsNoChangingGetElem |
( |
const size_t & | index | ) |
const |
◆ availableMapsRefresh()
void proofps_dd::Mapcycle::availableMapsRefresh |
( |
| ) |
|
|
protected |
◆ availableMapsRefreshCharPtrArray()
void proofps_dd::Mapcycle::availableMapsRefreshCharPtrArray |
( |
| ) |
|
|
private |
◆ availableMapsRemove() [1/3]
bool proofps_dd::Mapcycle::availableMapsRemove |
( |
const size_t & | index | ) |
|
|
protected |
◆ availableMapsRemove() [2/3]
bool proofps_dd::Mapcycle::availableMapsRemove |
( |
const std::string & | sMapFilename | ) |
|
|
protected |
◆ availableMapsRemove() [3/3]
bool proofps_dd::Mapcycle::availableMapsRemove |
( |
const std::vector< std::string > & | vMapFilenames | ) |
|
|
protected |
◆ getConsole()
CConsole & proofps_dd::Mapcycle::getConsole |
( |
| ) |
const |
◆ getLoggerModuleName()
const char * proofps_dd::Mapcycle::getLoggerModuleName |
( |
| ) |
|
|
static |
◆ initialize()
bool proofps_dd::Mapcycle::initialize |
( |
| ) |
|
Updates list of available maps and mapcycle content.
- Returns
- True on success, false otherwise.
Definition at line 76 of file Mapcycle.cpp.
◆ isInitialized()
bool proofps_dd::Mapcycle::isInitialized |
( |
| ) |
const |
◆ isValidMapFilename()
bool proofps_dd::Mapcycle::isValidMapFilename |
( |
const std::string & | sFilename | ) |
|
|
static |
◆ lineShouldBeIgnored()
bool proofps_dd::Mapcycle::lineShouldBeIgnored |
( |
const std::string & | sLine | ) |
|
|
staticprivate |
◆ mapcycle_availableMaps_Synchronize()
void proofps_dd::Mapcycle::mapcycle_availableMaps_Synchronize |
( |
| ) |
|
This one is recommended during initialization, since it reloads both the mapcycle and available maps list, and makes sure they become disjoint sets.
Definition at line 278 of file Mapcycle.cpp.
◆ mapcycleAdd() [1/3]
bool proofps_dd::Mapcycle::mapcycleAdd |
( |
const std::set< std::string > & | vMapFilenames | ) |
|
|
protected |
◆ mapcycleAdd() [2/3]
bool proofps_dd::Mapcycle::mapcycleAdd |
( |
const std::string & | sMapFilename | ) |
|
|
protected |
◆ mapcycleAdd() [3/3]
bool proofps_dd::Mapcycle::mapcycleAdd |
( |
const std::vector< std::string > & | vMapFilenames | ) |
|
|
protected |
◆ mapcycleAdd_availableMapsRemove() [1/3]
bool proofps_dd::Mapcycle::mapcycleAdd_availableMapsRemove |
( |
| ) |
|
◆ mapcycleAdd_availableMapsRemove() [2/3]
bool proofps_dd::Mapcycle::mapcycleAdd_availableMapsRemove |
( |
const std::string & | sMapFilename | ) |
|
◆ mapcycleAdd_availableMapsRemove() [3/3]
bool proofps_dd::Mapcycle::mapcycleAdd_availableMapsRemove |
( |
const std::vector< std::string > & | vMapFilenames | ) |
|
◆ mapcycleClear()
void proofps_dd::Mapcycle::mapcycleClear |
( |
| ) |
|
|
protected |
◆ mapcycleForwardToLast()
std::string proofps_dd::Mapcycle::mapcycleForwardToLast |
( |
| ) |
|
◆ mapcycleGet()
const std::vector< std::string > & proofps_dd::Mapcycle::mapcycleGet |
( |
| ) |
const |
◆ mapcycleGetAsCharPtrArray()
const char ** proofps_dd::Mapcycle::mapcycleGetAsCharPtrArray |
( |
| ) |
const |
This is convenience function to be used with GUI: Dear ImGUI requires this kind of array as source of items of Listbox.
It is better if Maps provide it so we can avoid inconsistency. The elements are the same as in the mapcycleGet() container.
- Returns
- A char array with same size as the mapcycleGet() container, where all elements point to the corresponding null-terminated string of the string object of the mapcycleGet() container. Null when size of mapcycleGet() container is 0.
Definition at line 183 of file Mapcycle.cpp.
◆ mapcycleGetCurrent()
std::string proofps_dd::Mapcycle::mapcycleGetCurrent |
( |
| ) |
const |
◆ mapcycleIsCurrentLast()
bool proofps_dd::Mapcycle::mapcycleIsCurrentLast |
( |
| ) |
const |
◆ mapcycleNext()
std::string proofps_dd::Mapcycle::mapcycleNext |
( |
| ) |
|
◆ mapcycleRefreshCharPtrArray()
void proofps_dd::Mapcycle::mapcycleRefreshCharPtrArray |
( |
| ) |
|
|
private |
◆ mapcycleReload()
bool proofps_dd::Mapcycle::mapcycleReload |
( |
| ) |
|
|
protected |
◆ mapcycleRemove() [1/3]
bool proofps_dd::Mapcycle::mapcycleRemove |
( |
const size_t & | index | ) |
|
|
protected |
◆ mapcycleRemove() [2/3]
bool proofps_dd::Mapcycle::mapcycleRemove |
( |
const std::string & | sMapFilename | ) |
|
|
protected |
◆ mapcycleRemove() [3/3]
bool proofps_dd::Mapcycle::mapcycleRemove |
( |
const std::vector< std::string > & | vMapFilenames | ) |
|
|
protected |
◆ mapcycleRemove_availableMapsAdd() [1/4]
bool proofps_dd::Mapcycle::mapcycleRemove_availableMapsAdd |
( |
| ) |
|
◆ mapcycleRemove_availableMapsAdd() [2/4]
bool proofps_dd::Mapcycle::mapcycleRemove_availableMapsAdd |
( |
const size_t & | indexToMapcycle | ) |
|
◆ mapcycleRemove_availableMapsAdd() [3/4]
bool proofps_dd::Mapcycle::mapcycleRemove_availableMapsAdd |
( |
const std::string & | sMapFilename | ) |
|
◆ mapcycleRemove_availableMapsAdd() [4/4]
bool proofps_dd::Mapcycle::mapcycleRemove_availableMapsAdd |
( |
const std::vector< std::string > & | vMapFilenames | ) |
|
◆ mapcycleRemoveNonExisting()
size_t proofps_dd::Mapcycle::mapcycleRemoveNonExisting |
( |
| ) |
|
|
protected |
Removes items from mapcycle that are referring to non-existing files in the current filesystem.
It can happen that someone manually edits the mapcycle file, or someone copies another mapcycle file over our file, leading to having entries that are invalid in the current filesystem. So this function is making sure the mapcycle is valid.
It uses availableMaps so it is recommended to invoke availableMapsRefresh() first! Make sure you never invoke this function without calling availableMapsRefresh() first, otherwise even the on-disk mapcycle items will be also removed from mapcycle.
- Returns
- The number of removed items.
Definition at line 701 of file Mapcycle.cpp.
◆ mapcycleRewindToFirst()
std::string proofps_dd::Mapcycle::mapcycleRewindToFirst |
( |
| ) |
|
◆ mapcycleSaveToFile()
bool proofps_dd::Mapcycle::mapcycleSaveToFile |
( |
| ) |
|
◆ mapFilenameAddToSet_NoDuplicatesAllowed()
bool proofps_dd::Mapcycle::mapFilenameAddToSet_NoDuplicatesAllowed |
( |
const std::string & | sMapFilename, |
|
|
std::set< std::string > & | settt ) |
|
private |
◆ mapFilenameAddToVector_NoDuplicatesAllowed()
bool proofps_dd::Mapcycle::mapFilenameAddToVector_NoDuplicatesAllowed |
( |
const std::string & | sMapFilename, |
|
|
std::vector< std::string > & | vec ) |
|
private |
◆ mapFilenameRemoveFromSet()
bool proofps_dd::Mapcycle::mapFilenameRemoveFromSet |
( |
const std::string & | sMapFilename, |
|
|
std::set< std::string > & | settt ) |
|
private |
◆ mapFilenameRemoveFromVector()
bool proofps_dd::Mapcycle::mapFilenameRemoveFromVector |
( |
const std::string & | sMapFilename, |
|
|
std::vector< std::string > & | vec ) |
|
private |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ shutdown()
void proofps_dd::Mapcycle::shutdown |
( |
| ) |
|
Releases any allocated resources related to available maps list and mapcycle.
After calling this, initialize() can be invoked again.
Definition at line 100 of file Mapcycle.cpp.
◆ GAME_MAPS_DIR
char* proofps_dd::Mapcycle::GAME_MAPS_DIR = "gamedata/maps/" |
|
staticconstexpr |
◆ m_availableMaps
std::set<std::string> proofps_dd::Mapcycle::m_availableMaps |
|
private |
◆ m_availableMapsNoChanging
std::set<std::string> proofps_dd::Mapcycle::m_availableMapsNoChanging |
|
private |
◆ m_bInitialized
bool proofps_dd::Mapcycle::m_bInitialized = false |
|
private |
◆ m_mapcycle
std::vector<std::string> proofps_dd::Mapcycle::m_mapcycle |
|
private |
◆ m_mapcycleItCurrent
std::vector<std::string>::iterator proofps_dd::Mapcycle::m_mapcycleItCurrent = m_mapcycle.end() |
|
private |
◆ m_sEmptyStringToReturn
std::string proofps_dd::Mapcycle::m_sEmptyStringToReturn |
|
private |
◆ m_vszAvailableMaps
const char** proofps_dd::Mapcycle::m_vszAvailableMaps = nullptr |
|
private |
◆ m_vszMapcycle
const char** proofps_dd::Mapcycle::m_vszMapcycle = nullptr |
|
private |
The documentation for this class was generated from the following files:
- C:/__PR00F__/___developing___/projects/PRooFPS-dd/PRooFPS-dd/Mapcycle.h
- C:/__PR00F__/___developing___/projects/PRooFPS-dd/PRooFPS-dd/Mapcycle.cpp