Aspose.Tasks for C++
AssignmentViewColumn.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="AssignmentViewColumn.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 #include <system/multicast_delegate.h>
10 #include <system/event.h>
11 #include <cstdint>
12 
13 #include "aspose.tasks.cpp/Visualization/View/ViewColumn.h"
14 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
15 
16 namespace Aspose
17 {
18 namespace Tasks
19 {
20 enum class Field;
21 class ResourceAssignment;
22 namespace Visualization
23 {
24 using AssignmentToColumnTextConverter = System::MulticastDelegate<System::String(System::SharedPtr<Aspose::Tasks::ResourceAssignment>)>;
25 } // namespace Visualization
26 } // namespace Tasks
27 } // namespace Aspose
28 
29 namespace Aspose {
30 
31 namespace Tasks {
32 
33 namespace Visualization {
34 
35 /// <summary>
36 /// Project's view class.
37 /// </summary>
38 /// <inheritdoc ></inheritdoc>
39 class ASPOSE_TASKS_SHARED_CLASS AssignmentViewColumn : public Aspose::Tasks::Visualization::ViewColumn
40 {
43 
44  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
45  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
46 
47 public:
48 
49  /// <summary>
50  /// Column field.
51  /// <see cref="Field"></see>.
52  /// </summary>
53  ASPOSE_TASKS_SHARED_API Aspose::Tasks::Field get_Field() override;
54  /// <summary>
55  /// Column field.
56  /// <see cref="Field"></see>.
57  /// </summary>
58  ASPOSE_TASKS_SHARED_API void set_Field(Aspose::Tasks::Field value) override;
59 
60  /// <summary>
61  /// Initializes a new instance of the AssignmentViewColumn class.
62  /// </summary>
63  /// <param name="name">Column's name.</param>
64  /// <param name="width">Column's width in pixels.</param>
65  /// <param name="converter">Assignment data to column text converter.</param>
66  ASPOSE_TASKS_SHARED_API AssignmentViewColumn(const System::String& name, int32_t width, AssignmentToColumnTextConverter converter);
67 
68  /// <summary>
69  /// Converts current resource assignment to the column text.
70  /// </summary>
71  /// <param name="assignment">Current assignment.</param>
72  /// <returns>The column text.</returns>
73  ASPOSE_TASKS_SHARED_API System::String GetColumnText(const System::SharedPtr<ResourceAssignment>& assignment);
74 
75 protected:
76 
77  ASPOSE_TASKS_SHARED_API System::String GetText(System::SharedPtr<System::Object> o) override;
78  #ifdef ASPOSE_GET_SHARED_MEMBERS
79  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
80  #endif
81 
82 
83 private:
84 
85  Aspose::Tasks::Field pr_Field;
86 
87  System::Event<System::String(System::SharedPtr<ResourceAssignment>)> Converter;
88 
89 };
90 
91 } // namespace Visualization
92 } // namespace Tasks
93 } // namespace Aspose
94 
95 
Project's view class.
Definition: AssignmentViewColumn.h:40
AssignmentViewColumn(const System::String &name, int32_t width, AssignmentToColumnTextConverter converter)
Initializes a new instance of the AssignmentViewColumn class.
void set_Field(Aspose::Tasks::Field value) override
Column field. Field.
Aspose::Tasks::Field get_Field() override
Column field. Field.
System::String GetColumnText(const System::SharedPtr< ResourceAssignment > &assignment)
Converts current resource assignment to the column text.
Represents a column in a project view.
Definition: ViewColumn.h:65
Definition: Asn.h:13