13
0

add concept of a map-of-own-config-variables to RCConfiguration

This commit is contained in:
Paul Davis 2023-01-24 17:16:06 -07:00
parent b6f9829b70
commit 8071a085c4
2 changed files with 13 additions and 0 deletions

View File

@ -60,6 +60,8 @@ class LIBARDOUR_API RCConfiguration : public PBD::Configuration
XMLNode* control_protocol_state () { return _control_protocol_state; }
XMLNode* transport_master_state () { return _transport_master_state; }
std::map<std::string,PBD::ConfigVariableBase*> _my_variables;
/* define accessor methods */
#undef CONFIG_VARIABLE

View File

@ -75,6 +75,17 @@ RCConfiguration::RCConfiguration ()
_control_protocol_state (0)
, _transport_master_state (0)
{
/* build map */
#undef CONFIG_VARIABLE
#undef CONFIG_VARIABLE_SPECIAL
#define CONFIG_VARIABLE(Type,var,name,value) _my_variables.insert (std::make_pair ((name), &(var)));
#define CONFIG_VARIABLE_SPECIAL(Type,var,name,value,mutator) _my_variables.insert (std::make_pair ((name), &(var)));
#include "ardour/rc_configuration_vars.h"
#undef CONFIG_VARIABLE
#undef CONFIG_VARIABLE_SPECIAL
}
RCConfiguration::~RCConfiguration ()