infrastructure for PBD::Configuration to deliver metadata
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include <iostream>
|
||||
|
||||
#include "pbd/compose.h"
|
||||
#include "pbd/configuration.h"
|
||||
#include "pbd/configuration_variable.h"
|
||||
#include "pbd/debug.h"
|
||||
|
||||
@@ -109,3 +110,17 @@ ConfigVariableBase::miss ()
|
||||
// placeholder for any debugging desired when a config variable
|
||||
// is set but to the same value as it already has
|
||||
}
|
||||
|
||||
|
||||
Configuration::Metadata const *
|
||||
Configuration::get_metadata (std::string const & name) const
|
||||
{
|
||||
auto i = all_metadata.find (name);
|
||||
if (i != all_metadata.end()) {
|
||||
/* Only return actual, useful metadata */
|
||||
if (!i->second.empty() && !i->second.front().empty()) {
|
||||
return &i->second;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user