MCPcopy Create free account
hub / github.com/OpenArkStudio/ARK / CreateDataMeta

Method CreateDataMeta

src/plugin/kernel/src/AFClassMeta.cpp:52–66  ·  view source on GitHub ↗

create data meta

Source from the content-addressed store, hash-verified

50
51// create data meta
52std::shared_ptr<AFNodeMeta> AFClassMeta::CreateDataMeta(const std::string& name, const uint32_t index)
53{
54 // check arg
55 ARK_ASSERT_RET_VAL(!name.empty() && index > 0, nullptr);
56
57 ARK_ASSERT_RET_VAL(data_meta_list_.find(index) == data_meta_list_.end(), nullptr);
58
59 ARK_ASSERT_RET_VAL(NameIndexInsert(name, index), nullptr);
60
61 // create new data meta
62 std::shared_ptr<AFNodeMeta> pMeta = std::make_shared<AFNodeMeta>(name, index);
63 ARK_ASSERT_RET_VAL(data_meta_list_.insert(index, pMeta).second, nullptr);
64
65 return pMeta;
66}
67
68std::shared_ptr<AFNodeMeta> AFClassMeta::FindDataMeta(const uint32_t index) const
69{

Callers 2

LoadConfigMetaMethod · 0.80
LoadEntityMetaMethod · 0.80

Calls 4

emptyMethod · 0.45
findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected