MCPcopy Create free account
hub / github.com/ChunelFeng/CGraph / save

Method save

src/GraphCtrl/GraphPipeline/GPipeline.cpp:325–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

323
324
325CStatus GPipeline::save(const std::string& path) {
326 CGRAPH_FUNCTION_BEGIN
327 CGRAPH_ASSERT_INIT(false)
328
329 // 不允许有同名的 element 被存储
330 for (const auto* element : repository_.elements_) {
331 CGRAPH_ASSERT_NOT_NULL(element)
332 CGRAPH_RETURN_ERROR_STATUS_BY_CONDITION(element->isGAdaptor(),
333 element->name_ + " is GAdaptor, cannot be saved.")
334 }
335
336#if __cplusplus >= 201703L
337 status = GStorage::save(this, path);
338#else
339 status = CStatus("save function support cpp17+ only");
340#endif
341 CGRAPH_FUNCTION_END
342}
343
344
345CStatus GPipeline::load(const std::string& path) {

Callers 1

tutorial_storage_saveFunction · 0.45

Calls 2

CGRAPH_ASSERT_NOT_NULLFunction · 0.85
isGAdaptorMethod · 0.80

Tested by

no test coverage detected