* parser (and lexer) from the policy file.
* This class accepts the AST in the form of ParseNode and
* ParseNodeVector class objects.
- * It gives interfaces to extract the 2 types of policy file:
+ * It gives interfaces to extract the 4 types of policy file:
* 1) Interface and capabilities definition
* 2) Generated interface list ("requires" statements)
+ * 3) Enum declaration
+ * 4) Struct declaration
*
* @author Rahmadi Trimananda <rahmadi.trimananda @ uci.edu>
* @version 1.0
private InterfaceDecl intDecl;
private CapabilityDecl capDecl;
private RequiresDecl reqDecl;
+ private EnumDecl enumDecl;
+ private StructDecl structDecl;
/**
intDecl = new InterfaceDecl();
capDecl = new CapabilityDecl();
reqDecl = new RequiresDecl();
+ enumDecl = new EnumDecl();
+ structDecl = new StructDecl();
}
intDecl = new InterfaceDecl(_intFace);
capDecl = new CapabilityDecl(_intFace);
reqDecl = new RequiresDecl(_intFace);
+ enumDecl = new EnumDecl();
+ structDecl = new StructDecl();
}
}
+ /**
+ * getEnumDecl() returns EnumDecl object
+ */
+ public EnumDecl getEnumDecl() {
+
+ return enumDecl;
+ }
+
+
+ /**
+ * getStructDecl() returns StructDecl object
+ */
+ public StructDecl getStructDecl() {
+
+ return structDecl;
+ }
+
+
/**
* getOrigIntface() returns the original interface in policy, e.g. Camera
* <p>