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

Method LoadEntity

src/plugin/kernel/src/AFCClassMetaModule.cpp:115–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115bool AFCClassMetaModule::LoadEntity()
116{
117 std::string file_path = GetPluginManager()->GetResPath() + ENTITY_CLASS_FILE_PATH;
118
119 ARK_LOG_INFO("Load entity class files: {}", file_path);
120
121 AFXml xml_doc(file_path);
122 auto root_node = xml_doc.GetRootNode();
123 ARK_ASSERT_RET_VAL(root_node.IsValid(), false);
124
125 for (auto meta_node = root_node.FindNode("config"); meta_node.IsValid(); meta_node.NextNode())
126 {
127 std::string schema_path = meta_node.GetString("meta");
128 ARK_ASSERT_RET_VAL(LoadEntityMeta(schema_path), false);
129 }
130
131 // exact table meta and object meta of a class meta after all loaded
132 ARK_ASSERT_RET_VAL(m_pClassMetaManager->AfterLoaded(), false);
133
134 return true;
135}
136
137bool AFCClassMetaModule::LoadEntityMeta(const std::string& schema_path)
138{

Callers

nothing calls this directly

Calls 6

GetRootNodeMethod · 0.80
IsValidMethod · 0.80
NextNodeMethod · 0.80
AfterLoadedMethod · 0.80
FindNodeMethod · 0.45
GetStringMethod · 0.45

Tested by

no test coverage detected