コード例 #1
0
    public CfxValueClass(CefStructType cefStruct, Parser.ValueStructNode sd, ApiTypeBuilder api)
        : base(cefStruct, sd.Comments)
    {
        var smlist = new List <StructMember>();

        foreach (var smd in sd.StructMembers)
        {
            smlist.Add(new StructMember(cefStruct, Category, smd, api));
        }
        var sm0 = smlist[0];

        if (sm0.Name == "size" && sm0.MemberType.OriginalSymbol == "size_t")
        {
            smlist.RemoveAt(0);
            hasSizeMember = true;
        }
        StructMembers = smlist.ToArray();
    }
コード例 #2
0
        private bool ParseCefTypeStruct(List <ValueStructNode> structs)
        {
            Mark();
            var cefStruct = new ValueStructNode();
            var success   =
                ParseSummary(cefStruct.Comments) &&
                Scan(@"typedef struct _(cef_\w+_t) {", () => cefStruct.Name = Group01);

            if (success)
            {
                while (
                    ParseCefTypeStructMember(cefStruct.StructMembers) ||
                    SkipCommentBlock()
                    )
                {
                    ;
                }
                Ensure(Skip(@"} \w+;"));
                structs.Add(cefStruct);
            }
            Unmark(success);
            return(success);
        }
コード例 #3
0
 public static CfxClass Create(CefStructType cefStruct, Parser.ValueStructNode s, ApiTypeBuilder api)
 {
     return(new CfxValueClass(cefStruct, s, api));
 }
コード例 #4
0
 public void SetMembers(Parser.ValueStructNode s, ApiTypeBuilder api)
 {
     m_classBuilder = CfxClass.Create(this, s, api);
 }