summaryrefslogtreecommitdiffstats
path: root/parameter/TypeElement.cpp
diff options
context:
space:
mode:
authorGuillaume Denneulin <guillaume.denneulin@intel.com>2014-01-10 14:58:42 +0100
committerDavid Wagner <david.wagner@intel.com>2014-02-12 17:04:19 +0100
commita6b01d2049a137932f303cdee554d8d2703d7af7 (patch)
tree1babc313169e1299f8e98d741df88046a12567dd /parameter/TypeElement.cpp
parent28119d8ec7d49b5fab310f08e6fc40c910e3bc8a (diff)
downloadexternal_parameter-framework-a6b01d2049a137932f303cdee554d8d2703d7af7.zip
external_parameter-framework-a6b01d2049a137932f303cdee554d8d2703d7af7.tar.gz
external_parameter-framework-a6b01d2049a137932f303cdee554d8d2703d7af7.tar.bz2
Add integer conversion that can take care of sign extension
BZ: 163707 When using signed integers of size 8 or 16, the bit of sign needs to be propagated if the API called by the plugin wait for "int" type Add the virtual toInteger function in CTypeElement for each parameter type to take care of conversion to "int". Specialize this function in the class CIntegerParameterType to take care of sign extension. Change-Id: I41183dccbcc21212299d1dde86b3ad4ba8432ce4 Signed-off-by: Guillaume Denneulin <guillaume.denneulin@intel.com>
Diffstat (limited to 'parameter/TypeElement.cpp')
-rwxr-xr-x[-rw-r--r--]parameter/TypeElement.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/parameter/TypeElement.cpp b/parameter/TypeElement.cpp
index 5bfc2d7..59d4412 100644..100755
--- a/parameter/TypeElement.cpp
+++ b/parameter/TypeElement.cpp
@@ -49,6 +49,11 @@ uint32_t CTypeElement::getArrayLength() const
return _uiArrayLength;
}
+int CTypeElement::toPlainInteger(int iSizeOptimizedData) const
+{
+ return iSizeOptimizedData;
+}
+
bool CTypeElement::getMappingData(const string& strKey, const string*& pStrValue) const
{
if (_pMappingData) {