1 6 7 package SOFA.Connector.EEG.EEM.Elements; 8 9 import SOFA.Connector.EEG.CodeWriter.JWriterDirectorException; 10 import SOFA.Connector.EEG.EEM.Actions.JIfaceCN; 11 import SOFA.Connector.EEG.EEM.Actions.JImplWriterDirectorBase; 12 import SOFA.SOFAnode.Made.TIR.OperationDef; 13 14 19 public class LocalSkeletonGen extends JImplWriterDirectorBase { 20 21 22 public LocalSkeletonGen(String provIfaceCDL, SOFA.Connector.Property[] params) { 23 super(provIfaceCDL,params); 24 } 25 26 public String [] getImplements() { 27 return new String [] {"SOFA.Connector.EEG.Types.Skeleton"}; 28 } 29 30 public String getClassBody() { 31 return managerTieImpl() + "\n" + linkImpl() + "\n" + 32 "\tpublic SOFA.Connector.TaggedProfile[] getProfiles() {\n"+ 33 "\t\treturn new SOFA.Connector.TaggedProfile[] { new SOFA.Connector.ECG.Profiles.LocalProfile(this) };\n"+ 34 "\t}\n\n"+ 35 "\tpublic org.objectweb.fractal.api.Type getFcItfType() { return null; }\n"+ 36 "\tpublic boolean isFcInternalItf() {return false; }\n"+ 37 "\tpublic String getFcItfName() { return this.target.getFcItfName(); }\n"+ 38 "\tpublic org.objectweb.fractal.api.Component getFcItfOwner() { return this.target.getFcItfOwner(); }\n\n"; 39 } 40 41 public String getMethodDef(OperationDef mt) throws JWriterDirectorException { 42 return JIfaceCN.getMethodDef(mt); 43 } 44 45 public String getMethodBody(OperationDef method) throws JWriterDirectorException { 46 return 47 "\t\t"+declareRet(method,"ret")+"\n"+ 48 "\t\t"+assignRet(method,"ret")+targetCall(method,JIfaceCN.targetCallParams(method))+";\n"+ 49 "\t\t"+returnRet(method,"ret"); 50 } 51 } 52 | Popular Tags |