From: rtrimana Date: Fri, 28 Oct 2016 18:14:02 +0000 (-0700) Subject: Removing IoTRMITypes.java from the outer directory X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2b62575aedf9d2c0e7d5a056b87bc390330b9a07;p=iot2.git Removing IoTRMITypes.java from the outer directory --- diff --git a/iotjava/iotrmi/IoTRMITypes.java b/iotjava/iotrmi/IoTRMITypes.java deleted file mode 100644 index c8ebcf3..0000000 --- a/iotjava/iotrmi/IoTRMITypes.java +++ /dev/null @@ -1,150 +0,0 @@ -package iotrmi; - -/** Class IoTRMITypes is a class that provides type translations. - *

- * It stores C++ and Java types. - * - * @author Rahmadi Trimananda - * @version 1.0 - * @since 2016-10-03 - */ - -import java.util.HashMap; -import java.util.Map; - -public class IoTRMITypes { - - /** - * Primitive data types in Java - */ - public final static String[] primitivesJava = new String[] { - - "byte", // 1 byte - "Byte", // 1 byte - "short", // 2 bytes - "Short", // 2 bytes - "int", // 4 bytes - "Integer", // 4 bytes - "long", // 8 bytes - "Long", // 8 bytes - "float", // 4 bytes - "Float", // 4 bytes - "double", // 8 bytes - "Double", // 8 bytes - "boolean", // 1 bytes - "Boolean", // 1 bytes - "char", // 2 bytes - "Character", // 2 bytes - "string", // indefinite - "String", // indefinite - "void" // 0 byte - }; - - - /** - * Primitive data types in C++ to map the primitives list - */ - public final static String[] primitivesCplus = new String[] { - - "char", // 1 byte - "char", // 1 byte - "short", // 2 bytes - "short", // 2 bytes - "int", // 4 bytes - "int", // 4 bytes - "long", // 4 bytes - "long", // 4 bytes - "float", // 4 bytes - "float", // 4 bytes - "double", // 8 bytes - "double", // 8 bytes - "bool", // 1 byte - "bool", // 1 byte - "char", // 1 byte - "char", // 1 byte - "string", // indefinite - "string", // indefinite - "void" // 0 byte - }; - - - /** - * Primitive sizes in Java - Long is 8 bytes and char is 2 bytes - */ - public final static Integer[] primitivesJavaSizes = new Integer[] { - - 1, 1, 2, 2, 4, 4, 8, 8, 4, 4, 8, 8, 1, 1, 2, 2, -1, -1, 0 - }; - - - /** - * Primitive sizes in Cplus - Long is 4 bytes and char is 1 byte - */ - public final static Integer[] primitivesCplusSizes = new Integer[] { - - 1, 1, 2, 2, 4, 4, 4, 4, 4, 4, 8, 8, 1, 1, 1, 1, -1, -1, 0 - }; - - - /** - * Non-primitive Java data types - */ - public final static String[] nonPrimitivesJava = new String[] { - - "Set", - "HashSet", - "Map", - "HashMap", - "List", - "ArrayList" - }; - - - /** - * Non-primitive C++ data types - */ - public final static String[] nonPrimitivesCplus = new String[] { - - "set", - "unordered_set", - "map", - "unordered_map", - "list", - "list" - }; - - - /**================ - * Helper functions - **================ - */ - // Inserting array members into a Map object - // that maps arrKey to arrVal objects - public static void arraysToMap(Map map, String[] arrKey, String[] arrVal) { - - for(int i = 0; i < arrKey.length; i++) { - - map.put(arrKey[i], arrVal[i]); - } - } - - // Inserting array members into a Map object - // that maps arrKey to arrVal objects - public static void arraysToMap(Map map, String[] arrKey, Integer[] arrVal) { - - for(int i = 0; i < arrKey.length; i++) { - - map.put(arrKey[i], arrVal[i]); - } - } - - // Inserting array members into a Map object - // that maps arrKey to arrVal objects - public static void arraysToMap(Map map, Object[] arrKey, Object[] arrVal) { - - for(int i = 0; i < arrKey.length; i++) { - - map.put(arrKey[i], arrVal[i]); - } - } -}