MCPcopy Create free account
hub / github.com/Kitware/CMake / ResolvePath

Method ResolvePath

Source/cmPathResolver.cxx:441–464  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

439
440template <class Policy>
441Control Impl<Policy>::ResolvePath()
442{
443 Root const root = ClassifyRoot(P);
444
445 // Resolve the root component. It always ends in a slash.
446 Control control = this->ResolveRoot(root);
447 if (control.tag != Control::Tag::Continue) {
448 return control;
449 }
450 std::string::size_type const root_slash = control.slash;
451
452 // Resolve later components. Every iteration that finishes
453 // the loop body makes progress either by removing a component
454 // or advancing the slash past it.
455 for (std::string::size_type slash = root_slash;
456 P.size() > root_slash + 1 && slash < P.size();) {
457 control = this->ResolveComponent(root, root_slash, slash);
458 if (control.tag != Control::Tag::Continue) {
459 return control;
460 }
461 slash = control.slash;
462 }
463 return Control::Continue(P.size());
464}
465
466template <class Policy>
467cmsys::Status Impl<Policy>::Resolve(std::string in, std::string& out)

Callers 1

ResolveMethod · 0.95

Calls 5

ResolveRootMethod · 0.95
ResolveComponentMethod · 0.95
ClassifyRootFunction · 0.85
ContinueEnum · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected