some bluemonkey updating
authorKevron Rees <kevron.m.rees@intel.com>
Fri, 6 Sep 2013 16:48:41 +0000 (09:48 -0700)
committerKevron Rees <kevron.m.rees@intel.com>
Fri, 6 Sep 2013 16:50:03 +0000 (09:50 -0700)
plugins/bluemonkey/CMakeLists.txt
plugins/bluemonkey/bluemonkey.cpp
plugins/bluemonkey/bluemonkey.h

index 2c095c9..23251d2 100644 (file)
@@ -9,7 +9,12 @@ if(Qt5Core_FOUND)
 
        set(QT_INCLUDE_DIRS ${Qt5Core_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS} ${Qt5Script_INCLUDE_DIRS})
        set(QT_LIBRARIES ${Qt5Core_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Script_LIBRARIES})
-       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS} -mcmodel=large")
+       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}")
+       message(STATUS "size of void_p: ${CMAKE_SIZEOF_VOID_P}")
+       if(CMAKE_SIZEOF_VOID_P MATCHES "8")
+               message(STATUS "can has 64bits")
+               set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcmodel=large")
+       endif(CMAKE_SIZEOF_VOID_P MATCHES "8")
        add_definitions(${Qt5Core_DEFINITIONS})
 
 endif(Qt5Core_FOUND)
index 3fd3c45..73d2604 100644 (file)
@@ -148,7 +148,7 @@ void BluemonkeySink::propertyChanged(VehicleProperty::Property property, Abstrac
 
 }
 
-std::string BluemonkeySink::uuid()
+const string BluemonkeySink::uuid()
 {
        return "bluemonkey";
 }
@@ -382,7 +382,7 @@ void Property::getHistory(QDateTime begin, QDateTime end, QScriptValue cbFunctio
 }
 
 Property::Property(VehicleProperty::Property prop, QString srcFilter, AbstractRoutingEngine* re, QObject *parent)
-       :QObject(parent), AbstractSink(re, std::map<std::string,std::string>()),mValue(nullptr)
+       :QObject(parent), AbstractSink(re, std::map<std::string,std::string>()),mValue(nullptr), mUuid(amb::createUuid())
 {
        setType(prop.c_str());
 }
index 3fadba1..97480e6 100644 (file)
@@ -54,7 +54,7 @@ public:
 
        virtual void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, std::string uuid);
 
-       virtual std::string uuid() { return amb::createUuid(); }
+       virtual const std::string uuid() { return mUuid; }
 
        QVariant value();
        void setValue(QVariant v);
@@ -66,6 +66,7 @@ Q_SIGNALS:
 
 private:
        AbstractPropertyType* mValue;
+       const std::string mUuid;
 
 };
 
@@ -77,7 +78,7 @@ public:
        virtual PropertyList subscriptions();
        virtual void supportedChanged(PropertyList supportedProperties);
        virtual void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, std::string uuid);
-       virtual std::string uuid();
+       virtual const std::string uuid();
 
        QScriptEngine* engine;