diff options
author | David Robillard <d@drobilla.net> | 2012-03-12 06:59:48 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-03-12 06:59:48 +0000 |
commit | ffa270b487c29d02d3faab7120a484309f2f600f (patch) | |
tree | 16708ca3e48d2d909769a35f3de4a5c256868f9f /raul/Configuration.hpp | |
parent | 052b0c2658d2959dc02f9a752ee2a251bc60dc59 (diff) | |
download | raul-ffa270b487c29d02d3faab7120a484309f2f600f.tar.gz raul-ffa270b487c29d02d3faab7120a484309f2f600f.tar.bz2 raul-ffa270b487c29d02d3faab7120a484309f2f600f.zip |
Centralise atom creation in forge object.
Aside from being more greppable and making realtime violations more obvious, this is a step towards using LV2 atoms internally (which needs a factory since the type numbers are dynamic).
git-svn-id: http://svn.drobilla.net/lad/trunk/raul@4054 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'raul/Configuration.hpp')
-rw-r--r-- | raul/Configuration.hpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/raul/Configuration.hpp b/raul/Configuration.hpp index 655696a..9efca42 100644 --- a/raul/Configuration.hpp +++ b/raul/Configuration.hpp @@ -34,18 +34,20 @@ namespace Raul { */ class Configuration { public: - Configuration(const std::string& shortdesc, const std::string& desc) - : _shortdesc(shortdesc) + Configuration(Forge* forge, + const std::string& shortdesc, + const std::string& desc) + : _forge(forge) + , _shortdesc(shortdesc) , _desc(desc) , _max_name_length(0) {} - Configuration& add( - const std::string& name, - char letter, - const std::string& desc, - const Atom::Type type, - const Atom& value); + Configuration& add(const std::string& name, + char letter, + const std::string& desc, + const Atom::Type type, + const Atom& value); void print_usage(const std::string& program, std::ostream& os); @@ -92,6 +94,7 @@ private: int set_value_from_string(Configuration::Option& option, const std::string& value) throw (Configuration::CommandLineError); + Forge* _forge; const std::string _shortdesc; const std::string _desc; Options _options; |