예제 #1
0
        public MessageStruct Struct(int index)
        {
            Parse();
            MemberParserType fieldType = Fields[index].Type;

            if (fieldType == MemberParserType.Struct || fieldType == MemberParserType.Vector)
            {
                return((MessageStruct)Fields[index].Value);
            }
            return(null);
        }
예제 #2
0
 public MessageStruct Struct(string name)
 {
     Parse();
     if (FieldIndex.TryGetValue(name, out int index))
     {
         MemberParserType fieldType = Fields[index].Type;
         if (fieldType == MemberParserType.Struct || fieldType == MemberParserType.Vector)
         {
             return((MessageStruct)Fields[index].Value);
         }
     }
     return(null);
 }
예제 #3
0
 public MemberParser(MemberParser Source)
 {
     this.Next            = Source.Next;
     this.Child           = Source.Child;
     this.MemberType      = Source.MemberType;
     this.MemberName      = Source.MemberName;
     this.Condition       = Source.Condition;
     this.ConditionField  = Source.ConditionField;
     this.ConditionXor    = Source.ConditionXor;
     this.ConditionAnd    = Source.ConditionAnd;
     this.ConditionResult = Source.ConditionResult;
     this.LengthField     = Source.LengthField;
     this.LengthMask      = Source.LengthMask;
     this.LengthDelta     = Source.LengthDelta;
     this.PreAlignment    = Source.PreAlignment;
     this.PostAlignment   = Source.PostAlignment;
 }