ValueObject myValueObject; auto processSP = myValueObject.GetProcessSP(); Process* processPtr = processSP.get();
std::vectorIn this example, an array of ValueObjects is iterated to get the process name for each object. The GetProcessSP function is called for each ValueObject to get the shared pointer to the associated process. The name of the process is then printed on the screen. The package library for ValueObject and GetProcessSP might vary depending on the application. However, one possible package library could be the LLVM Debug Info library.values; for (auto& value : values) { auto processSP = value.GetProcessSP(); std::cout << "Process name: " << processSP->GetName() << std::endl; }