A templated wrapper over CCDictionary, providing easy iteration and indexing. This will keep ownership of the given CCDictionary*.
Class CCDictionaryExt<Key, ValueInpT, Value>
#include <Geode/utils/cocos.hpp>
template<CocosDictionaryKey Key,class ValueInpT,CocosObject Value = std::remove_pointer_t<ValueInpT>>classCCDictionaryExt{ ... }
Key
Type of the key. MUST only be int or gd::string or std::string.
ValuePtr
Pointer to a type that inherits CCObject.
Examples1
CCDictionaryExt<std::string, GJGameLevel*> levels = getSomeDict();
// Easy indexing, giving you the type you assigned
GJGameLevel* myLvl = levels["Cube Adventures"];
// Easy iteration using C++ range-based for loops
for (auto [name, level] : levels) {
log::info("{}: {}", name, level->m_levelID);
}
Public static methods0
Public member functions7
Fields0
Protected member functions0
Protected fields1
;
No description provided