SpecialChar.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 "Aspose.Words.Cpp/Model/Text/Inline.h"
12 
13 namespace Aspose { namespace Words { namespace RW { namespace Nrx { namespace Reader { class NrxRunReaderBase; } } } } }
14 namespace Aspose { namespace Words { namespace Layout { namespace Core { class DocumentLayout; } } } }
15 namespace Aspose { namespace Words { class AbsolutePositionTab; } }
16 namespace Aspose { namespace Words { namespace Fields { class FormField; } } }
17 namespace Aspose { namespace Words { namespace Fields { class FieldChar; } } }
18 namespace Aspose { namespace Words { class DocumentBuilder; } }
19 namespace Aspose { namespace Words { class Comment; } }
20 namespace Aspose { namespace Words { namespace RW { namespace Odt { namespace Reader { class OdtParagraphReader; } } } } }
21 namespace Aspose { namespace Words { namespace RW { namespace Doc { namespace Reader { class ModelBuilder; } } } } }
22 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Reader { class HtmlReader; } } } } }
23 namespace Aspose { namespace Words { namespace RW { namespace Rtf { namespace Reader { class RtfModelBuilder; } } } } }
24 namespace Aspose { namespace Words { class DocumentBase; } }
25 namespace Aspose { namespace Words { class RunPr; } }
26 namespace Aspose { namespace Words { class DocumentVisitor; } }
27 
28 namespace Aspose {
29 
30 namespace Words {
31 
32 
33 /// <summary>
34 /// Base class for special characters in the document.
35 /// </summary>
36 /// <remarks>
37 /// <p>A Microsoft Word document can include a number of special characters
38 /// that represent fields, form fields, shapes, OLE objects, footnotes etc. For the list
39 /// of special characters see <see cref="Aspose::Words::ControlChar" />.</p>
40 ///
41 /// <p><b>SpecialChar</b> is an inline-node and can only be a child of <b>Paragraph</b>.</p>
42 ///
43 /// <p><b>SpecialChar</b> char is used as a base class for more specific classes
44 /// that represent special characters that Aspose.Words provides programmatic access for.
45 /// The <b>SpecialChar</b> class is also used itself to represent special character for which
46 /// Aspose.Words does not provide detailed programmatic access.</p>
47 /// </remarks>
48 class SpecialChar : public Aspose::Words::Inline
49 {
50  typedef SpecialChar ThisType;
51  typedef Aspose::Words::Inline BaseType;
52 
53  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
54  ASPOSE_WORDS_SHARED_RTTI_INFO_DECL();
55 
56  FRIEND_FUNCTION_System_MakeObject;
57  friend class Aspose::Words::RW::Nrx::Reader::NrxRunReaderBase;
58  friend class Aspose::Words::Layout::Core::DocumentLayout;
59  friend class Aspose::Words::AbsolutePositionTab;
60  friend class Aspose::Words::Fields::FormField;
61  friend class Aspose::Words::Fields::FieldChar;
62  friend class Aspose::Words::DocumentBuilder;
63  friend class Aspose::Words::Comment;
64  friend class Aspose::Words::RW::Odt::Reader::OdtParagraphReader;
65  friend class Aspose::Words::RW::Doc::Reader::ModelBuilder;
66  friend class Aspose::Words::RW::Html::Reader::HtmlReader;
67  friend class Aspose::Words::RW::Rtf::Reader::RtfModelBuilder;
68 
69 public:
70 
71  /// <summary>
72  /// Returns <b>NodeType.SpecialChar</b>.
73  /// </summary>
74  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::NodeType get_NodeType() const;
75 
76  /// <summary>
77  /// Accepts a visitor.
78  /// </summary>
79  /// <remarks>
80  /// <p>Calls DocumentVisitor.VisitSpecialChar.</p>
81  /// <p>For more info see the Visitor design pattern.</p>
82  /// </remarks>
83  /// <param name="visitor">The visitor that will visit the node.</param>
84  /// <returns>False if the visitor requested the enumeration to stop.</returns>
86  /// <summary>
87  /// Gets the special character that this node represents.
88  /// </summary>
89  /// <returns>The string that contains the character that this node represents.</returns>
91 
92 protected:
93 
94  SpecialChar(System::SharedPtr<Aspose::Words::DocumentBase> doc, char16_t ch, System::SharedPtr<Aspose::Words::RunPr> runPr);
95 
96  virtual ASPOSE_WORDS_SHARED_API ~SpecialChar();
97 
98 private:
99 
100  System::String mText;
101 
102  ThisType* CppMemberwiseClone() ASPOSE_CONST override { return new ThisType(*this); }
103 
104 };
105 
106 }
107 }
Definition: IFontData.h:20
virtual System::String GetText()
Gets the special character that this node represents.
Definition: Hyphenation.h:18