public SegmentedString(SegmentedString other) { m_pushedChar1 = other.m_pushedChar1; m_pushedChar2 = other.m_pushedChar2; m_currentString = new SegmentedSubstring(other.m_currentString); if (m_pushedChar2 != 0) { m_currentChar = m_pushedChar2; } else if (m_pushedChar1 != 0) { m_currentChar = m_pushedChar1; } else { m_currentChar = m_currentString.m_length != 0 ? m_currentString.getCurrentChar() : '\0'; } m_numberOfCharactersConsumedPriorToCurrentString = other.m_numberOfCharactersConsumedPriorToCurrentString; m_numberOfCharactersConsumedPriorToCurrentLine = other.m_numberOfCharactersConsumedPriorToCurrentLine; m_currentLine = other.m_currentLine; m_substrings = new List <SegmentedSubstring>(other.m_substrings); m_closed = other.m_closed; m_empty = other.m_empty; m_fastPathFlags = other.m_fastPathFlags; m_advanceFunc = other.m_advanceFunc; m_advanceAndUpdateLineNumberFunc = other.m_advanceAndUpdateLineNumberFunc; }
public SegmentedSubstring(SegmentedSubstring other) { m_length = other.m_length; m_doNotExcludeLineNumbers = other.m_doNotExcludeLineNumbers; m_string = other.m_string; m_data = other.m_data; }
public SegmentedString(PtrString str) { m_pushedChar1 = '\0'; m_pushedChar2 = '\0'; m_currentString = new SegmentedSubstring(str); m_currentChar = '\0'; m_numberOfCharactersConsumedPriorToCurrentString = 0; m_numberOfCharactersConsumedPriorToCurrentLine = 0; m_currentLine = 0; m_substrings = new List <SegmentedSubstring>(); m_closed = false; m_empty = str.Length == 0; m_fastPathFlags = FastPathFlags.NoFastPath; m_advanceFunc = null; m_advanceAndUpdateLineNumberFunc = null; }