search/mag_sel search/close
FieldGreetingLine.h
1 // Copyright 2001-2021 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.
9 #pragma once
10 
11 #include <system/array.h>
12 #include <mutex>
13 #include <memory>
14 
15 #include <Aspose.Words.Cpp/Fields/FieldSwitchType.h>
16 #include <Aspose.Words.Cpp/Fields/IFormattableMergeField.h>
17 #include <Aspose.Words.Cpp/Fields/IFieldCodeTokenInfoProvider.h>
18 #include <Aspose.Words.Cpp/Fields/Field.h>
19 #include <Aspose.Words.Cpp/aspose_words_api_defs.h>
20 
21 namespace Aspose { namespace Collections { template <typename> class StringToObjDictionary; } }
22 namespace System { namespace Text { class StringBuilder; } }
23 namespace Aspose { namespace Words { namespace Fields { class FieldUpdateAction; } } }
24 namespace Aspose { namespace Words { class Document; } }
25 namespace Aspose { namespace Words { namespace Fields { class IMergeFormatContext; } } }
26 namespace Aspose { namespace Words { namespace Fields { class MergeFormatPlaceholder; } } }
27 
28 namespace Aspose {
29 
30 namespace Words {
31 
32 namespace Fields {
33 
35 class ASPOSE_WORDS_SHARED_CLASS FieldGreetingLine : public Aspose::Words::Fields::Field, public Aspose::Words::Fields::IFieldCodeTokenInfoProvider, public Aspose::Words::Fields::IFormattableMergeField
36 {
39  typedef Aspose::Words::Fields::IFieldCodeTokenInfoProvider BaseType1;
40  typedef Aspose::Words::Fields::IFormattableMergeField BaseType2;
41 
42  typedef ::System::BaseTypesInfo<BaseType, BaseType1, BaseType2> ThisTypeBaseTypesInfo;
43  ASPOSE_WORDS_SHARED_RTTI_INFO_DECL();
44 
45 public:
46 
48  ASPOSE_WORDS_SHARED_API System::String get_AlternateText();
49 
51  ASPOSE_WORDS_SHARED_API void set_AlternateText(System::String value);
52 
54  ASPOSE_WORDS_SHARED_API System::String get_NameFormat();
55 
57  ASPOSE_WORDS_SHARED_API void set_NameFormat(System::String value);
58 
60  ASPOSE_WORDS_SHARED_API System::String get_LanguageId();
61 
63  ASPOSE_WORDS_SHARED_API void set_LanguageId(System::String value);
64  ASPOSE_WORDS_SHARED_API System::String get_MergeFormat() override;
66 
68  ASPOSE_WORDS_SHARED_API System::ArrayPtr<System::String> GetFieldNames() override;
69  ASPOSE_WORDS_SHARED_API Aspose::Words::Fields::FieldSwitchType GetSwitchType(System::String switchName) override;
72 
73  ASPOSE_WORDS_SHARED_API FieldGreetingLine();
74 
75 protected:
76 
77  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Fields::FieldUpdateAction> UpdateCore() override;
78 
79  virtual ASPOSE_WORDS_SHARED_API ~FieldGreetingLine();
80 
81 private:
82 
84  static System::ArrayPtr<System::String>& gValidFormats();
85 
86  System::String mTextBefore;
87  System::String mTextAfter;
89 
90  static const System::String& AlternateTextSwitch();
91  static const System::String& NameFormatSwitch();
92  static const System::String& LanguageIdSwitch();
93  bool IsValidFormat();
94 
95  static void __StaticConstructor__();
96 
97 };
98 
99 }
100 }
101 }