1 #include "custompropertyinterface.h"
2 #include "vehicleproperty.h"
3 #include "varianttype.h"
4 #include "listplusplus.h"
6 CustomPropertyInterface::CustomPropertyInterface(VehicleProperty::Property prop, AbstractRoutingEngine *re, GDBusConnection *connection)
7 :DBusSink(prop, re, connection, map<string, string>())
9 PropertyList list = VehicleProperty::customProperties();
11 if(contains(list,prop))
13 AbstractPropertyType* temp = VehicleProperty::getPropertyTypeForPropertyNameValue(prop);
17 throw std::runtime_error("Cannot create custom property: " + prop);
20 propertyDBusMap.push_back(new VariantType(re, prop, prop, VariantType::ReadWrite));
21 propertyDBusMap.push_back(new VariantType(re, prop, "Value", VariantType::ReadWrite));
27 CustomPropertyInterface::~CustomPropertyInterface()