From 8a73d68a8857588396dfe201dcf76c4dfb84722e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 29 Apr 2011 02:09:01 +0000 Subject: Terser names for value constructors. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3223 a436a847-0d15-0410-975c-d299462d15a1 --- src/client/NodeModel.cpp | 2 +- src/client/PluginModel.cpp | 14 +++++++------- src/client/PluginUI.cpp | 2 +- src/gui/NodeMenu.cpp | 12 ++++++------ src/server/LV2Info.cpp | 14 +++++++------- src/server/LV2Node.cpp | 14 +++++++------- 6 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/client/NodeModel.cpp b/src/client/NodeModel.cpp index 4c00e6ec..941f1122 100644 --- a/src/client/NodeModel.cpp +++ b/src/client/NodeModel.cpp @@ -219,7 +219,7 @@ NodeModel::port_label(SharedPtr port) const if (_plugin && _plugin->type() == PluginModel::LV2) { LilvWorld* c_world = _plugin->lilv_world(); const LilvPlugin* c_plugin = _plugin->lilv_plugin(); - LilvValue* c_sym = lilv_value_new_string(c_world, port->symbol().c_str()); + LilvValue* c_sym = lilv_new_string(c_world, port->symbol().c_str()); const LilvPort* c_port = lilv_plugin_get_port_by_symbol(c_plugin, c_sym); if (c_port) { LilvValue* c_name = lilv_port_get_name(c_plugin, c_port); diff --git a/src/client/PluginModel.cpp b/src/client/PluginModel.cpp index 62bed5fb..d0fb3205 100644 --- a/src/client/PluginModel.cpp +++ b/src/client/PluginModel.cpp @@ -52,7 +52,7 @@ PluginModel::PluginModel(Shared::LV2URIMap& uris, assert(_rdf_world); add_property("http://www.w3.org/1999/02/22-rdf-syntax-ns#type", this->type_uri()); #ifdef HAVE_LILV - LilvValue* plugin_uri = lilv_value_new_uri(_lilv_world, uri.c_str()); + LilvValue* plugin_uri = lilv_new_uri(_lilv_world, uri.c_str()); _lilv_plugin = lilv_plugins_get_by_uri(_lilv_plugins, plugin_uri); lilv_value_free(plugin_uri); #endif @@ -100,7 +100,7 @@ PluginModel::get_property(const URI& key) const #ifdef HAVE_LILV if (_lilv_plugin) { boost::optional ret; - LilvValue* lv2_pred = lilv_value_new_uri(_lilv_world, key.str().c_str()); + LilvValue* lv2_pred = lilv_new_uri(_lilv_world, key.str().c_str()); LilvValues* values = lilv_plugin_get_value(_lilv_plugin, lv2_pred); lilv_value_free(lv2_pred); LILV_FOREACH(values, i, values) { @@ -218,7 +218,7 @@ string PluginModel::get_lv2_icon_path(const LilvPlugin* plugin) { string result; - LilvValue* svg_icon_pred = lilv_value_new_uri(_lilv_world, + LilvValue* svg_icon_pred = lilv_new_uri(_lilv_world, "http://ll-plugins.nongnu.org/lv2/namespace#svgIcon"); LilvValues* paths = lilv_plugin_get_value(plugin, svg_icon_pred); @@ -243,9 +243,9 @@ PluginModel::documentation() const if (!_lilv_plugin) return doc; - //LilvValue lv2_documentation = lilv_value_new_uri( + //LilvValue lv2_documentation = lilv_new_uri( // _lilv_world, LILV_NAMESPACE_LV2 "documentation"); - LilvValue* rdfs_comment = lilv_value_new_uri( + LilvValue* rdfs_comment = lilv_new_uri( _lilv_world, "http://www.w3.org/2000/01/rdf-schema#comment"); LilvValues* vals = lilv_plugin_get_value(_lilv_plugin, @@ -270,9 +270,9 @@ PluginModel::port_documentation(uint32_t index) const const LilvPort* port = lilv_plugin_get_port_by_index(_lilv_plugin, index); - //LilvValue lv2_documentation = lilv_value_new_uri( + //LilvValue lv2_documentation = lilv_new_uri( // _lilv_world, LILV_NAMESPACE_LV2 "documentation"); - LilvValue* rdfs_comment = lilv_value_new_uri( + LilvValue* rdfs_comment = lilv_new_uri( _lilv_world, "http://www.w3.org/2000/01/rdf-schema#comment"); LilvValues* vals = lilv_port_get_value(_lilv_plugin, diff --git a/src/client/PluginUI.cpp b/src/client/PluginUI.cpp index d545d670..97d4cfbc 100644 --- a/src/client/PluginUI.cpp +++ b/src/client/PluginUI.cpp @@ -125,7 +125,7 @@ PluginUI::create(Ingen::Shared::World* world, static const char* gtk_ui_uri = "http://lv2plug.in/ns/extensions/ui#GtkUI"; - LilvValue* gtk_ui = lilv_value_new_uri(world->lilv_world(), gtk_ui_uri); + LilvValue* gtk_ui = lilv_new_uri(world->lilv_world(), gtk_ui_uri); LilvUIs* uis = lilv_plugin_get_uis(plugin); const LilvUI* ui = NULL; diff --git a/src/gui/NodeMenu.cpp b/src/gui/NodeMenu.cpp index 871ccaf9..5876037a 100644 --- a/src/gui/NodeMenu.cpp +++ b/src/gui/NodeMenu.cpp @@ -86,10 +86,10 @@ NodeMenu::init(SharedPtr node) #ifdef HAVE_LILV if (plugin && plugin->type() == PluginModel::LV2) { - LilvValue* preset_pred = lilv_value_new_uri( + LilvValue* preset_pred = lilv_new_uri( plugin->lilv_world(), "http://lv2plug.in/ns/dev/presets#hasPreset"); - LilvValue* title_pred = lilv_value_new_uri( + LilvValue* title_pred = lilv_new_uri( plugin->lilv_world(), "http://dublincore.org/documents/dcmi-namespace/title"); LilvValues* presets = lilv_plugin_get_value( @@ -182,16 +182,16 @@ NodeMenu::on_preset_activated(const std::string& uri) const NodeModel* const node = (NodeModel*)_object.get(); const PluginModel* const plugin = dynamic_cast(node->plugin()); - LilvValue* port_pred = lilv_value_new_uri( + LilvValue* port_pred = lilv_new_uri( plugin->lilv_world(), "http://lv2plug.in/ns/lv2core#port"); - LilvValue* symbol_pred = lilv_value_new_uri( + LilvValue* symbol_pred = lilv_new_uri( plugin->lilv_world(), "http://lv2plug.in/ns/lv2core#symbol"); - LilvValue* value_pred = lilv_value_new_uri( + LilvValue* value_pred = lilv_new_uri( plugin->lilv_world(), "http://lv2plug.in/ns/ext/presets#value"); - LilvValue* subject = lilv_value_new_uri(plugin->lilv_world(), uri.c_str()); + LilvValue* subject = lilv_new_uri(plugin->lilv_world(), uri.c_str()); LilvValues* ports = lilv_plugin_get_value_for_subject( plugin->lilv_plugin(), subject, diff --git a/src/server/LV2Info.cpp b/src/server/LV2Info.cpp index ea263f91..fa6e38ee 100644 --- a/src/server/LV2Info.cpp +++ b/src/server/LV2Info.cpp @@ -39,14 +39,14 @@ namespace Ingen { namespace Server { LV2Info::LV2Info(Ingen::Shared::World* world) - : input_class(lilv_value_new_uri(world->lilv_world(), LILV_PORT_CLASS_INPUT)) - , output_class(lilv_value_new_uri(world->lilv_world(), LILV_PORT_CLASS_OUTPUT)) - , control_class(lilv_value_new_uri(world->lilv_world(), LILV_PORT_CLASS_CONTROL)) - , audio_class(lilv_value_new_uri(world->lilv_world(), LILV_PORT_CLASS_AUDIO)) - , event_class(lilv_value_new_uri(world->lilv_world(), LILV_PORT_CLASS_EVENT)) - , value_port_class(lilv_value_new_uri(world->lilv_world(), + : input_class(lilv_new_uri(world->lilv_world(), LILV_PORT_CLASS_INPUT)) + , output_class(lilv_new_uri(world->lilv_world(), LILV_PORT_CLASS_OUTPUT)) + , control_class(lilv_new_uri(world->lilv_world(), LILV_PORT_CLASS_CONTROL)) + , audio_class(lilv_new_uri(world->lilv_world(), LILV_PORT_CLASS_AUDIO)) + , event_class(lilv_new_uri(world->lilv_world(), LILV_PORT_CLASS_EVENT)) + , value_port_class(lilv_new_uri(world->lilv_world(), "http://lv2plug.in/ns/ext/atom#ValuePort")) - , message_port_class(lilv_value_new_uri(world->lilv_world(), + , message_port_class(lilv_new_uri(world->lilv_world(), "http://lv2plug.in/ns/ext/atom#MessagePort")) , _world(world) { diff --git a/src/server/LV2Node.cpp b/src/server/LV2Node.cpp index 0f53b6a3..18e0f3fc 100644 --- a/src/server/LV2Node.cpp +++ b/src/server/LV2Node.cpp @@ -150,7 +150,7 @@ LV2Node::instantiate(BufferFactory& bufs) _features = info->world().lv2_features()->lv2_features(&info->world(), this); uint32_t port_buffer_size = 0; - LilvValue* ctx_ext_uri = lilv_value_new_uri(info->lv2_world(), + LilvValue* ctx_ext_uri = lilv_new_uri(info->lv2_world(), LV2_CONTEXTS_URI "#MessageContext"); for (uint32_t i = 0; i < _polyphony; ++i) { @@ -189,22 +189,22 @@ LV2Node::instantiate(BufferFactory& bufs) float* def_values = new float[num_ports]; lilv_plugin_get_port_ranges_float(plug, min_values, max_values, def_values); - LilvValue* context_pred = lilv_value_new_uri(info->lv2_world(), + LilvValue* context_pred = lilv_new_uri(info->lv2_world(), "http://lv2plug.in/ns/ext/contexts#context"); - LilvValue* default_pred = lilv_value_new_uri(info->lv2_world(), + LilvValue* default_pred = lilv_new_uri(info->lv2_world(), "http://lv2plug.in/ns/lv2core#default"); - LilvValue* min_size_pred = lilv_value_new_uri(info->lv2_world(), + LilvValue* min_size_pred = lilv_new_uri(info->lv2_world(), "http://lv2plug.in/ns/ext/resize-port#minimumSize"); - LilvValue* port_property_pred = lilv_value_new_uri(info->lv2_world(), + LilvValue* port_property_pred = lilv_new_uri(info->lv2_world(), "http://lv2plug.in/ns/lv2core#portProperty"); - LilvValue* supports_pred = lilv_value_new_uri(info->lv2_world(), + LilvValue* supports_pred = lilv_new_uri(info->lv2_world(), "http://lv2plug.in/ns/ext/atom#supports"); - //LilvValue as_large_as_pred = lilv_value_new_uri(info->lv2_world(), + //LilvValue as_large_as_pred = lilv_new_uri(info->lv2_world(), // "http://lv2plug.in/ns/ext/resize-port#asLargeAs"); for (uint32_t j = 0; j < num_ports; ++j) { -- cgit v1.2.1