Beispiel #1
0
 /// <summary>Generate Java code for records.</summary>
 /// <remarks>
 /// Generate Java code for records. This method is only a front-end to
 /// JRecord, since one file is generated for each record.
 /// </remarks>
 /// <param name="name">possibly full pathname to the file</param>
 /// <param name="ilist">included files (as JFile)</param>
 /// <param name="rlist">List of records defined within this file</param>
 /// <param name="destDir">output directory</param>
 /// <exception cref="System.IO.IOException"/>
 internal override void GenCode(string name, AList <JFile> ilist, AList <JRecord> rlist
                                , string destDir, AList <string> options)
 {
     for (IEnumerator <JRecord> iter = rlist.GetEnumerator(); iter.HasNext();)
     {
         JRecord rec = iter.Next();
         rec.GenJavaCode(destDir, options);
     }
 }
Beispiel #2
0
            internal CppRecord(JRecord _enclosing, string name, AList <JField <JType> > flist)
                : base(_enclosing)
            {
                this._enclosing = _enclosing;
                this.fullName   = name.ReplaceAll("\\.", "::");
                int idx = name.LastIndexOf('.');

                this.name   = Runtime.Substring(name, idx + 1);
                this.module = Runtime.Substring(name, 0, idx).ReplaceAll("\\.", "::");
                for (IEnumerator <JField <JType> > iter = flist.GetEnumerator(); iter.HasNext();)
                {
                    JField <JType> f = iter.Next();
                    this.fields.AddItem(new JField <JType.CppType>(f.GetName(), f.GetType().GetCppType
                                                                       ()));
                }
            }
Beispiel #3
0
 internal CRecord(JRecord _enclosing)
     : base(_enclosing)
 {
     this._enclosing = _enclosing;
 }