Preparing Makefiles, stub, skeleton, config files, etc. for porting LifxLightBulb...
[iot2.git] / iotjava / iotpolicy / tree / DeclarationHandler.java
index 0b8089fd1db918bdabd972b6bd850e2aba2f1fbc..48856cad3f95ad6553d8efbbbdc2a0049b540849 100644 (file)
@@ -18,6 +18,8 @@ public class DeclarationHandler {
        private Map<String,Declaration> mapInt2IntfaceDecl;
        private Map<String,Declaration> mapInt2CapabDecl;
        private Map<String,Declaration> mapInt2ReqDecl;
+       private Map<String,Declaration> mapInt2EnumDecl;
+       private Map<String,Declaration> mapInt2StructDecl;
 
        /**
         * Class constructors
@@ -27,6 +29,8 @@ public class DeclarationHandler {
                mapInt2IntfaceDecl = new HashMap<String,Declaration>();
                mapInt2CapabDecl = new HashMap<String,Declaration>();
                mapInt2ReqDecl = new HashMap<String,Declaration>();
+               mapInt2EnumDecl = new HashMap<String,Declaration>();
+               mapInt2StructDecl = new HashMap<String,Declaration>();
        }
 
 
@@ -51,6 +55,18 @@ public class DeclarationHandler {
        }
 
 
+       public void addEnumDecl(String origInt, Declaration enumDecl) {
+
+               mapInt2EnumDecl.put(origInt, enumDecl);
+       }
+
+
+       public void addStructDecl(String origInt, Declaration structDecl) {
+
+               mapInt2StructDecl.put(origInt, structDecl);
+       }
+
+
        /**
         * Getters
         */
@@ -70,4 +86,16 @@ public class DeclarationHandler {
 
                return mapInt2ReqDecl.get(origInt);
        }
+
+
+       public Declaration getEnumDecl(String origInt) {
+
+               return mapInt2EnumDecl.get(origInt);
+       }
+
+
+       public Declaration getStructDecl(String origInt) {
+
+               return mapInt2StructDecl.get(origInt);
+       }
 }