XmpField.h
1 #pragma once
2 // Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved.
3 
4 
5 
6 #include <system/array.h>
7 #include <cstdint>
8 
9 #include "Aspose.PDF.Cpp/aspose_pdf_api_defs.h"
10 
11 namespace Aspose
12 {
13 namespace Pdf
14 {
15 namespace Engine
16 {
17 namespace Data
18 {
19 namespace XMP
20 {
21 class XmpArray;
22 class XmpBaseElement;
23 class XmpDataCollection;
24 class XmpPacket;
25 class XmpProperty;
26 class XmpRawData;
27 class XmpStructure;
28 } // namespace XMP
29 } // namespace Data
30 namespace IO
31 {
32 namespace SaveStrategies
33 {
34 class CommonSaveStrategy;
35 } // namespace SaveStrategies
36 } // namespace IO
37 } // namespace Engine
38 namespace Tests
39 {
40 namespace Engine
41 {
42 namespace Data
43 {
44 namespace XMP
45 {
46 class XmpArrayTests;
47 class XmpMetadataTests;
48 class XmpPacketTests;
49 class XmpPropertyTests;
50 class XmpStructureTests;
51 } // namespace XMP
52 } // namespace Data
53 } // namespace Engine
54 } // namespace Tests
55 enum class XmpFieldType;
56 class XmpValue;
57 } // namespace Pdf
58 } // namespace Aspose
59 
60 namespace Aspose {
61 
62 namespace Pdf {
63 
67 class ASPOSE_PDF_SHARED_CLASS XmpField : public System::Object
68 {
69  typedef XmpField ThisType;
70  typedef System::Object BaseType;
71 
72  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
73  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
74 
75  friend class Aspose::Pdf::Engine::Data::XMP::XmpArray;
76  friend class Aspose::Pdf::Engine::Data::XMP::XmpBaseElement;
77  friend class Aspose::Pdf::Engine::Data::XMP::XmpRawData;
78  friend class Aspose::Pdf::Engine::Data::XMP::XmpDataCollection;
79  friend class Aspose::Pdf::Engine::Data::XMP::XmpPacket;
80  friend class Aspose::Pdf::Engine::Data::XMP::XmpProperty;
81  friend class Aspose::Pdf::Engine::Data::XMP::XmpStructure;
82  friend class Aspose::Pdf::Engine::IO::SaveStrategies::CommonSaveStrategy;
83  friend class Aspose::Pdf::Tests::Engine::Data::XMP::XmpArrayTests;
84  friend class Aspose::Pdf::Tests::Engine::Data::XMP::XmpMetadataTests;
85  friend class Aspose::Pdf::Tests::Engine::Data::XMP::XmpPacketTests;
86  friend class Aspose::Pdf::Tests::Engine::Data::XMP::XmpPropertyTests;
87  friend class Aspose::Pdf::Tests::Engine::Data::XMP::XmpStructureTests;
88  friend ASPOSE_PDF_SHARED_API bool operator ==(const System::SharedPtr<XmpField>& field1, const System::SharedPtr<XmpField>& field2);
89  friend ASPOSE_PDF_SHARED_API bool operator !=(const System::SharedPtr<XmpField>& field1, const System::SharedPtr<XmpField>& field2);
90 
91 public:
92 
96  static ASPOSE_PDF_SHARED_API System::SharedPtr<XmpField> get_Empty();
100  static ASPOSE_PDF_SHARED_API System::SharedPtr<XmpField> get_Lang();
105  ASPOSE_PDF_SHARED_API System::String get_Prefix() const;
110  ASPOSE_PDF_SHARED_API void set_Prefix(System::String value);
115  ASPOSE_PDF_SHARED_API System::String get_NamespaceUri() const;
120  ASPOSE_PDF_SHARED_API void set_NamespaceUri(System::String value);
125  ASPOSE_PDF_SHARED_API System::String get_LocalName() const;
130  ASPOSE_PDF_SHARED_API void set_LocalName(System::String value);
135  ASPOSE_PDF_SHARED_API System::String get_Name() const;
140  ASPOSE_PDF_SHARED_API System::SharedPtr<XmpValue> get_Value() const;
145  ASPOSE_PDF_SHARED_API XmpFieldType get_FieldType();
150  ASPOSE_PDF_SHARED_API bool get_IsEmpty();
151 
159  ASPOSE_PDF_SHARED_API bool Equals(System::SharedPtr<System::Object> obj) override;
166  ASPOSE_PDF_SHARED_API int32_t GetHashCode() const override;
171  ASPOSE_PDF_SHARED_API System::ArrayPtr<System::SharedPtr<XmpField>> ToStructure();
176  ASPOSE_PDF_SHARED_API System::ArrayPtr<System::SharedPtr<XmpValue>> ToArray();
177 
178 protected:
179 
188 
189  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(XmpField, CODEPORTING_ARGS(System::String prefix, System::String name, System::String namespaceUri, System::SharedPtr<System::Object> value));
190 
199 
200  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(XmpField, CODEPORTING_ARGS(System::String prefix, System::String name, System::String namespaceUri, System::SharedPtr<XmpValue> value));
201 
210 
211  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(XmpField, CODEPORTING_ARGS(System::String prefix, System::String name, System::String namespaceUri, System::ArrayPtr<System::SharedPtr<XmpField>> fields));
212 
221 
222  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(XmpField, CODEPORTING_ARGS(System::String prefix, System::String name, System::String namespaceUri, System::ArrayPtr<System::SharedPtr<XmpValue>> value));
223 
230 
231  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(XmpField, CODEPORTING_ARGS(System::SharedPtr<XmpField> baseField, System::SharedPtr<XmpValue> value));
232 
239 
240  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(XmpField, CODEPORTING_ARGS(System::SharedPtr<XmpField> baseField, System::SharedPtr<System::Object> value));
245  void SetValue(System::SharedPtr<XmpValue> value);
246 
247 private:
248 
249  System::String _prefix;
250  System::String _namespaceUri;
251  System::String _localName;
253  static System::SharedPtr<XmpField> EmptyField;
254 
255  static System::SharedPtr<XmpField>& LangField();
256  void SetPrefix(System::String value);
257  void SetNamespaceUri(System::String value);
258  void SetLocalName(System::String value);
259 
260 };
261 
262 ASPOSE_PDF_SHARED_API bool operator ==(const System::SharedPtr<XmpField>& field1, const System::SharedPtr<XmpField>& field2);
263 ASPOSE_PDF_SHARED_API bool operator !=(const System::SharedPtr<XmpField>& field1, const System::SharedPtr<XmpField>& field2);
264 
265 } // namespace Pdf
266 } // namespace Aspose
267 
268 
String class used across the library. Is a substitute for C# System.String when translating code...
Definition: string.h:121
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:64
Represents XMP field.
Definition: XmpField.h:67
Definition: signed_info.h:13
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: fwd.h:22
ASPOSE_PDF_SHARED_API bool operator==(const System::SharedPtr< Color > &x, const System::SharedPtr< Color > &y)
Definition: AFRelationship.h:4
Represents XMP value
Definition: XmpValue.h:100
ASPOSE_PDF_SHARED_API bool operator!=(const System::SharedPtr< Color > &x, const System::SharedPtr< Color > &y)
XmpFieldType
This enum represents types of a XMP field.
Definition: XmpFieldType.h:11
Whole PDF file will be submitted.