Aspose.Tasks for C++
RiskAnalysisResult.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="RiskAnalysisResult.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2024 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include <system/object.h>
9 
10 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
11 
12 namespace Aspose
13 {
14 namespace Tasks
15 {
16 class Project;
17 namespace RiskAnalysis
18 {
19 class MonteCarloProjectSimulation;
20 namespace Reporting
21 {
22 class RiskReportBuilder;
23 } // namespace Reporting
24 class RiskAnalysisSettings;
25 class RiskItemStatisticsCollection;
26 enum class RiskItemType;
27 } // namespace RiskAnalysis
28 } // namespace Tasks
29 } // namespace Aspose
30 namespace System
31 {
32 namespace Collections
33 {
34 namespace Generic
35 {
36 template <typename, typename> class IDictionary;
37 } // namespace Generic
38 } // namespace Collections
39 namespace IO
40 {
41 class Stream;
42 } // namespace IO
43 class String;
44 } // namespace System
45 
46 namespace Aspose {
47 
48 namespace Tasks {
49 
50 namespace RiskAnalysis {
51 
52 /// <summary>
53 /// Represents a result of risk analysis.
54 /// </summary>
55 class ASPOSE_TASKS_SHARED_CLASS RiskAnalysisResult : public System::Object
56 {
58  typedef System::Object BaseType;
59 
60  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
61  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
62 
63  friend class Aspose::Tasks::RiskAnalysis::MonteCarloProjectSimulation;
64  friend class Aspose::Tasks::RiskAnalysis::Reporting::RiskReportBuilder;
65 
66 public:
67 
68  /// <summary>
69  /// Returns an instance of the <see cref="RiskItemStatisticsCollection"></see> for the specified risk type.
70  /// </summary>
71  /// <param name="itemType">the specified risk type; can be one of the values of the <see cref="RiskItemType"></see> enumeration.</param>
72  /// <returns>an instance of the <see cref="RiskItemStatisticsCollection"></see> for the specified risk type.</returns>
73  ASPOSE_TASKS_SHARED_API System::SharedPtr<RiskItemStatisticsCollection> GetRiskItems(RiskItemType itemType);
74  /// <summary>
75  /// Saves the risk analysis report to the stream in PDF format.
76  /// </summary>
77  /// <param name="stream">The stream to save risk analysis report to.</param>
78  ASPOSE_TASKS_SHARED_API void SaveReport(const System::SharedPtr<System::IO::Stream>& stream);
79  /// <summary>
80  /// Saves the risk analysis report to the specified file path in PDF format.
81  /// </summary>
82  /// <param name="fileName">The specified file name.</param>
83  ASPOSE_TASKS_SHARED_API void SaveReport(const System::String& fileName);
84 
85 protected:
86 
87  ASPOSE_TASKS_SHARED_API System::SharedPtr<Aspose::Tasks::Project> get_Project() const;
88  ASPOSE_TASKS_SHARED_API System::SharedPtr<RiskAnalysisSettings> get_Settings() const;
89 
90  ASPOSE_TASKS_SHARED_API RiskAnalysisResult(const System::SharedPtr<Aspose::Tasks::Project>& project, const System::SharedPtr<RiskAnalysisSettings>& settings);
91 
92  ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(RiskAnalysisResult, CODEPORTING_ARGS(const System::SharedPtr<Aspose::Tasks::Project>& project, const System::SharedPtr<RiskAnalysisSettings>& settings));
93 
94  virtual ASPOSE_TASKS_SHARED_API ~RiskAnalysisResult();
95 
96  #ifdef ASPOSE_GET_SHARED_MEMBERS
97  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
98  #endif
99 
100 
101 private:
102 
103  System::SharedPtr<System::Collections::Generic::IDictionary<RiskItemType, System::SharedPtr<RiskItemStatisticsCollection>>> risks;
104  System::SharedPtr<RiskAnalysisSettings> settings;
105  System::WeakPtr<Aspose::Tasks::Project> project;
106 
107  System::SharedPtr<System::Collections::Generic::IDictionary<RiskItemType, System::SharedPtr<RiskItemStatisticsCollection>>> InitRiskMap();
108 
109 };
110 
111 } // namespace RiskAnalysis
112 } // namespace Tasks
113 } // namespace Aspose
114 
115 
Represents a result of risk analysis.
Definition: RiskAnalysisResult.h:56
void SaveReport(const System::String &fileName)
Saves the risk analysis report to the specified file path in PDF format.
void SaveReport(const System::SharedPtr< System::IO::Stream > &stream)
Saves the risk analysis report to the stream in PDF format.
System::SharedPtr< RiskItemStatisticsCollection > GetRiskItems(RiskItemType itemType)
Returns an instance of the RiskItemStatisticsCollection for the specified risk type.
Definition: Asn.h:13