Aspose::Words::DocumentVisitor класс
DocumentVisitor class
Базовый класс для пользовательских посетителей документа. Чтобы узнать больше, посетите статью документации Aspose.Words Document Object Model (DOM).
class DocumentVisitor : public virtual System::Object
Методы
| Метод | Описание |
|---|---|
| GetType() const override | |
| Is(const System::TypeInfo&) const override | |
| static Type() | |
| virtual VisitAbsolutePositionTab(System::SharedPtr<Aspose::Words::AbsolutePositionTab>) | Вызывается, когда в документе встречается узел AbsolutePositionTab. |
| virtual VisitBodyEnd(System::SharedPtr<Aspose::Words::Body>) | Вызывается, когда перечисление основной текстовой истории в разделе завершилось. |
| virtual VisitBodyStart(System::SharedPtr<Aspose::Words::Body>) | Вызывается, когда перечисление основной текстовой истории в разделе началось. |
| virtual VisitBookmarkEnd(System::SharedPtr<Aspose::Words::BookmarkEnd>) | Вызывается, когда в документе встречается конец закладки. |
| virtual VisitBookmarkStart(System::SharedPtr<Aspose::Words::BookmarkStart>) | Вызывается, когда в документе встречается начало закладки. |
| virtual VisitBuildingBlockEnd(System::SharedPtr<Aspose::Words::BuildingBlocks::BuildingBlock>) | Вызывается, когда перечисление строительного блока завершилось. |
| virtual VisitBuildingBlockStart(System::SharedPtr<Aspose::Words::BuildingBlocks::BuildingBlock>) | Вызывается, когда перечисление строительного блока началось. |
| virtual VisitCellEnd(System::SharedPtr<Aspose::Words::Tables::Cell>) | Вызывается, когда перечисление ячейки таблицы завершилось. |
| virtual VisitCellStart(System::SharedPtr<Aspose::Words::Tables::Cell>) | Вызывается, когда перечисление ячейки таблицы началось. |
| virtual VisitCommentEnd(System::SharedPtr<Aspose::Words::Comment>) | Вызывается, когда перечисление текста комментария завершилось. |
| virtual VisitCommentRangeEnd(System::SharedPtr<Aspose::Words::CommentRangeEnd>) | Вызывается, когда встречается конец комментируемого диапазона текста. |
| virtual VisitCommentRangeStart(System::SharedPtr<Aspose::Words::CommentRangeStart>) | Вызывается, когда встречается начало комментируемого диапазона текста. |
| virtual VisitCommentStart(System::SharedPtr<Aspose::Words::Comment>) | Вызывается, когда перечисление текста комментария началось. |
| virtual VisitDocumentEnd(System::SharedPtr<Aspose::Words::Document>) | Вызывается, когда перечисление документа завершилось. |
| virtual VisitDocumentStart(System::SharedPtr<Aspose::Words::Document>) | Вызывается, когда перечисление документа началось. |
| virtual VisitEditableRangeEnd(System::SharedPtr<Aspose::Words::EditableRangeEnd>) | Вызывается, когда в документе встречается конец редактируемого диапазона. |
| virtual VisitEditableRangeStart(System::SharedPtr<Aspose::Words::EditableRangeStart>) | Вызывается, когда в документе встречается начало редактируемого диапазона. |
| virtual VisitFieldEnd(System::SharedPtr<Aspose::Words::Fields::FieldEnd>) | Вызывается, когда в документе заканчивается поле. |
| virtual VisitFieldSeparator(System::SharedPtr<Aspose::Words::Fields::FieldSeparator>) | Вызывается, когда в документе встречается разделитель полей. |
| virtual VisitFieldStart(System::SharedPtr<Aspose::Words::Fields::FieldStart>) | Вызывается, когда в документе начинается поле. |
| virtual VisitFootnoteEnd(System::SharedPtr<Aspose::Words::Notes::Footnote>) | Вызывается, когда перечисление текста сноски или концевой сноски завершилось. |
| virtual VisitFootnoteStart(System::SharedPtr<Aspose::Words::Notes::Footnote>) | Вызывается, когда начинается перечисление текста сноски или концевой сноски. |
| virtual VisitFormField(System::SharedPtr<Aspose::Words::Fields::FormField>) | Вызывается, когда в документе встречается поле формы. |
| virtual VisitGlossaryDocumentEnd(System::SharedPtr<Aspose::Words::BuildingBlocks::GlossaryDocument>) | Вызывается, когда перечисление глоссарного документа завершилось. |
| virtual VisitGlossaryDocumentStart(System::SharedPtr<Aspose::Words::BuildingBlocks::GlossaryDocument>) | Вызывается, когда начинается перечисление глоссарного документа. |
| virtual VisitGroupShapeEnd(System::SharedPtr<Aspose::Words::Drawing::GroupShape>) | Вызывается, когда перечисление групповой фигуры завершилось. |
| virtual VisitGroupShapeStart(System::SharedPtr<Aspose::Words::Drawing::GroupShape>) | Вызывается, когда начинается перечисление групповой фигуры. |
| virtual VisitHeaderFooterEnd(System::SharedPtr<Aspose::Words::HeaderFooter>) | Вызывается, когда перечисление верхнего или нижнего колонтитула в разделе завершилось. |
| virtual VisitHeaderFooterStart(System::SharedPtr<Aspose::Words::HeaderFooter>) | Вызывается, когда начинается перечисление верхнего или нижнего колонтитула в разделе. |
| virtual VisitOfficeMathEnd(System::SharedPtr<Aspose::Words::Math::OfficeMath>) | Вызывается, когда перечисление объекта Office Math завершилось. |
| virtual VisitOfficeMathStart(System::SharedPtr<Aspose::Words::Math::OfficeMath>) | Вызывается, когда начинается перечисление объекта Office Math. |
| virtual VisitParagraphEnd(System::SharedPtr<Aspose::Words::Paragraph>) | Вызывается, когда перечисление абзаца завершилось. |
| virtual VisitParagraphStart(System::SharedPtr<Aspose::Words::Paragraph>) | Вызывается, когда начинается перечисление абзаца. |
| virtual VisitRowEnd(System::SharedPtr<Aspose::Words::Tables::Row>) | Вызывается, когда перечисление строки таблицы завершилось. |
| virtual VisitRowStart(System::SharedPtr<Aspose::Words::Tables::Row>) | Вызывается, когда начинается перечисление строки таблицы. |
| virtual VisitRun(System::SharedPtr<Aspose::Words::Run>) | Вызывается, когда в документе встречается последовательность текста. |
| virtual VisitSectionEnd(System::SharedPtr<Aspose::Words::Section>) | Вызывается, когда перечисление раздела завершилось. |
| virtual VisitSectionStart(System::SharedPtr<Aspose::Words::Section>) | Вызывается, когда начинается перечисление раздела. |
| virtual VisitShapeEnd(System::SharedPtr<Aspose::Words::Drawing::Shape>) | Вызывается, когда перечисление фигуры завершилось. |
| virtual VisitShapeStart(System::SharedPtr<Aspose::Words::Drawing::Shape>) | Вызывается, когда начинается перечисление фигуры. |
| virtual VisitSmartTagEnd(System::SharedPtr<Aspose::Words::Markup::SmartTag>) | Вызывается, когда перечисление смарт‑тега завершилось. |
| virtual VisitSmartTagStart(System::SharedPtr<Aspose::Words::Markup::SmartTag>) | Вызывается, когда начинается перечисление смарт‑тега. |
| virtual VisitSpecialChar(System::SharedPtr<Aspose::Words::SpecialChar>) | Вызывается, когда в документе встречается узел SpecialChar. |
| virtual VisitStructuredDocumentTagEnd(System::SharedPtr<Aspose::Words::Markup::StructuredDocumentTag>) | Вызывается, когда перечисление структурного тега документа завершено. |
| virtual VisitStructuredDocumentTagRangeEnd(System::SharedPtr<Aspose::Words::Markup::StructuredDocumentTagRangeEnd>) | Вызывается, когда встречается StructuredDocumentTagRangeEnd. |
| virtual VisitStructuredDocumentTagRangeStart(System::SharedPtr<Aspose::Words::Markup::StructuredDocumentTagRangeStart>) | Вызывается, когда встречается StructuredDocumentTagRangeStart. |
| virtual VisitStructuredDocumentTagStart(System::SharedPtr<Aspose::Words::Markup::StructuredDocumentTag>) | Вызывается, когда началось перечисление структурного тега документа. |
| virtual VisitSubDocument(System::SharedPtr<Aspose::Words::SubDocument>) | Вызывается, когда обнаруживается вложенный документ. |
| virtual VisitTableEnd(System::SharedPtr<Aspose::Words::Tables::Table>) | Вызывается, когда перечисление таблицы завершено. |
| virtual VisitTableStart(System::SharedPtr<Aspose::Words::Tables::Table>) | Вызывается, когда началось перечисление таблицы. |
Примечания
С помощью DocumentVisitor вы можете определять и выполнять пользовательские операции, требующие перечисления дерева документа.
Например, Aspose.Words использует DocumentVisitor внутри для сохранения Document в различных форматах и для других операций, таких как поиск полей или закладок в фрагменте документа.
Чтобы использовать DocumentVisitor:
- Создайте класс, наследующийся от DocumentVisitor.
- Переопределите и предоставьте реализации некоторых или всех методов VisitXXX для выполнения пользовательских операций.
- Вызовите Node.Accept у Node, с которого вы хотите начать перечисление.
DocumentVisitor provides default implementations for all of the VisitXXX methods to make it easier to create new document visitors as only the methods required for the particular visitor need to be overridden. It is not necessary to override all of the visitor methods.
Для получения дополнительной информации см. шаблон проектирования Visitor.
См. также
- Namespace Aspose::Words
- Library Aspose.Words for C++