Aspose.Tasks for C++
MPPSaveOptions.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="MPPSaveOptions.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/Saving/SimpleSaveOptions.h"
11 #include "aspose.tasks.cpp/aspose_tasks_api_defs.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 Aspose::Tasks::Saving::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 to MPP.
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 to MPP.
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 to MPP.
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 to MPP.
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 password which is used to protect a resulting MPP file. Currently is supported for MS Project 2010 and newer formats.
75  /// <remarks>Null value indicates that the project file is not protected.</remarks>
76  /// </summary>
77  ASPOSE_TASKS_SHARED_API System::String get_ProtectionPassword() const;
78  /// <summary>
79  /// Sets a password which is used to protect a resulting MPP file. Currently is supported for MS Project 2010 and newer formats.
80  /// <remarks>Null value indicates that the project file is not protected.</remarks>
81  /// </summary>
82  ASPOSE_TASKS_SHARED_API void set_ProtectionPassword(const System::String& value);
83 
84  /// <summary>
85  /// Initializes a new instance of the <see cref="MPPSaveOptions"></see> class.
86  /// </summary>
87  ASPOSE_TASKS_SHARED_API MPPSaveOptions();
88 
89 protected:
90 
91  ASPOSE_TASKS_SHARED_API System::SharedPtr<IWriter> GetWriter() override;
92 
93  virtual ASPOSE_TASKS_SHARED_API ~MPPSaveOptions();
94 
95 private:
96 
97  bool pr_RemoveInvalidAssignments;
98  bool pr_WriteViewData;
99  bool pr_WriteFilters;
100  System::String pr_ProtectionPassword;
101 
102  System::SharedPtr<IWriter> GetWriter(const System::SharedPtr<Aspose::Tasks::Project>& project);
103  void UpdateProjectFileSystem();
104 
105 };
106 
107 } // namespace Saving
108 } // namespace Tasks
109 } // namespace Aspose
110 
111 
Allows to specify additional options when saving project data to MPP.
Definition: MPPSaveOptions.h:32
System::String get_ProtectionPassword() const
Gets a password which is used to protect a resulting MPP file. Currently is supported for MS Project ...
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 to MPP.
void set_WriteViewData(bool value)
Sets a value indicating whether to write view data when saving to MPP.
bool get_WriteFilters() const
Gets a value indicating whether to write filter data when saving to MPP.
bool get_WriteViewData() const
Gets a value indicating whether to write view data when saving to MPP.
void set_RemoveInvalidAssignments(bool value)
Sets a value indicating whether to remove invalid resource assignments when saving to MPP.
This is an abstract base class that allow the user to specify basic options when saving a project int...
Definition: SimpleSaveOptions.h:52
Definition: Asn.h:13