45 MetaEnumManager::MetaEnumManager()
50 MetaEnumManager::~MetaEnumManager()
58 MetaEnumManager& MetaEnumManager::GetInstance()
60 static MetaEnumManager manager;
66 if ((m_pPrivate->m_MetaEnumByName.find(rName) != m_pPrivate->m_MetaEnumByName.end()) || (m_pPrivate->m_MetaEnumById.find(rId) != m_pPrivate->m_MetaEnumById.end()))
72 m_pPrivate->m_MetaEnumByName[rName] = newEnum;
73 m_pPrivate->m_MetaEnumById[rId] = newEnum;
80 MetaEnumManagerPrivate::EnumByNameTable::const_iterator iter = m_pPrivate->m_MetaEnumByName.find(rName);
81 if (iter == m_pPrivate->m_MetaEnumByName.end())
91 MetaEnumManagerPrivate::EnumByIdTable::const_iterator iter = m_pPrivate->m_MetaEnumById.find(rId);
92 if (iter == m_pPrivate->m_MetaEnumById.end())
102 return m_pPrivate->m_MetaEnumById.find(rId) != m_pPrivate->m_MetaEnumById.end();
105 kt_size_t MetaEnumManager::GetSize()
const 107 return m_pPrivate->m_MetaEnumByName.size();
112 if (index >= m_pPrivate->m_MetaEnumByName.size())
117 MetaEnumManagerPrivate::EnumByNameTable::const_iterator iter = m_pPrivate->m_MetaEnumByName.begin();
118 std::advance(iter, index);
120 return *iter->second;
123 void MetaEnumManager::Clear()
125 m_pPrivate->m_MetaEnumById.clear();
126 m_pPrivate->m_MetaEnumByName.clear();