blob: 034a95870a79caefc1c79e128ba05cf7ab1783fa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include "uncategorizedproperty.h"
#include "vehicleproperty.h"
#include "varianttype.h"
#include "listplusplus.h"
UncategorizedPropertyInterface::UncategorizedPropertyInterface(VehicleProperty::Property prop, AbstractRoutingEngine *re, GDBusConnection *connection)
:DBusSink(prop, re, connection, map<string, string>())
{
AbstractPropertyType* temp = VehicleProperty::getPropertyTypeForPropertyNameValue(prop);
if(!temp)
{
throw std::runtime_error("Cannot create uncategorized property: " + prop);
}
GVariant* var = temp->toVariant();
std::string signature = g_variant_get_type_string(var);
g_variant_unref(var);
propertyDBusMap[prop] = new VariantType(re, signature, prop, prop, VariantType::ReadWrite, this);
delete temp;
}
|