void CSequence::AddComment(CComment* comment) { if (m_comments == NULL) { m_comments = comment; } else { CComment* curComment = m_comments; while (curComment->GetNext() != NULL) { curComment = curComment->GetNext(); } curComment->SetNext(comment); } }
void CModel::AddComment(CComment* comment) { if (m_curSequence != NULL) { m_curSequence->AddComment(comment); return; } if (m_comments == NULL) { m_comments = comment; } else { CComment* curComment = m_comments; while (curComment->GetNext() != NULL) { curComment = curComment->GetNext(); } curComment->SetNext(comment); } }