Aspose.Tasks for C++
ProjectFileInfo.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="ProjectFileInfo.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2024 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include <system/iequatable.h>
9 #include <cstdint>
10 
11 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
12 
13 namespace Aspose
14 {
15 namespace Tasks
16 {
17 enum class ApplicationInfo;
18 enum class FileFormat;
19 namespace IO
20 {
21 namespace Pwa
22 {
23 namespace InternalApi
24 {
25 class InternalApiProjectReader;
26 } // namespace InternalApi
27 } // namespace Pwa
28 namespace Xml
29 {
30 class ProjectNodeWriter;
31 } // namespace Xml
32 } // namespace IO
33 class Project;
34 class ProjectFormatDetector;
35 class ProjectReader;
36 class TaskFieldsFormulaParser;
37 } // namespace Tasks
38 } // namespace Aspose
39 
40 namespace Aspose {
41 
42 namespace Tasks {
43 
44 /// <summary>
45 /// The class instance contains information about project file format and version of Microsoft Project where
46 /// the file was created.
47 /// </summary>
48 /// <remarks>Use CanRead property to define that the library can process the project file.</remarks>
49 class ASPOSE_TASKS_SHARED_CLASS ProjectFileInfo final : public System::IEquatable<System::SharedPtr<Aspose::Tasks::ProjectFileInfo>>
50 {
51  typedef ProjectFileInfo ThisType;
52  typedef System::IEquatable<System::SharedPtr<Aspose::Tasks::ProjectFileInfo>> BaseType;
53 
54  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
55  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
56 
57  friend class Aspose::Tasks::TaskFieldsFormulaParser;
58  friend class Aspose::Tasks::Project;
59  friend class Aspose::Tasks::IO::Pwa::InternalApi::InternalApiProjectReader;
60  friend class Aspose::Tasks::IO::Xml::ProjectNodeWriter;
61  friend class Aspose::Tasks::ProjectReader;
62  friend class Aspose::Tasks::ProjectFormatDetector;
63 
64 public:
65 
66  /// <summary>
67  /// Gets a value indicating whether defines can Aspose.Tasks process the project file.
68  /// </summary>
69  ASPOSE_TASKS_SHARED_API bool get_CanRead() const;
70  /// <summary>
71  /// Gets a value indicating whether a project is password protected.
72  /// </summary>
73  ASPOSE_TASKS_SHARED_API bool get_IsPasswordProtected() const;
74  /// <summary>
75  /// Gets project file format.
76  /// </summary>
77  ASPOSE_TASKS_SHARED_API FileFormat get_ProjectFileFormat() const;
78  /// <summary>
79  /// Gets project file application info.
80  /// </summary>
81  ASPOSE_TASKS_SHARED_API ApplicationInfo get_ProjectApplicationInfo() const;
82 
83  /// <summary>
84  /// Returns a hash code value for the instance of the <see cref="ProjectFileInfo"></see> class.
85  /// </summary>
86  /// <returns>returns a hash code value for this object.</returns>
87  ASPOSE_TASKS_SHARED_API int32_t GetHashCode() const override;
88  /// <summary>
89  /// Returns a value indicating whether this instance is equal to a specified object.
90  /// </summary>
91  /// <param name="other">The specified object to compare with this instance.</param>
92  /// <returns>returns true if the specified ProjectFileInfo and this instance have equal file format and application info.</returns>
93  ASPOSE_TASKS_SHARED_API bool Equals(System::SharedPtr<ProjectFileInfo> other) override;
94  /// <summary>
95  /// Returns a value indicating whether this instance is equal to a specified object.
96  /// </summary>
97  /// <param name="obj">The specified object to compare with this instance.</param>
98  /// <returns>returns true if the specified ProjectFileInfo and this instance have equal file format and application info.</returns>
99  ASPOSE_TASKS_SHARED_API bool Equals(System::SharedPtr<System::Object> obj) override;
100 
101 protected:
102 
103  ASPOSE_TASKS_SHARED_API bool get_IsEmpty();
104 
105  ASPOSE_TASKS_SHARED_API ProjectFileInfo(FileFormat fileFormat);
106 
107  ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(ProjectFileInfo, CODEPORTING_ARGS(FileFormat fileFormat));
108 
109  ASPOSE_TASKS_SHARED_API ProjectFileInfo(FileFormat projectFileFormat, ApplicationInfo projectApplicationInfo);
110 
111  ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(ProjectFileInfo, CODEPORTING_ARGS(FileFormat projectFileFormat, ApplicationInfo projectApplicationInfo));
112 
113  ASPOSE_TASKS_SHARED_API ProjectFileInfo(FileFormat projectFileFormat, ApplicationInfo projectApplicationInfo, bool isPasswordProtected);
114 
115  ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(ProjectFileInfo, CODEPORTING_ARGS(FileFormat projectFileFormat, ApplicationInfo projectApplicationInfo, bool isPasswordProtected));
116  ASPOSE_TASKS_SHARED_API int32_t ToSaveVersion();
117  #ifdef ASPOSE_GET_SHARED_MEMBERS
118  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
119  #endif
120 
121 
122 private:
123 
124  FileFormat projectFileFormat;
125  ApplicationInfo projectApplicationInfo;
126  bool pr_CanRead;
127 
128  /// <summary>
129  /// Gets a value indicating whether defines can Aspose.Tasks process the project file.
130  /// </summary>
131  ASPOSE_TASKS_SHARED_API void set_CanRead(bool value);
132 
133  bool pr_IsPasswordProtected;
134 
135  /// <summary>
136  /// Gets a value indicating whether a project is password protected.
137  /// </summary>
138  ASPOSE_TASKS_SHARED_API void set_IsPasswordProtected(bool value);
139 
140 };
141 
142 } // namespace Tasks
143 } // namespace Aspose
144 
145 
The class instance contains information about project file format and version of Microsoft Project wh...
Definition: ProjectFileInfo.h:49
Represents a project.
Definition: Project.h:551