Ejemplo n.º 1
0
 private bool IsEmbedded(Element element)
 {
     return element.TypeOfElement == ElementType.Scalar && element.TypeOfValue.GetByteSize() < 8;
 }
Ejemplo n.º 2
0
        private int GetByteSize(Element element)
        {
            switch (element.TypeOfElement)
            {
                case ElementType.Collection:
                    return GetByteSize(element as CollectionElement);

                case ElementType.Vector:
                    return GetByteSize(element as VectorElement);

                case ElementType.Scalar:
                    return GetByteSize(element as ScalarElement);

                default:
                    return 0;
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Removes the given element from the collection.
 /// </summary>
 /// <param name="element">The element to be removed.</param>
 public void RemoveElement(Element element)
 {
     m_elements.Remove(element);
 }
Ejemplo n.º 4
0
 private int GetPaddedByteSize(Element element)
 {
     int byteSize = GetByteSize(element);
     int padSize = byteSize + 3;
     return (padSize / 4) * 4;
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Adds the given element to the collection.
 /// </summary>
 /// <param name="element">The element to be added.</param>
 public void AddElement(Element element)
 {
     m_elements.Add(element);
 }