FieldEnd.h
1 #pragma once
2 // Copyright (c) 2001-2020 Aspose Pty Ltd. All Rights Reserved.
3 // 11/07/2005 by Roman Korchagin
4 
5 #include "Aspose.Words.Cpp/Model/Nodes/NodeType.h"
6 #include "Aspose.Words.Cpp/Model/Fields/Nodes/FieldChar.h"
7 
8 namespace Aspose { namespace Words { namespace RW { namespace Nrx { namespace Reader { class NrxFldCharReaderBase; } } } } }
9 namespace Aspose { namespace Words { namespace Fields { class FieldAppender; } } }
10 namespace Aspose { namespace Words { namespace Fields { class FieldEndFieldBuildingBlock; } } }
11 namespace Aspose { namespace Words { namespace Fields { class Field; } } }
12 namespace Aspose { namespace Words { namespace Validation { class DocumentPostLoader; } } }
13 namespace Aspose { namespace Words { namespace Validation { class FieldValidator; } } }
14 namespace Aspose { namespace Words { namespace Validation { class RubyConverter; } } }
15 namespace Aspose { namespace Words { namespace RW { namespace Nrx { namespace Reader { class NrxFldSimpleReader; } } } } }
16 namespace Aspose { namespace Words { namespace RW { namespace Docx { namespace Writer { class DocxDocumentWriterBase; } } } } }
17 namespace Aspose { namespace Words { namespace RW { class MiscRwUtil; } } }
18 namespace Aspose { namespace Words { namespace RW { namespace Odt { namespace Reader { class OdtTextIndexesReader; } } } } }
19 namespace Aspose { namespace Words { namespace RW { namespace Odt { namespace Reader { class OdtParagraphReader; } } } } }
20 namespace Aspose { namespace Words { namespace RW { namespace Odt { namespace Reader { class OdtFieldReader; } } } } }
21 namespace Aspose { namespace Words { namespace RW { namespace Wml { namespace Reader { class WmlHyperlinkReader; } } } } }
22 namespace Aspose { namespace Words { namespace RW { namespace Docx { namespace Reader { class DocxHyperlinkReader; } } } } }
23 namespace Aspose { namespace Words { namespace RW { namespace Doc { namespace Reader { class ModelBuilder; } } } } }
24 namespace Aspose { namespace Words { namespace RW { namespace Doc { namespace Writer { class DocWriter; } } } } }
25 namespace Aspose { namespace Words { namespace RW { namespace Rtf { namespace Reader { class RtfModelBuilder; } } } } }
26 namespace Aspose { namespace Words { class DocumentBase; } }
27 namespace Aspose { namespace Words { class RunPr; } }
28 namespace Aspose { namespace Words { namespace Fields { enum class FieldType; } } }
29 namespace Aspose { namespace Words { class DocumentVisitor; } }
30 
31 namespace Aspose {
32 
33 namespace Words {
34 
35 namespace Fields {
36 
37 /// <summary>
38 /// Represents an end of a Word field in a document.
39 /// </summary>
40 /// <remarks>
41 /// <p><see cref="FieldEnd"/> is an inline-level node and represented
42 /// by the <see cref="ControlChar.FieldEndChar"/> control character in the document.</p>
43 ///
44 /// <p><see cref="FieldEnd"/> can only be a child of <see cref="Paragraph"/>.</p>
45 ///
46 /// <include file='..\..\Docs\Text.xml' path='Topics/Topic[@name="Field.Common"]/*'/>
47 /// </remarks>
49 {
50  typedef FieldEnd ThisType;
51  typedef Aspose::Words::Fields::FieldChar BaseType;
52 
53  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
55 
57  friend class Aspose::Words::RW::Nrx::Reader::NrxFldCharReaderBase;
58  friend class Aspose::Words::Fields::FieldAppender;
59  friend class Aspose::Words::Fields::FieldEndFieldBuildingBlock;
60  friend class Aspose::Words::Fields::Field;
61  friend class Aspose::Words::Validation::DocumentPostLoader;
62  friend class Aspose::Words::Validation::FieldValidator;
63  friend class Aspose::Words::Validation::RubyConverter;
64  friend class Aspose::Words::RW::Nrx::Reader::NrxFldSimpleReader;
65  friend class Aspose::Words::RW::Docx::Writer::DocxDocumentWriterBase;
66  friend class Aspose::Words::RW::MiscRwUtil;
67  friend class Aspose::Words::RW::Odt::Reader::OdtTextIndexesReader;
68  friend class Aspose::Words::RW::Odt::Reader::OdtParagraphReader;
69  friend class Aspose::Words::RW::Odt::Reader::OdtFieldReader;
70  friend class Aspose::Words::RW::Wml::Reader::WmlHyperlinkReader;
71  friend class Aspose::Words::RW::Docx::Reader::DocxHyperlinkReader;
72  friend class Aspose::Words::RW::Doc::Reader::ModelBuilder;
73  friend class Aspose::Words::RW::Doc::Writer::DocWriter;
74  friend class Aspose::Words::RW::Rtf::Reader::RtfModelBuilder;
75 
76 public:
77 
80 
81  virtual ASPOSE_WORDS_SHARED_API bool Accept(System::SharedPtr<Aspose::Words::DocumentVisitor> visitor);
82 
83 protected:
84 
85  FieldEnd(System::SharedPtr<Aspose::Words::DocumentBase> doc, System::SharedPtr<Aspose::Words::RunPr> runPr, Aspose::Words::Fields::FieldType type, bool hasSeparator);
86 
87  void SetHasSeparator(bool value);
88 
89  virtual ASPOSE_WORDS_SHARED_API ~FieldEnd();
90 
91 private:
92 
93  bool mHasSeparator;
94 
95  ThisType* CppMemberwiseClone() ASPOSE_CONST override { return new ThisType(*this); }
96 
97 };
98 
99 } // namespace Fields
100 } // namespace Words
101 } // namespace Aspose
virtual Aspose::Words::NodeType get_NodeType() const
Definition: Hyphenation.h:12
Definition: Hyphenation.h:12
@ InsertLineBreaks
Insert line breaks after every 76th character.
Provides the abstract base class for a main document and a glossary document of a Word document.
Definition: DocumentBase.h:203
Definition: Bookmark.h:12
#define ASPOSE_WORDS_SHARED_API
Definition: aspose_words_api_defs.h:3
Definition: FieldChar.h:39
#define ASPOSE_CONST
Makes methods labelled as ASPOSE_CONST const.
Definition: defines.h:43
Definition: FieldEnd.h:48
Represents a Microsoft Word document field.
Definition: Field.h:134
bool get_HasSeparator() const
FieldType
Specifies Microsoft Word field types.
Definition: FieldType.h:18
NodeType
Specifies the type of a Word document node.
Definition: NodeType.h:21
virtual bool Accept(System::SharedPtr< Aspose::Words::DocumentVisitor > visitor)
#define FRIEND_FUNCTION_System_MakeObject
Macro to befriend MakeObject function.
Definition: smart_ptr.h:1366
Base class for custom document visitors.
Definition: DocumentVisitor.h:83
#define ASPOSE_WORDS_SHARED_RTTI_INFO_DECL()
Definition: aspose_words_api_defs.h:5