Example #1
0
 public SmlString(SmlTypeLengthField a_typeLengthField, Encoding a_encoding)
     : base(a_typeLengthField)
 {
     if (a_encoding != null)
     {
         m_encoding = a_encoding;
     }
     else
     {
         m_encoding = DefaultEncoding;
     }
     m_string = null;
     m_bytes  = null;
 }
Example #2
0
 protected SmlSimpleValue(SmlTypeLengthField a_typeLengthField)
 {
     if (a_typeLengthField != null)
     {
         m_tl = a_typeLengthField;
         if (a_typeLengthField.SmlFieldType != CorespondingSmlType)
         {
             m_state = State.Failed;
         }
         else
         {
             m_value       = InitialValue;
             m_nbBytesRead = 0;
             m_state       = State.WaitForValueByte;
         }
     }
     else
     {
         throw new ArgumentNullException();
     }
 }
Example #3
0
        public SmlList(SmlTypeLengthField a_typeLengthField, Encoding a_encoding)
        {
            m_state    = State.WaitForNextListElement;
            m_encoding = a_encoding;

            if (a_typeLengthField == null)
            {
                throw (new ArgumentNullException());
            }

            m_tl = a_typeLengthField;
            if (a_typeLengthField.SmlFieldType != SmlFieldType.List)
            {
                m_state = State.Failed;
            }
            else
            {
                m_nbElementsRead = 0;
                m_actElement     = new SmlTypeLengthField(m_encoding);
                m_actElement.BeginPopulate();
                m_elements = new SmlBase[m_tl.NbListElements];
                m_state    = State.WaitForNextListElement;
            }
        }
Example #4
0
 public SmlUnsigned8(SmlTypeLengthField a_smlTypeLengthField)
     : base(a_smlTypeLengthField)
 {
 }
Example #5
0
 public SmlSigned32(SmlTypeLengthField a_smlTypeLengthField)
     : base(a_smlTypeLengthField)
 {
 }
Example #6
0
 public SmlBool(SmlTypeLengthField a_smlTypeLengthField)
     : base(a_smlTypeLengthField)
 {
 }
Example #7
0
 public override ParseResult BeginPopulate()
 {
     m_tl    = new SmlTypeLengthField(m_encoding);
     m_state = State.Wait;
     return(m_tl.BeginPopulate());
 }