コード例 #1
0
 public void Visit(TemplateDecl decl)
 {
     Deserialize(decl);
     decl.TypeParameters = this.Element.Element("TypeParameters").Elements().Select(x => (TypeParameterDecl)SymbolDecl.Deserialize(x)).ToList();
     decl.Specialization = this.Element.Element("Specialization").Elements().Select(x => TypeDecl.Deserialize(x)).ToList();
     decl.Element        = SymbolDecl.Deserialize(this.Element.Element("Element").Elements().First());
 }
コード例 #2
0
 public void Visit(FunctionTypeDecl decl)
 {
     Deserialize(decl);
     decl.CallingConvention = LoadEnum <CallingConvention>(this.Element.Attribute("CallingConvention").Value);
     decl.Const             = bool.Parse(this.Element.Attribute("Const").Value);
     decl.ReturnType        = TypeDecl.Deserialize(this.Element.Element("ReturnType").Elements().First());
     decl.Parameters        = this.Element.Element("Parameters").Elements().Select(x => (VarDecl)SymbolDecl.Deserialize(x)).ToList();
 }
コード例 #3
0
 public void Visit(ClassDecl decl)
 {
     Deserialize(decl);
     decl.ClassType = LoadEnum <ClassType>(this.Element.Attribute("ClassType").Value);
     decl.BaseTypes = this.Element.Element("BaseTypes").Elements().Select(x => (BaseTypeDecl)SymbolDecl.Deserialize(x)).ToList();
 }
コード例 #4
0
 private void Deserialize(SymbolDecl decl)
 {
     decl.Access = LoadEnum <Access>(this.Element.Attribute("Access").Value);
     if (this.Element.Attribute("Name") != null)
     {
         decl.Name = this.Element.Attribute("Name").Value;
     }
     if (this.Element.Element("Document") != null)
     {
         decl.Document = this.Element.Element("Document").Value;
     }
     if (this.Element.Attribute("Tags") != null)
     {
         decl.Tags = this.Element.Attribute("Tags").Value;
     }
     if (this.Element.Attribute("NameKey") != null)
     {
         decl.NameKey = this.Element.Attribute("NameKey").Value;
     }
     if (this.Element.Attribute("OverloadKey") != null)
     {
         decl.OverloadKey = this.Element.Attribute("OverloadKey").Value;
     }
     if (this.Element.Element("Children") != null)
     {
         decl.Children = this.Element.Element("Children").Elements().Select(x => SymbolDecl.Deserialize(x)).ToList();
     }
 }