Class CCDictionaryExt<Key, ValueInpT, Value>

#include <Geode/utils/cocos.hpp>
template<CocosDictionaryKey Key,class ValueInpT,CocosObject Value = std::remove_pointer_t<ValueInpT>>classCCDictionaryExt{ ... }

A templated wrapper over CCDictionary, providing easy iteration and indexing. This will keep ownership of the given CCDictionary*.

Template parameters

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
autobegin()
No description provided
autoend()
No description provided
_::size_tsize()
No description provided
autooperator[]()
No description provided
boolcontains()
No description provided
_::size_tcount()
No description provided
cocos2d::CCDictionary*inner()
No description provided
Fields0
Protected member functions0
Protected fields1
;
No description provided