The Gaudi Framework  master (ff829712)
Loading...
Searching...
No Matches
Analyzer.cpp File Reference
#include "Analyzer.h"
#include "Catalog.h"
#include "IncludedFiles.h"
#include "Messages.h"
#include "Node.h"
#include "Parser.h"
#include "PragmaOptions.h"
#include "PropertyName.h"
#include "PropertyValue.h"
#include "Units.h"
#include <GaudiKernel/Environment.h>
#include <fmt/format.h>
#include <memory>
Include dependency graph for Analyzer.cpp:

Go to the source code of this file.

Functions

bool Unreference (gp::Catalog &catalog, gp::Messages *messages)
 

Function Documentation

◆ Unreference()

bool Unreference ( gp::Catalog & catalog,
gp::Messages * messages )

Definition at line 345 of file Analyzer.cpp.

345 {
346 bool unreference_result = true;
347 for ( auto& client : catalog ) {
348 for ( auto& current : client.second ) {
349 if ( current.IsReference() ) {
350 gp::PropertyValue& value = current.property_value();
351 const std::vector<std::string>& names = value.Vector();
352 gp::Property* property = catalog.Find( names[0], names[1] );
353 if ( !property ) {
354 messages->AddError( value.position(), "Could not unreference " + current.ValueAsString() );
355 unreference_result = false;
356 } else {
357 value = property->property_value();
358 }
359 }
360 }
361 }
362 return unreference_result;
363}
void AddError(std::string_view error)
Definition Messages.h:28
VectorOfStrings & Vector()
const Position & position() const