Implementation of ToInt8() API in Number classes
authordarpan.ka <darpan.ka@samsung.com>
Tue, 8 Oct 2013 06:43:21 +0000 (15:43 +0900)
committerdarpan.ka <darpan.ka@samsung.com>
Tue, 8 Oct 2013 07:20:13 +0000 (16:20 +0900)
Change-Id: I8c24e36b7a0b8c198a7d5693f5555dfb9d2fc14c
Signed-off-by: darpan.ka <darpan.ka@samsung.com>
src/base/FBaseInt8.cpp
src/base/FBaseInteger.cpp
src/base/FBaseInteger8.cpp
src/base/FBaseLong.cpp
src/base/FBaseLongLong.cpp
src/base/FBaseShort.cpp

index 31e178e..e988535 100644 (file)
@@ -128,6 +128,12 @@ Int8::ToChar(void) const
        return static_cast< char >(value);
 }
 
+int8_t
+Int8::ToInt8(void) const
+{
+       return 0;
+}
+
 short
 Int8::ToShort(void) const
 {
index 3bcf385..49d0276 100644 (file)
@@ -126,6 +126,12 @@ Integer::ToChar(void) const
        return static_cast< char >(value);
 }
 
+int8_t
+Integer::ToInt8(void) const
+{
+       return static_cast< int8_t >(value);
+}
+
 short
 Integer::ToShort(void) const
 {
index 3665262..c3cbcd5 100755 (executable)
@@ -134,6 +134,12 @@ Integer8::ToChar(void) const
        return static_cast< signed char >(value);
 }
 
+int8_t
+Integer8::ToInt8(void) const
+{
+       return static_cast< int8_t >(value);
+}
+
 short
 Integer8::ToShort(void) const
 {
index e8f3bbd..80d7800 100644 (file)
@@ -125,6 +125,12 @@ Long::ToChar(void) const
        return static_cast< char >(value);
 }
 
+int8_t
+Long::ToInt8(void) const
+{
+       return static_cast< int8_t >(value);
+}
+
 short
 Long::ToShort(void) const
 {
index 5600830..995bf08 100644 (file)
@@ -99,6 +99,12 @@ LongLong::ToChar(void) const
        return static_cast< char >(value);
 }
 
+int8_t
+LongLong::ToInt8(void) const
+{
+       return static_cast< int8_t >(value);
+}
+
 short
 LongLong::ToShort(void) const
 {
index d056caf..732b075 100644 (file)
@@ -134,6 +134,12 @@ Short::ToChar(void) const
        return static_cast< char >(value);
 }
 
+int8_t
+Short::ToInt8(void) const
+{
+       return static_cast< int8_t >(value);
+}
+
 short
 Short::ToShort(void) const
 {