// Used to ensure the each source is added to the list at the bottom of the web page only once.
 public abstract bool SameAs( CSourceCitationInLine sc );
 // Tests to see if this source citation displays the same as the inline citation given.
 // Used to ensure the each source is added to the list at the bottom of the web page only once.
 public override bool SameAs(CSourceCitationInLine sc)
 {
     return false;
 }
 // Tests to see if this source citation displays the same as the inline citation given.
 // Used to ensure the each source is added to the list at the bottom of the web page only once.
 public override bool SameAs(CSourceCitationInLine sc)
 {
     return( this.m_bRestricted == sc.m_bRestricted
         && this.m_sSourceDescription == sc.m_sSourceDescription
         && m_sCertaintyAssessment == sc.m_sCertaintyAssessment );
 }
        // Parser
        public static new CSourceCitationInLine Parse( CGedcom gedcom, int nLevel )
        {
            CGedcomLine gedcomLine;

            // Temporary holders for class members. Saves constructing a class early.
            string sSourceDescription;
            ArrayList alTextsFromSource = new ArrayList();
            CMultimediaLink multimediaLink;
            ArrayList alMultimediaLinks = new ArrayList();
            CNoteStructure noteStructure;
            ArrayList alNoteStructures = new ArrayList();
            string sCertaintyAssessment = "";

            // There must be one of these, it defines the object.
            if ((gedcomLine = gedcom.GetLine(nLevel, "SOUR")) == null)
            {
                // Not one of us
                return null;
            }
            sSourceDescription = gedcomLine.LineItem;

            // Parsing is going well enough to say that we definitely have one of these,
            // so we can adjust the gedcom now.
            gedcom.IncrementLineIndex(1);

            bool bParsingFinished;
            do
            {
                bParsingFinished = true;

                if( (gedcomLine = gedcom.GetLine(nLevel+1, "CONC")) != null )
                {
                    sSourceDescription += gedcomLine.LineItem;
                    gedcom.IncrementLineIndex(1);
                    bParsingFinished = false;
                }
                else if( (gedcomLine = gedcom.GetLine(nLevel+1, "CONT")) != null )
                {
                    sSourceDescription += "\n" + gedcomLine.LineItem;
                    gedcom.IncrementLineIndex(1);
                    bParsingFinished = false;
                }
                else if( (gedcomLine = gedcom.GetLine(nLevel+1, "TEXT")) != null )
                {
                    string textFromSource = gedcomLine.LineItem;

                    gedcom.IncrementLineIndex(1);
                    bool bParsingFinished3;
                    do
                    {
                        bParsingFinished3 = true;
                        if( (gedcomLine = gedcom.GetLine(nLevel+2, "CONC")) != null )
                        {
                            textFromSource += gedcomLine.LineItem;
                            gedcom.IncrementLineIndex(1);
                            bParsingFinished3 = false;
                        }
                        else if( (gedcomLine = gedcom.GetLine(nLevel+2, "CONT")) != null )
                        {
                            textFromSource += "\n" + gedcomLine.LineItem;
                            gedcom.IncrementLineIndex(1);
                            bParsingFinished3 = false;
                        }
                    }
                    while( !bParsingFinished3 );

                    alTextsFromSource.Add( textFromSource );
                    bParsingFinished = false;
                }
                else if( (multimediaLink = CMultimediaLink.Parse( gedcom, nLevel+1 )) != null )
                {
                    alMultimediaLinks.Add( multimediaLink );
                    bParsingFinished = false;
                }
                else if( (noteStructure = CNoteStructure.Parse( gedcom, nLevel+1 )) != null )
                {
                    alNoteStructures.Add( noteStructure );
                    bParsingFinished = false;
                }
                else if( (gedcomLine = gedcom.GetLine(nLevel+1, "QUAY")) != null )
                {
                    sCertaintyAssessment = gedcomLine.LineItem;
                    gedcom.IncrementLineIndex(1);
                    bParsingFinished = false;
                }
                else if( ( gedcomLine = gedcom.GetLine()).Level > nLevel )
                {
                    LogFile.TheLogFile.WriteLine( LogFile.DT_GEDCOM, LogFile.EDebugLevel.Warning, "Unknown tag :" );
                    LogFile.TheLogFile.WriteLine( LogFile.DT_GEDCOM, LogFile.EDebugLevel.Warning, gedcomLine.ToString() );
                    gedcom.IncrementLineIndex(1);
                    bParsingFinished = false;
                }
            }
            while( !bParsingFinished );

            // Parsing went ok. Construct a new object and return it.
            CSourceCitationInLine sc = new CSourceCitationInLine( gedcom );
            sc.m_sSourceDescription = sSourceDescription;
            sc.m_alTextsFromSource = alTextsFromSource;
            sc.m_alMultimediaLinks = alMultimediaLinks;
            sc.m_alNoteStructures = alNoteStructures;
            sc.m_sCertaintyAssessment = sCertaintyAssessment;
            return sc;
        }
 // Copy Constructor
 public override CSourceCitation CopyConstructor()
 {
     CSourceCitationInLine scil = new CSourceCitationInLine( Gedcom );
     CopyFieldsInto( scil );
     scil.m_bRestricted = m_bRestricted;
     scil.m_sSourceDescription = m_sSourceDescription;
     scil.m_alBackreferences = new ArrayList();
     foreach( CBackReference br in m_alBackreferences )
     {
         scil.m_alBackreferences.Add( new CBackReference( br ) );
     }
     return scil;
 }