create container meta
| 93 | |
| 94 | // create container meta |
| 95 | std::shared_ptr<AFContainerMeta> AFClassMeta::CreateContainerMeta( |
| 96 | const std::string& name, const uint32_t index, const std::string& class_name, const ArkMaskType mask) |
| 97 | { |
| 98 | // check arg |
| 99 | ARK_ASSERT_RET_VAL(!name.empty() && index > 0, nullptr); |
| 100 | |
| 101 | ARK_ASSERT_RET_VAL(container_meta_list_.find(index) == container_meta_list_.end(), nullptr); |
| 102 | |
| 103 | ARK_ASSERT_RET_VAL(NameIndexInsert(name, index), nullptr); |
| 104 | |
| 105 | std::shared_ptr<AFContainerMeta> pMeta = std::make_shared<AFContainerMeta>(name, index, class_name, mask); |
| 106 | ARK_ASSERT_RET_VAL(container_meta_list_.insert(index, pMeta).second, nullptr); |
| 107 | |
| 108 | return pMeta; |
| 109 | } |
| 110 | |
| 111 | std::shared_ptr<AFContainerMeta> AFClassMeta::FindContainerMeta(const uint32_t index) const |
| 112 | { |
no test coverage detected