private bool IsEmbedded(Element element) { return element.TypeOfElement == ElementType.Scalar && element.TypeOfValue.GetByteSize() < 8; }
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; } }
/// <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); }
private int GetPaddedByteSize(Element element) { int byteSize = GetByteSize(element); int padSize = byteSize + 3; return (padSize / 4) * 4; }
/// <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); }