Aspose.Tasks for C++
MPPSaveOptions.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="MPPSaveOptions.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2025 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include <system/string.h>
9 
10 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
11 #include "aspose.tasks.cpp/Saving/SimpleSaveOptions.h"
12 
13 namespace Aspose
14 {
15 namespace Tasks
16 {
17 class IWriter;
18 class Project;
19 } // namespace Tasks
20 } // namespace Aspose
21 
22 namespace Aspose {
23 
24 namespace Tasks {
25 
26 namespace Saving {
27 
28 /// <summary>
29 /// Allows to specify additional options when saving project data to MPP.
30 /// </summary>
31 class ASPOSE_TASKS_SHARED_CLASS MPPSaveOptions : public SimpleSaveOptions
32 {
33  typedef MPPSaveOptions ThisType;
35 
36  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
37  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
38 
39 public:
40 
41  /// <summary>
42  /// Gets a value indicating whether to remove invalid resource assignments when saving to MPP.
43  /// <remarks>MS Project creates an empty resource assignment for each task. Set this flag to true to remove them on save.</remarks>
44  /// </summary>
45  ASPOSE_TASKS_SHARED_API bool get_RemoveInvalidAssignments() const;
46  /// <summary>
47  /// Sets a value indicating whether to remove invalid resource assignments when saving to MPP.
48  /// <remarks>MS Project creates an empty resource assignment for each task. Set this flag to true to remove them on save.</remarks>
49  /// </summary>
50  ASPOSE_TASKS_SHARED_API void set_RemoveInvalidAssignments(bool value);
51  /// <summary>
52  /// Gets a value indicating whether to write view data when saving a project to MPP format.
53  /// <remarks>View data includes Project.Views, Filters and Tables collections.</remarks>
54  /// </summary>
55  ASPOSE_TASKS_SHARED_API bool get_WriteViewData() const;
56  /// <summary>
57  /// Sets a value indicating whether to write view data when saving a project to MPP format.
58  /// <remarks>View data includes Project.Views, Filters and Tables collections.</remarks>
59  /// </summary>
60  ASPOSE_TASKS_SHARED_API void set_WriteViewData(bool value);
61  /// <summary>
62  /// Gets a value indicating whether to write filter data when saving a project to MPP for format.
63  /// <remarks>Filter data includes Project.TaskFilters and Project.ResourceFilters collections.</remarks>
64  /// </summary>
65  /// <remarks>Currently supported for MSP 2010 or newer formats.</remarks>
66  ASPOSE_TASKS_SHARED_API bool get_WriteFilters() const;
67  /// <summary>
68  /// Sets a value indicating whether to write filter data when saving a project to MPP for format.
69  /// <remarks>Filter data includes Project.TaskFilters and Project.ResourceFilters collections.</remarks>
70  /// </summary>
71  /// <remarks>Currently supported for MSP 2010 or newer formats.</remarks>
72  ASPOSE_TASKS_SHARED_API void set_WriteFilters(bool value);
73  /// <summary>
74  /// Gets a value indicating whether to write groups data when saving a project to MPP for format.
75  /// <remarks>Group data includes Project.TaskGroups and Project.ResourceGroups collections.</remarks>
76  /// </summary>
77  ASPOSE_TASKS_SHARED_API bool get_WriteGroups() const;
78  /// <summary>
79  /// Sets a value indicating whether to write groups data when saving a project to MPP for format.
80  /// <remarks>Group data includes Project.TaskGroups and Project.ResourceGroups collections.</remarks>
81  /// </summary>
82  ASPOSE_TASKS_SHARED_API void set_WriteGroups(bool value);
83  /// <summary>
84  /// Gets a value indicating whether to remove existing VBA macros data when saving a project to MPP format.
85  /// </summary>
86  ASPOSE_TASKS_SHARED_API bool get_ClearVba() const;
87  /// <summary>
88  /// Sets a value indicating whether to remove existing VBA macros data when saving a project to MPP format.
89  /// </summary>
90  ASPOSE_TASKS_SHARED_API void set_ClearVba(bool value);
91  /// <summary>
92  /// Gets a password which is used to protect a resulting MPP file. Currently is supported for MS Project 2010 and newer formats.
93  /// <remarks>Null value indicates that the project file is not protected.</remarks>
94  /// </summary>
95  ASPOSE_TASKS_SHARED_API System::String get_ProtectionPassword() const;
96  /// <summary>
97  /// Sets a password which is used to protect a resulting MPP file. Currently is supported for MS Project 2010 and newer formats.
98  /// <remarks>Null value indicates that the project file is not protected.</remarks>
99  /// </summary>
100  ASPOSE_TASKS_SHARED_API void set_ProtectionPassword(const System::String& value);
101 
102  /// <summary>
103  /// Initializes a new instance of the <see cref="MPPSaveOptions"></see> class.
104  /// </summary>
105  ASPOSE_TASKS_SHARED_API MPPSaveOptions();
106 
107 protected:
108 
109  ASPOSE_TASKS_SHARED_API System::SharedPtr<IWriter> GetWriter() override;
110 
111  ASPOSE_TASKS_SHARED_API virtual ~MPPSaveOptions();
112 
113 private:
114 
115  bool pr_RemoveInvalidAssignments;
116  bool pr_WriteViewData;
117  bool pr_WriteFilters;
118  bool pr_WriteGroups;
119  bool pr_ClearVba;
120  System::String pr_ProtectionPassword;
121 
122  System::SharedPtr<IWriter> GetWriter(const System::SharedPtr<Aspose::Tasks::Project>& project);
123  void UpdateProjectFileSystem();
124 
125 };
126 
127 } // namespace Saving
128 } // namespace Tasks
129 } // namespace Aspose
130 
131 
Allows to specify additional options when saving project data to MPP.
Definition: MPPSaveOptions.h:32
bool get_WriteGroups() const
Gets a value indicating whether to write groups data when saving a project to MPP for format.
System::String get_ProtectionPassword() const
Gets a password which is used to protect a resulting MPP file. Currently is supported for MS Project ...
bool get_ClearVba() const
Gets a value indicating whether to remove existing VBA macros data when saving a project to MPP forma...
MPPSaveOptions()
Initializes a new instance of the MPPSaveOptions class.
bool get_RemoveInvalidAssignments() const
Gets a value indicating whether to remove invalid resource assignments when saving to MPP.
void set_ProtectionPassword(const System::String &value)
Sets a password which is used to protect a resulting MPP file. Currently is supported for MS Project ...
void set_WriteFilters(bool value)
Sets a value indicating whether to write filter data when saving a project to MPP for format.
void set_WriteViewData(bool value)
Sets a value indicating whether to write view data when saving a project to MPP format.
bool get_WriteFilters() const
Gets a value indicating whether to write filter data when saving a project to MPP for format.
void set_WriteGroups(bool value)
Sets a value indicating whether to write groups data when saving a project to MPP for format.
bool get_WriteViewData() const
Gets a value indicating whether to write view data when saving a project to MPP format.
void set_RemoveInvalidAssignments(bool value)
Sets a value indicating whether to remove invalid resource assignments when saving to MPP.
void set_ClearVba(bool value)
Sets a value indicating whether to remove existing VBA macros data when saving a project to MPP forma...
This is an abstract base class that allow the user to specify basic options when saving a project int...
Definition: SimpleSaveOptions.h:52
Aspose.
Definition: Asn.h:13