Search in sources :

Example 1 with StructDef

use of org.omg.CORBA.StructDef in project ACS by ACS-Community.

the class BACIIntrospector method getStructDef.

private DataStruct getStructDef(TypeCode tc) {
    if (tc.kind() != TCKind.tk_struct)
        return null;
    try {
        DataStruct ds = new DataStruct(tc.id());
        Contained ctd = ra.lookupId(tc.id());
        StructDef sd = StructDefHelper.narrow(ctd);
        StructMember[] mems = sd.members();
        for (int i = 0; i < mems.length; i++) {
            DataType dt = new BACIDataType(getClassType(mems[i].type));
            dt.setElement(getDef(mems[i].type));
            ds.add(mems[i].name, dt);
        }
        return ds;
    } catch (org.omg.CORBA.TypeCodePackage.BadKind e) {
        e.printStackTrace();
        return null;
    }
}
Also used : DataStruct(si.ijs.acs.objectexplorer.engine.DataStruct) Contained(org.omg.CORBA.Contained) DataType(si.ijs.acs.objectexplorer.engine.DataType) StructMember(org.omg.CORBA.StructMember) StructDef(org.omg.CORBA.StructDef)

Aggregations

Contained (org.omg.CORBA.Contained)1 StructDef (org.omg.CORBA.StructDef)1 StructMember (org.omg.CORBA.StructMember)1 DataStruct (si.ijs.acs.objectexplorer.engine.DataStruct)1 DataType (si.ijs.acs.objectexplorer.engine.DataType)1