DocumentVisitor.h
1 //////////////////////////////////////////////////////////////////////////
2 // Copyright 2001-2020 Aspose Pty Ltd. All Rights Reserved.
3 //
4 // This file is part of Aspose.Words. The source code in this file
5 // is only intended as a supplement to the documentation, and is provided
6 // "as is", without warranty of any kind, either expressed or implied.
7 //////////////////////////////////////////////////////////////////////////
8 #pragma once
9 
10 
11 #include <system/shared_ptr.h>
12 #include <system/object.h>
13 #include <cstdint>
14 
15 #include "Aspose.Words.Cpp/Model/Document/VisitorAction.h"
16 #include "Aspose.Words.Cpp/aspose_words_api_defs.h"
17 
18 namespace Aspose { namespace Words { class MoveToRangeStart; } }
19 namespace Aspose { namespace Words { class MoveToRangeEnd; } }
20 namespace Aspose { namespace Words { class MoveFromRangeEnd; } }
21 namespace Aspose { namespace Words { class MoveFromRangeStart; } }
22 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Writer { class HtmlCoreWriter; } } } } }
23 namespace Aspose { namespace Words { class Inline; } }
24 namespace Aspose { namespace Words { class Document; } }
25 namespace Aspose { namespace Words { class Section; } }
26 namespace Aspose { namespace Words { class Body; } }
27 namespace Aspose { namespace Words { class HeaderFooter; } }
28 namespace Aspose { namespace Words { class Paragraph; } }
29 namespace Aspose { namespace Words { namespace Tables { class Table; } } }
30 namespace Aspose { namespace Words { namespace Tables { class Row; } } }
31 namespace Aspose { namespace Words { namespace Tables { class Cell; } } }
32 namespace Aspose { namespace Words { class Run; } }
33 namespace Aspose { namespace Words { namespace Fields { class FieldStart; } } }
34 namespace Aspose { namespace Words { namespace Fields { class FieldSeparator; } } }
35 namespace Aspose { namespace Words { namespace Fields { class FieldEnd; } } }
36 namespace Aspose { namespace Words { namespace Fields { class FormField; } } }
37 namespace Aspose { namespace Words { class BookmarkStart; } }
38 namespace Aspose { namespace Words { class BookmarkEnd; } }
39 namespace Aspose { namespace Words { class Footnote; } }
40 namespace Aspose { namespace Words { class Comment; } }
41 namespace Aspose { namespace Words { class MoveRangeStart; } }
42 namespace Aspose { namespace Words { class MoveRangeEnd; } }
43 namespace Aspose { namespace Words { class EditableRangeStart; } }
44 namespace Aspose { namespace Words { class EditableRangeEnd; } }
45 namespace Aspose { namespace Words { namespace Drawing { class Shape; } } }
46 namespace Aspose { namespace Words { namespace Drawing { class GroupShape; } } }
47 namespace Aspose { namespace Words { namespace Math { class OfficeMath; } } }
48 namespace Aspose { namespace Words { class SpecialChar; } }
49 namespace Aspose { namespace Words { class AbsolutePositionTab; } }
50 namespace Aspose { namespace Words { namespace Markup { class SmartTag; } } }
51 namespace Aspose { namespace Words { namespace Markup { class StructuredDocumentTag; } } }
52 namespace Aspose { namespace Words { namespace BuildingBlocks { class GlossaryDocument; } } }
53 namespace Aspose { namespace Words { namespace BuildingBlocks { class BuildingBlock; } } }
54 namespace Aspose { namespace Words { class CommentRangeStart; } }
55 namespace Aspose { namespace Words { class CommentRangeEnd; } }
56 namespace Aspose { namespace Words { class SubDocument; } }
57 
58 namespace Aspose {
59 
60 namespace Words {
61 
62 
63 /// <summary>
64 /// Base class for custom document visitors.
65 /// </summary>
66 /// <remarks>
67 /// <p>With <b>DocumentVisitor</b> you can define and execute custom operations
68 /// that require enumeration over the document tree.</p>
69 ///
70 /// <p>For example, Aspose.Words uses <b>DocumentVisitor</b> internally for saving <b>Document</b>
71 /// in various formats and for other operations like finding fields or bookmarks over
72 /// a fragment of a document.</p>
73 ///
74 /// <p>To use <b>DocumentVisitor</b>:</p>
75 /// <list type="number">
76 /// <item>Create a class derived from <b>DocumentVisitor</b>.</item>
77 /// <item>Override and provide implementations for some or all of the VisitXXX methods
78 /// to perform some custom operations.</item>
79 /// <item>Call <see cref="Aspose::Words::Node::Accept(System::SharedPtr&lt;Aspose::Words::DocumentVisitor&gt;)">Node.Accept</see> on the <b>Node</b> that
80 /// you want to start the enumeration from.</item>
81 /// </list>
82 ///
83 /// <p><b>DocumentVisitor</b> provides default implementations for all of the VisitXXX methods
84 /// to make it easier to create new document visitors as only the methods required for the particular
85 /// visitor need to be overridden. It is not necessary to override all of the visitor methods.</p>
86 ///
87 /// <p>For more information see the Visitor design pattern.</p>
88 ///
89 /// </remarks>
90 class DocumentVisitor : public virtual System::Object
91 {
92  typedef DocumentVisitor ThisType;
93  typedef System::Object BaseType;
94 
95  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
96  ASPOSE_WORDS_SHARED_RTTI_INFO_DECL();
97 
99  friend class Aspose::Words::MoveToRangeStart;
100  friend class Aspose::Words::MoveToRangeEnd;
101  friend class Aspose::Words::MoveFromRangeEnd;
102  friend class Aspose::Words::MoveFromRangeStart;
103  friend class Aspose::Words::RW::Html::Writer::HtmlCoreWriter;
104  friend class Aspose::Words::Inline;
105 
106 public:
107 
108  /// <summary>
109  /// Called when enumeration of the document has started.
110  /// </summary>
111  /// <param name="doc">The object that is being visited.</param>
112  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
113  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitDocumentStart(System::SharedPtr<Aspose::Words::Document> doc);
114  /// <summary>
115  /// Called when enumeration of the document has finished.
116  /// </summary>
117  /// <param name="doc">The object that is being visited.</param>
118  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
119  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitDocumentEnd(System::SharedPtr<Aspose::Words::Document> doc);
120  /// <summary>
121  /// Called when enumeration of a section has started.
122  /// </summary>
123  /// <param name="section">The object that is being visited.</param>
124  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
125  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitSectionStart(System::SharedPtr<Aspose::Words::Section> section);
126  /// <summary>
127  /// Called when enumeration of a section has ended.
128  /// </summary>
129  /// <param name="section">The object that is being visited.</param>
130  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
131  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitSectionEnd(System::SharedPtr<Aspose::Words::Section> section);
132  /// <summary>
133  /// Called when enumeration of the main text story in a section has started.
134  /// </summary>
135  /// <param name="body">The object that is being visited.</param>
136  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
137  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitBodyStart(System::SharedPtr<Aspose::Words::Body> body);
138  /// <summary>
139  /// Called when enumeration of the main text story in a section has ended.
140  /// </summary>
141  /// <param name="body">The object that is being visited.</param>
142  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
143  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitBodyEnd(System::SharedPtr<Aspose::Words::Body> body);
144  /// <summary>
145  /// Called when enumeration of a header or footer in a section has started.
146  /// </summary>
147  /// <param name="headerFooter">The object that is being visited.</param>
148  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
149  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitHeaderFooterStart(System::SharedPtr<Aspose::Words::HeaderFooter> headerFooter);
150  /// <summary>
151  /// Called when enumeration of a header or footer in a section has ended.
152  /// </summary>
153  /// <param name="headerFooter">The object that is being visited.</param>
154  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
155  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitHeaderFooterEnd(System::SharedPtr<Aspose::Words::HeaderFooter> headerFooter);
156  /// <summary>
157  /// Called when enumeration of a paragraph has started.
158  /// </summary>
159  /// <param name="paragraph">The object that is being visited.</param>
160  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
161  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitParagraphStart(System::SharedPtr<Aspose::Words::Paragraph> paragraph);
162  /// <summary>
163  /// Called when enumeration of a paragraph has ended.
164  /// </summary>
165  /// <param name="paragraph">The object that is being visited.</param>
166  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
167  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitParagraphEnd(System::SharedPtr<Aspose::Words::Paragraph> paragraph);
168  /// <summary>
169  /// Called when enumeration of a table has started.
170  /// </summary>
171  /// <param name="table">The object that is being visited.</param>
172  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
173  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitTableStart(System::SharedPtr<Aspose::Words::Tables::Table> table);
174  /// <summary>
175  /// Called when enumeration of a table has ended.
176  /// </summary>
177  /// <param name="table">The object that is being visited.</param>
178  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
179  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitTableEnd(System::SharedPtr<Aspose::Words::Tables::Table> table);
180  /// <summary>
181  /// Called when enumeration of a table row has started.
182  /// </summary>
183  /// <param name="row">The object that is being visited.</param>
184  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
185  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitRowStart(System::SharedPtr<Aspose::Words::Tables::Row> row);
186  /// <summary>
187  /// Called when enumeration of a table row has ended.
188  /// </summary>
189  /// <param name="row">The object that is being visited.</param>
190  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
191  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitRowEnd(System::SharedPtr<Aspose::Words::Tables::Row> row);
192  /// <summary>
193  /// Called when enumeration of a table cell has started.
194  /// </summary>
195  /// <param name="cell">The object that is being visited.</param>
196  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
197  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitCellStart(System::SharedPtr<Aspose::Words::Tables::Cell> cell);
198  /// <summary>
199  /// Called when enumeration of a table cell has ended.
200  /// </summary>
201  /// <param name="cell">The object that is being visited.</param>
202  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
203  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitCellEnd(System::SharedPtr<Aspose::Words::Tables::Cell> cell);
204  /// <summary>
205  /// Called when a run of text in the is encountered.
206  /// </summary>
207  /// <param name="run">The object that is being visited.</param>
208  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
209  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitRun(System::SharedPtr<Aspose::Words::Run> run);
210  /// <summary>
211  /// Called when a field starts in the document.
212  /// </summary>
213  /// <remarks>
214  /// <p>A field in a Word Word document consists of a field code and field value.</p>
215  /// <p>For example, a field that displays a page number can be represented as follows:</p>
216  /// <p>[FieldStart]PAGE[FieldSeparator]98[FieldEnd]</p>
217  /// <p>The field separator separates field code from field value in the document. Note that some
218  /// fields have only field code and do not have field separator and field value.</p>
219  /// <p>Fields can be nested.</p>
220  /// </remarks>
221  /// <param name="fieldStart">The object that is being visited.</param>
222  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
223  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitFieldStart(System::SharedPtr<Aspose::Words::Fields::FieldStart> fieldStart);
224  /// <summary>
225  /// Called when a field separator is encountered in the document.
226  /// </summary>
227  /// <remarks>
228  /// <p>The field separator separates field code from field value in the document. Note that some
229  /// fields have only field code and do not have field separator and field value.</p>
230  /// <p>For more info see <see cref="Aspose::Words::DocumentVisitor::VisitFieldStart(System::SharedPtr&lt;Aspose::Words::Fields::FieldStart&gt;)" /></p>
231  /// </remarks>
232  /// <param name="fieldSeparator">The object that is being visited.</param>
233  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
234  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitFieldSeparator(System::SharedPtr<Aspose::Words::Fields::FieldSeparator> fieldSeparator);
235  /// <summary>
236  /// Called when a field ends in the document.
237  /// </summary>
238  /// <remarks>
239  /// <p>For more info see <see cref="Aspose::Words::DocumentVisitor::VisitFieldStart(System::SharedPtr&lt;Aspose::Words::Fields::FieldStart&gt;)" /></p>
240  /// </remarks>
241  /// <param name="fieldEnd">The object that is being visited.</param>
242  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
243  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitFieldEnd(System::SharedPtr<Aspose::Words::Fields::FieldEnd> fieldEnd);
244  /// <summary>
245  /// Called when a form field is encountered in the document.
246  /// </summary>
247  /// <param name="formField">The object that is being visited.</param>
248  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
249  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitFormField(System::SharedPtr<Aspose::Words::Fields::FormField> formField);
250  /// <summary>
251  /// Called when a start of a bookmark is encountered in the document.
252  /// </summary>
253  /// <param name="bookmarkStart">The object that is being visited.</param>
254  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
255  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitBookmarkStart(System::SharedPtr<Aspose::Words::BookmarkStart> bookmarkStart);
256  /// <summary>
257  /// Called when an end of a bookmark is encountered in the document.
258  /// </summary>
259  /// <param name="bookmarkEnd">The object that is being visited.</param>
260  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
261  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitBookmarkEnd(System::SharedPtr<Aspose::Words::BookmarkEnd> bookmarkEnd);
262  /// <summary>
263  /// Called when enumeration of a footnote or endnote text has started.
264  /// </summary>
265  /// <param name="footnote">The object that is being visited.</param>
266  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
267  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitFootnoteStart(System::SharedPtr<Aspose::Words::Footnote> footnote);
268  /// <summary>
269  /// Called when enumeration of a footnote or endnote text has ended.
270  /// </summary>
271  /// <param name="footnote">The object that is being visited.</param>
272  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
273  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitFootnoteEnd(System::SharedPtr<Aspose::Words::Footnote> footnote);
274  /// <summary>
275  /// Called when enumeration of a comment text has started.
276  /// </summary>
277  /// <param name="comment">The object that is being visited.</param>
278  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
279  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitCommentStart(System::SharedPtr<Aspose::Words::Comment> comment);
280  /// <summary>
281  /// Called when enumeration of a comment text has ended.
282  /// </summary>
283  /// <param name="comment">The object that is being visited.</param>
284  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
285  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitCommentEnd(System::SharedPtr<Aspose::Words::Comment> comment);
286  /// <summary>
287  /// Called when a start of an editable range is encountered in the document.
288  /// </summary>
289  /// <param name="editableRangeStart">The object that is being visited.</param>
290  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
291  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitEditableRangeStart(System::SharedPtr<Aspose::Words::EditableRangeStart> editableRangeStart);
292  /// <summary>
293  /// Called when an end of an editable range is encountered in the document.
294  /// </summary>
295  /// <param name="editableRangeEnd">The object that is being visited.</param>
296  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
297  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitEditableRangeEnd(System::SharedPtr<Aspose::Words::EditableRangeEnd> editableRangeEnd);
298  /// <summary>
299  /// Called when enumeration of a shape has started.
300  /// </summary>
301  /// <param name="shape">The object that is being visited.</param>
302  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
303  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitShapeStart(System::SharedPtr<Aspose::Words::Drawing::Shape> shape);
304  /// <summary>
305  /// Called when enumeration of a shape has ended.
306  /// </summary>
307  /// <param name="shape">The object that is being visited.</param>
308  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
309  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitShapeEnd(System::SharedPtr<Aspose::Words::Drawing::Shape> shape);
310  /// <summary>
311  /// Called when enumeration of a group shape has started.
312  /// </summary>
313  /// <param name="groupShape">The object that is being visited.</param>
314  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
315  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitGroupShapeStart(System::SharedPtr<Aspose::Words::Drawing::GroupShape> groupShape);
316  /// <summary>
317  /// Called when enumeration of a group shape has ended.
318  /// </summary>
319  /// <param name="groupShape">The object that is being visited.</param>
320  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
321  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitGroupShapeEnd(System::SharedPtr<Aspose::Words::Drawing::GroupShape> groupShape);
322  /// <summary>
323  /// Called when enumeration of a Office Math object has started.
324  /// </summary>
325  /// <param name="officeMath">The object that is being visited.</param>
326  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
327  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitOfficeMathStart(System::SharedPtr<Aspose::Words::Math::OfficeMath> officeMath);
328  /// <summary>
329  /// Called when enumeration of a Office Math object has ended.
330  /// </summary>
331  /// <param name="officeMath">The object that is being visited.</param>
332  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
333  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitOfficeMathEnd(System::SharedPtr<Aspose::Words::Math::OfficeMath> officeMath);
334  /// <summary>
335  /// Called when a <see cref="Aspose::Words::SpecialChar" /> node is encountered in the document.
336  /// </summary>
337  /// <param name="specialChar">The object that is being visited.</param>
338  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
339  /// <remarks>
340  /// This method is not be called for generic control characters (see <see cref="Aspose::Words::ControlChar" />) that can be present in the document.
341  /// </remarks>
342  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitSpecialChar(System::SharedPtr<Aspose::Words::SpecialChar> specialChar);
343  /// <summary>
344  /// Called when a <see cref="Aspose::Words::AbsolutePositionTab" /> node is encountered in the document.
345  /// </summary>
346  /// <param name="tab">The object that is being visited.</param>
347  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
348  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitAbsolutePositionTab(System::SharedPtr<Aspose::Words::AbsolutePositionTab> tab);
349  /// <summary>
350  /// Called when enumeration of a smart tag has started.
351  /// </summary>
352  /// <param name="smartTag">The object that is being visited.</param>
353  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
354  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitSmartTagStart(System::SharedPtr<Aspose::Words::Markup::SmartTag> smartTag);
355  /// <summary>
356  /// Called when enumeration of a smart tag has ended.
357  /// </summary>
358  /// <param name="smartTag">The object that is being visited.</param>
359  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
360  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitSmartTagEnd(System::SharedPtr<Aspose::Words::Markup::SmartTag> smartTag);
361  /// <summary>
362  /// Called when enumeration of a structured document tag has started.
363  /// </summary>
364  /// <param name="sdt">The object that is being visited.</param>
365  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
366  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitStructuredDocumentTagStart(System::SharedPtr<Aspose::Words::Markup::StructuredDocumentTag> sdt);
367  /// <summary>
368  /// Called when enumeration of a structured document tag has ended.
369  /// </summary>
370  /// <param name="sdt">The object that is being visited.</param>
371  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
372  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitStructuredDocumentTagEnd(System::SharedPtr<Aspose::Words::Markup::StructuredDocumentTag> sdt);
373  /// <summary>
374  /// Called when enumeration of a glossary document has started.
375  /// </summary>
376  /// <remarks>
377  /// <para>
378  /// Note: A glossary document node and its children are not visited when you execute a
379  /// Visitor over a <see cref="Aspose::Words::Document" />. If you want to execute a Visitor over a
380  /// glossary document, you need to call <see cref="Aspose::Words::BuildingBlocks::GlossaryDocument::Accept(System::SharedPtr&lt;Aspose::Words::DocumentVisitor&gt;)" />.
381  /// </para>
382  /// </remarks>
383  /// <param name="glossary">The object that is being visited.</param>
384  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
385  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitGlossaryDocumentStart(System::SharedPtr<Aspose::Words::BuildingBlocks::GlossaryDocument> glossary);
386  /// <summary>
387  /// Called when enumeration of a glossary document has ended.
388  /// </summary>
389  /// <remarks>
390  /// <para>
391  /// Note: A glossary document node and its children are not visited when you execute a
392  /// Visitor over a <see cref="Aspose::Words::Document" />. If you want to execute a Visitor over a
393  /// glossary document, you need to call <see cref="Aspose::Words::BuildingBlocks::GlossaryDocument::Accept(System::SharedPtr&lt;Aspose::Words::DocumentVisitor&gt;)" />.
394  /// </para>
395  /// </remarks>
396  /// <param name="glossary">The object that is being visited.</param>
397  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
398  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitGlossaryDocumentEnd(System::SharedPtr<Aspose::Words::BuildingBlocks::GlossaryDocument> glossary);
399  /// <summary>
400  /// Called when enumeration of a building block has started.
401  /// </summary>
402  /// <remarks>
403  /// <para>
404  /// Note: A building block node and its children are not visited when you execute a
405  /// Visitor over a <see cref="Aspose::Words::Document" />. If you want to execute a Visitor over a
406  /// building block, you need to execute the visitor over <see cref="Aspose::Words::BuildingBlocks::GlossaryDocument" /> or
407  /// call <see cref="Aspose::Words::BuildingBlocks::BuildingBlock::Accept(System::SharedPtr&lt;Aspose::Words::DocumentVisitor&gt;)" />.
408  /// </para>
409  /// </remarks>
410  /// <param name="block">The object that is being visited.</param>
411  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
412  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitBuildingBlockStart(System::SharedPtr<Aspose::Words::BuildingBlocks::BuildingBlock> block);
413  /// <summary>
414  /// Called when enumeration of a building block has ended.
415  /// </summary>
416  /// <remarks>
417  /// <para>
418  /// Note: A building block node and its children are not visited when you execute a
419  /// Visitor over a <see cref="Aspose::Words::Document" />. If you want to execute a Visitor over a
420  /// building block, you need to execute the visitor over <see cref="Aspose::Words::BuildingBlocks::GlossaryDocument" /> or
421  /// call <see cref="Aspose::Words::BuildingBlocks::BuildingBlock::Accept(System::SharedPtr&lt;Aspose::Words::DocumentVisitor&gt;)" />.
422  /// </para>
423  /// </remarks>
424  /// <param name="block">The object that is being visited.</param>
425  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
426  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitBuildingBlockEnd(System::SharedPtr<Aspose::Words::BuildingBlocks::BuildingBlock> block);
427  /// <summary>
428  /// Called when the start of a commented range of text is encountered.
429  /// </summary>
430  /// <param name="commentRangeStart">The object that is being visited.</param>
431  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
432  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitCommentRangeStart(System::SharedPtr<Aspose::Words::CommentRangeStart> commentRangeStart);
433  /// <summary>
434  /// Called when the end of a commented range of text is encountered.
435  /// </summary>
436  /// <param name="commentRangeEnd">The object that is being visited.</param>
437  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
438  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitCommentRangeEnd(System::SharedPtr<Aspose::Words::CommentRangeEnd> commentRangeEnd);
439  /// <summary>
440  /// Called when a subDocument is encountered.
441  /// </summary>
442  /// <param name="subDocument">The object that is being visited.</param>
443  /// <returns>A <see cref="Aspose::Words::VisitorAction" /> value that specifies how to continue the enumeration.</returns>
444  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitSubDocument(System::SharedPtr<Aspose::Words::SubDocument> subDocument);
445 
446 protected:
447 
448  virtual ASPOSE_WORDS_SHARED_API bool get_VisitsDeletedNodes();
449  bool get_IsLocked();
450 
451  ASPOSE_WORDS_SHARED_API DocumentVisitor();
452 
453  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitMoveFromRangeStart(System::SharedPtr<Aspose::Words::MoveRangeStart> moveFromRangeStart);
454  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitMoveFromRangeEnd(System::SharedPtr<Aspose::Words::MoveRangeEnd> moveFromRangeEnd);
455  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitMoveToRangeStart(System::SharedPtr<Aspose::Words::MoveRangeStart> moveToRangeStart);
456  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction VisitMoveToRangeEnd(System::SharedPtr<Aspose::Words::MoveRangeEnd> moveToRangeEnd);
457  void Lock();
458  void Unlock();
459 
460 private:
461 
462  int32_t mLockCount;
463 
464 };
465 
466 }
467 }
Definition: DocumentVisitor.h:47
Definition: IFontData.h:20
virtual System::String GetText()
Gets the special character that this node represents.
Definition: Border.h:47
@ InsertLineBreaks
Insert line breaks after every 76th character.
virtual System::String GetText()
Gets the text of the run.
Definition: Border.h:65
Definition: BuildingBlock.h:27
virtual bool Accept(System::SharedPtr< Aspose::Words::DocumentVisitor > visitor)
Accepts a visitor.
#define FRIEND_FUNCTION_System_MakeObject
Macro to befriend MakeObject function.
Definition: smart_ptr.h:1366
virtual bool Accept(System::SharedPtr< Aspose::Words::DocumentVisitor > visitor)
Accepts a visitor.