static private CalculateBinaryLength ( IFrequencyDefinition definition ) : uint | ||
definition | IFrequencyDefinition | |
return | uint |
// RowLength property calculates cell offsets - so it must be called before // accessing cell offsets - this happens automatically since HeaderImage is // called before base class BodyImage which just gets Cells.BinaryImage internal uint RowLength(bool recalculate) { if (m_rowLength == 0 || recalculate) { m_rowLength = 0; for (int x = 0; x < Cells.Count; x++) { ConfigurationCell cell = Cells[x]; cell.Offset = unchecked ((ushort)m_rowLength); m_rowLength += (8 + FrequencyValue.CalculateBinaryLength(cell.FrequencyDefinition)); for (int y = 0; y < cell.PhasorDefinitions.Count; y++) { m_rowLength += PhasorValue.CalculateBinaryLength(cell.PhasorDefinitions[y]); } } } return(m_rowLength); }