Aspose.Tasks for C++
LoadOptions.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="LoadOptions.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2024 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include <system/string.h>
9 
10 #include "aspose.tasks.cpp/IO/Xml/ParseErrorCallback.h"
11 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
12 
13 namespace Aspose
14 {
15 namespace LicenseV2
16 {
17 namespace Venture
18 {
19 class VentureLicense;
20 } // namespace Venture
21 } // namespace LicenseV2
22 namespace Tasks
23 {
24 class ICancellationTracker;
25 class ParseErrorArgs;
26 class PrimaveraBaseReader;
27 class PrimaveraReadOptions;
28 class Project;
29 class ProjectReader;
30 } // namespace Tasks
31 } // namespace Aspose
32 namespace System
33 {
34 namespace Text
35 {
36 class Encoding;
37 } // namespace Text
38 } // namespace System
39 
40 namespace Aspose {
41 
42 namespace Tasks {
43 
44 /// <summary>
45 /// Allows to specify additional load parameters when loading a project from file or stream.
46 /// </summary>
47 class ASPOSE_TASKS_SHARED_CLASS LoadOptions : public System::Object
48 {
49  typedef LoadOptions ThisType;
50  typedef System::Object BaseType;
51 
52  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
53  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
54 
56  friend class Aspose::Tasks::Project;
57  friend class Aspose::Tasks::ProjectReader;
58 
59 public:
60 
61  /// <summary>
62  /// Gets a callback method to handle xml parse errors.
63  /// </summary>
64  ASPOSE_TASKS_SHARED_API ParseErrorCallback get_ErrorHandler() const;
65  /// <summary>
66  /// Sets a callback method to handle xml parse errors.
67  /// </summary>
68  ASPOSE_TASKS_SHARED_API void set_ErrorHandler(ParseErrorCallback value);
69  /// <summary>
70  /// Gets a protection password.
71  /// </summary>
72  ASPOSE_TASKS_SHARED_API System::String get_Password() const;
73  /// <summary>
74  /// Sets a protection password.
75  /// </summary>
76  ASPOSE_TASKS_SHARED_API void set_Password(const System::String& value);
77  /// <summary>
78  /// Gets a specified instance of the <see cref="Tasks::PrimaveraReadOptions"></see> class which can be used to customize the behavior of loading Primavera formats (Primavera P6 XER or Primavera P6 Xml).
79  /// </summary>
80  ASPOSE_TASKS_SHARED_API const System::SharedPtr<Aspose::Tasks::PrimaveraReadOptions>& get_PrimaveraReadOptions() const;
81  /// <summary>
82  /// Sets a specified instance of the <see cref="Tasks::PrimaveraReadOptions"></see> class which can be used to customize the behavior of loading Primavera formats (Primavera P6 XER or Primavera P6 Xml).
83  /// </summary>
84  ASPOSE_TASKS_SHARED_API void set_PrimaveraReadOptions(const System::SharedPtr<Aspose::Tasks::PrimaveraReadOptions>& value);
85  /// <summary>
86  /// Gets encoding which is used to read a project from HTML, MPX, XER and Primavera XML formats.
87  /// The default encoding is UTF8.
88  /// </summary>
89  ASPOSE_TASKS_SHARED_API const System::SharedPtr<System::Text::Encoding>& get_Encoding() const;
90  /// <summary>
91  /// Sets encoding which is used to read a project from HTML, MPX, XER and Primavera XML formats.
92  /// The default encoding is UTF8.
93  /// </summary>
94  ASPOSE_TASKS_SHARED_API void set_Encoding(const System::SharedPtr<System::Text::Encoding>& value);
95 
96  /// <summary>
97  /// Initializes a new instance of the <see cref="LoadOptions"></see> class.
98  /// </summary>
99  ASPOSE_TASKS_SHARED_API LoadOptions();
100 
101 protected:
102 
103  /// <summary>
104  /// Gets venture license. This value will be set by VentureLicenser if the venture passes us a LoadOptions object.
105  /// </summary>
106  ASPOSE_TASKS_SHARED_API const System::SharedPtr<Aspose::LicenseV2::Venture::VentureLicense>& get_VentureLicense() const;
107  /// <summary>
108  /// Sets venture license. This value will be set by VentureLicenser if the venture passes us a LoadOptions object.
109  /// </summary>
110  ASPOSE_TASKS_SHARED_API void set_VentureLicense(const System::SharedPtr<Aspose::LicenseV2::Venture::VentureLicense>& value);
111 
112  ASPOSE_TASKS_SHARED_API LoadOptions(const System::SharedPtr<Aspose::Tasks::PrimaveraReadOptions>& primaveraReadOptions);
113 
114  ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(LoadOptions, CODEPORTING_ARGS(const System::SharedPtr<Aspose::Tasks::PrimaveraReadOptions>& primaveraReadOptions));
115  ASPOSE_TASKS_SHARED_API System::SharedPtr<ICancellationTracker> GetCancellationTracker();
116  #ifdef ASPOSE_GET_SHARED_MEMBERS
117  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
118  #endif
119 
120 
121 private:
122 
123  ParseErrorCallback pr_ErrorHandler;
124  System::String pr_Password;
125  System::SharedPtr<Aspose::Tasks::PrimaveraReadOptions> pr_PrimaveraReadOptions;
126  System::SharedPtr<System::Text::Encoding> pr_Encoding;
127  System::SharedPtr<Aspose::LicenseV2::Venture::VentureLicense> pr_VentureLicense;
128 
129 };
130 
131 } // namespace Tasks
132 } // namespace Aspose
133 
134 
Allows to specify additional load parameters when loading a project from file or stream.
Definition: LoadOptions.h:47
Represents a base reader which can be used to read Project UIDs from multi project Primavera XER or X...
Definition: PrimaveraBaseReader.h:48
Represents a project.
Definition: Project.h:551