Aspose.Tasks for C++
ProjectView.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="ProjectView.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 class ResourceAssignment;
18 namespace Saving
19 {
20 class SaveOptions;
21 } // namespace Saving
22 class TableField;
23 class View;
24 namespace Visualization
25 {
26 class ApsGanttChartLayoutBuilder;
27 class ApsTaskSheetBuilder;
28 class ApsTaskUsageBuilder;
29 class GanttChartColumn;
30 class ResourceViewColumn;
31 class ViewColumn;
32 } // namespace Visualization
33 } // namespace Tasks
34 } // namespace Aspose
35 namespace System
36 {
37 namespace Collections
38 {
39 namespace Generic
40 {
41 template <typename> class IEnumerable;
42 template <typename> class List;
43 } // namespace Generic
44 } // namespace Collections
45 class String;
46 } // namespace System
47 
48 namespace Aspose {
49 
50 namespace Tasks {
51 
52 namespace Visualization {
53 
54 /// <summary>
55 /// Project's view class
56 /// </summary>
57 class ASPOSE_TASKS_SHARED_CLASS ProjectView : public System::Object
58 {
59  typedef ProjectView ThisType;
60  typedef System::Object BaseType;
61 
62  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
63  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
64 
66  friend class Aspose::Tasks::Visualization::ApsGanttChartLayoutBuilder;
67  friend class Aspose::Tasks::Visualization::ApsTaskSheetBuilder;
68  friend class Aspose::Tasks::Visualization::ApsTaskUsageBuilder;
69 
70 public:
71 
72  /// <summary>
73  /// Gets the project view columns.
74  /// </summary>
75  ASPOSE_TASKS_SHARED_API const System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<ViewColumn>>>& get_Columns() const;
76 
77  /// <summary>
78  /// Initializes a new instance of the <see cref="ProjectView"></see> class.
79  /// </summary>
80  /// <param name="columns">A list of the view columns.</param>
81  ASPOSE_TASKS_SHARED_API ProjectView(const System::SharedPtr<System::Collections::Generic::IEnumerable<System::SharedPtr<ViewColumn>>>& columns);
82 
83  /// <summary>
84  /// Includes id, indicators, name, duration, start and finish task columns.
85  /// </summary>
86  /// <returns>a view which contains a list of <see cref="GanttChartColumn"></see>.</returns>
87  static ASPOSE_TASKS_SHARED_API System::SharedPtr<ProjectView> GetDefaultGanttChartView();
88  /// <summary>
89  /// Includes id, indicators, name, duration, start, finish, predecessors and resource names task columns.
90  /// </summary>
91  /// <returns>a view which contains a list of <see cref="GanttChartColumn"></see>.</returns>
92  static ASPOSE_TASKS_SHARED_API System::SharedPtr<ProjectView> GetDefaultTaskSheetView();
93  /// <summary>
94  /// Includes Uid, name, start, finish and work resource columns.
95  /// </summary>
96  /// <returns>a view which contains a list of <see cref="ResourceViewColumn"></see>.</returns>
97  static ASPOSE_TASKS_SHARED_API System::SharedPtr<ProjectView> GetDefaultResourceUsageView();
98  /// <summary>
99  /// Includes Uid, task name, resource name, work and duration assignment columns.
100  /// </summary>
101  /// <returns>a view which contains a list of <see cref="AssignmentViewColumn"></see>.</returns>
102  static ASPOSE_TASKS_SHARED_API System::SharedPtr<ProjectView> GetDefaultAssignmentView();
103  /// <summary>
104  /// Includes Uid, resource name, type, material label, initials, group, max units,
105  /// standard rate, overtime rate, cost per use, accrue at, base calendar and code resource columns.
106  /// </summary>
107  /// <returns>a view which contains a list of <see cref="ResourceViewColumn"></see>.</returns>
108  static ASPOSE_TASKS_SHARED_API System::SharedPtr<ProjectView> GetDefaultResourceSheetView();
109 
110 protected:
111 
112  static ASPOSE_TASKS_SHARED_API System::SharedPtr<ProjectView> FromView(const System::SharedPtr<Project>& project, const System::SharedPtr<View>& view);
113  static ASPOSE_TASKS_SHARED_API System::SharedPtr<ProjectView> GetGanttChartView(const System::SharedPtr<Aspose::Tasks::Saving::SaveOptions>& options);
114  static ASPOSE_TASKS_SHARED_API System::SharedPtr<ProjectView> GetDefaultGanttChartView(const System::SharedPtr<Project>& project);
115  static ASPOSE_TASKS_SHARED_API System::SharedPtr<ProjectView> GetDefaultTaskSheetView(const System::SharedPtr<Project>& project);
116  static ASPOSE_TASKS_SHARED_API System::SharedPtr<ProjectView> GetDefaultResourceSheetView(const System::SharedPtr<Project>& project);
117  static ASPOSE_TASKS_SHARED_API System::SharedPtr<ProjectView> GetDefaultResourceUsageView(const System::SharedPtr<Project>& project);
118  static ASPOSE_TASKS_SHARED_API System::SharedPtr<ProjectView> GetDefaultTaskUsageView(const System::SharedPtr<Project>& project);
119  #ifdef ASPOSE_GET_SHARED_MEMBERS
120  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
121  #endif
122 
123 
124 private:
125 
126  System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<ViewColumn>>> pr_Columns;
127 
128  /// <summary>
129  /// Gets the project view columns.
130  /// </summary>
131  ASPOSE_TASKS_SHARED_API void set_Columns(const System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<ViewColumn>>>& value);
132 
133  static System::SharedPtr<ProjectView> GetTaskChartFromView(const System::SharedPtr<Project>& project, const System::SharedPtr<View>& taskView);
134  static System::SharedPtr<ProjectView> GetResourceViewFromView(const System::SharedPtr<Project>& project, const System::SharedPtr<View>& resourceView);
135  /// <summary>
136  /// Includes Uid, name, start, finish and work task columns.
137  /// </summary>
138  /// <returns>a view which contains a list of <see cref="GanttChartColumn"></see>.</returns>
139  static System::SharedPtr<ProjectView> GetDefaultTaskUsageView();
140  static System::SharedPtr<GanttChartColumn> GetTaskIndicatorsColumn();
141  static System::SharedPtr<ResourceViewColumn> GetRscIndicatorsColumn();
142  static System::String GetTableFieldTitle(const System::SharedPtr<Project>& project, const System::SharedPtr<TableField>& tableField);
143  static System::String AssnUid(const System::SharedPtr<ResourceAssignment>& assn);
144  static System::String AssnTaskName(const System::SharedPtr<ResourceAssignment>& assn);
145  static System::String AssnRscName(const System::SharedPtr<ResourceAssignment>& assn);
146  static System::String AssnWork(const System::SharedPtr<ResourceAssignment>& assn);
147  static System::String AssnDuration(const System::SharedPtr<ResourceAssignment>& assn);
148 
149 };
150 
151 } // namespace Visualization
152 } // namespace Tasks
153 } // namespace Aspose
154 
155 
This is an abstract base class for classes that allow the user to specify additional options when sav...
Definition: SaveOptions.h:95
Project's view class
Definition: ProjectView.h:58
static System::SharedPtr< ProjectView > GetDefaultResourceUsageView()
Includes Uid, name, start, finish and work resource columns.
static System::SharedPtr< ProjectView > GetDefaultGanttChartView()
Includes id, indicators, name, duration, start and finish task columns.
static System::SharedPtr< ProjectView > GetDefaultAssignmentView()
Includes Uid, task name, resource name, work and duration assignment columns.
static System::SharedPtr< ProjectView > GetDefaultTaskSheetView()
Includes id, indicators, name, duration, start, finish, predecessors and resource names task columns.
ProjectView(const System::SharedPtr< System::Collections::Generic::IEnumerable< System::SharedPtr< ViewColumn >>> &columns)
Initializes a new instance of the ProjectView class.
static System::SharedPtr< ProjectView > GetDefaultResourceSheetView()
Includes Uid, resource name, type, material label, initials, group, max units, standard rate,...
const System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< ViewColumn > > > & get_Columns() const
Gets the project view columns.
Definition: Asn.h:13