X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ffeature.cpp;h=25183777aab27c3b31715455114510d02a27760e;hb=451ef4f33b5a57dcb56bd7cb671bed359ac86247;hp=7c19af5c40b5af674b00ff1f0068cc35134a8ae1;hpb=55a110c49b85482c4079745211cc599f4508945f;p=builder.git diff --git a/source/feature.cpp b/source/feature.cpp index 7c19af5..2518377 100644 --- a/source/feature.cpp +++ b/source/feature.cpp @@ -1,15 +1,20 @@ -/* $Id$ - -This file is part of builder -Copyright © 2009 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #include "feature.h" +using namespace std; +using namespace Msp; + Feature::Loader::Loader(Feature &f): - Msp::DataFile::BasicLoader(f) + Msp::DataFile::ObjectLoader(f) +{ + add("choice", &Loader::choice); + add("description", &Feature::description); + add("default", &Feature::default_value); + add("export", &Feature::exported); +} + +void Feature::Loader::choice(const string &c) { - add("description", &Feature::descr); - add("default", &Feature::def_value); + if(obj.choices.empty()) + obj.default_value = c; + obj.choices.push_back(c); }