Aspose.Tasks for C++
Filter.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="Filter.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/iequatable.h>
10 #include <system/icomparable.h>
11 #include <cstdint>
12 
13 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
14 
15 namespace Aspose
16 {
17 namespace Tasks
18 {
19 class FilterCollection;
20 class FilterCriteria;
21 namespace IO
22 {
23 namespace MSProject
24 {
25 class MPP14GanttChartReader;
26 class MPP9GanttChartReader;
27 class MPPFilterReader;
28 class MPPFilterWriter;
29 } // namespace MSProject
30 } // namespace IO
31 enum class ItemType;
32 } // namespace Tasks
33 } // namespace Aspose
34 
35 namespace Aspose {
36 
37 namespace Tasks {
38 
39 /// <summary>
40 /// Represents a filter in Project.
41 /// </summary>
42 class ASPOSE_TASKS_SHARED_CLASS Filter final : public System::IComparable<System::SharedPtr<Aspose::Tasks::Filter>>, public System::IEquatable<System::SharedPtr<Aspose::Tasks::Filter>>
43 {
44  typedef Filter ThisType;
45  typedef System::IComparable<System::SharedPtr<Aspose::Tasks::Filter>> BaseType;
46  typedef System::IEquatable<System::SharedPtr<Aspose::Tasks::Filter>> BaseType1;
47 
48  typedef ::System::BaseTypesInfo<BaseType, BaseType1> ThisTypeBaseTypesInfo;
49  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
50 
51  friend class Aspose::Tasks::IO::MSProject::MPPFilterWriter;
53  friend class Aspose::Tasks::IO::MSProject::MPP9GanttChartReader;
54  friend class Aspose::Tasks::IO::MSProject::MPPFilterReader;
55  friend class Aspose::Tasks::IO::MSProject::MPP14GanttChartReader;
56  friend ASPOSE_TASKS_SHARED_API bool operator ==(const System::SharedPtr<Filter>& a, const System::SharedPtr<Filter>& b);
57  friend ASPOSE_TASKS_SHARED_API bool operator !=(const System::SharedPtr<Filter>& a, const System::SharedPtr<Filter>& b);
58  friend ASPOSE_TASKS_SHARED_API bool operator <(const System::SharedPtr<Filter>& a, const System::SharedPtr<Filter>& b);
59  friend ASPOSE_TASKS_SHARED_API bool operator >(const System::SharedPtr<Filter>& a, const System::SharedPtr<Filter>& b);
60  friend ASPOSE_TASKS_SHARED_API bool operator >=(const System::SharedPtr<Filter>& a, const System::SharedPtr<Filter>& b);
61  friend ASPOSE_TASKS_SHARED_API bool operator <=(const System::SharedPtr<Filter>& a, const System::SharedPtr<Filter>& b);
62 
63 public:
64 
65  /// <summary>
66  /// Gets the type of the filter.
67  /// </summary>
68  ASPOSE_TASKS_SHARED_API ItemType get_FilterType() const;
69  /// <summary>
70  /// Gets the type of the filter.
71  /// </summary>
72  ASPOSE_TASKS_SHARED_API void set_FilterType(ItemType value);
73  /// <summary>
74  /// Gets the name of a Filter object.
75  /// </summary>
76  ASPOSE_TASKS_SHARED_API System::String get_Name() const;
77  /// <summary>
78  /// Sets the name of a Filter object.
79  /// </summary>
80  ASPOSE_TASKS_SHARED_API void set_Name(const System::String& value);
81  /// <summary>
82  /// Gets a value indicating whether project shows the filter name in the Filter drop-down list on the View tab of the Ribbon.
83  /// </summary>
84  ASPOSE_TASKS_SHARED_API bool get_ShowInMenu() const;
85  /// <summary>
86  /// Sets a value indicating whether project shows the filter name in the Filter drop-down list on the View tab of the Ribbon.
87  /// </summary>
88  ASPOSE_TASKS_SHARED_API void set_ShowInMenu(bool value);
89  /// <summary>
90  /// Gets a value indicating whether related summary rows are displayed for the filter.
91  /// </summary>
92  ASPOSE_TASKS_SHARED_API bool get_ShowRelatedSummaryRows() const;
93  /// <summary>
94  /// Sets a value indicating whether related summary rows are displayed for the filter.
95  /// </summary>
96  ASPOSE_TASKS_SHARED_API void set_ShowRelatedSummaryRows(bool value);
97  /// <summary>
98  /// Gets the index of a <see cref="Filter"></see> object in the Filters containing object.
99  /// </summary>
100  ASPOSE_TASKS_SHARED_API int32_t get_Index() const;
101  /// <summary>
102  /// Gets the unique identifier of a filter.
103  /// </summary>
104  ASPOSE_TASKS_SHARED_API int32_t get_Uid() const;
105  /// <summary>
106  /// Gets the criteria that tasks or resources must meet to be displayed in MSP view.
107  /// </summary>
108  ASPOSE_TASKS_SHARED_API const System::SharedPtr<FilterCriteria>& get_Criteria() const;
109  /// <summary>
110  /// Sets the criteria that tasks or resources must meet to be displayed in MSP view.
111  /// </summary>
112  ASPOSE_TASKS_SHARED_API void set_Criteria(const System::SharedPtr<FilterCriteria>& value);
113 
114  /// <summary>
115  /// Compares this instance to the specified instance of the <see cref="Filter"></see> class and returns an indication of their relative order.
116  /// </summary>
117  /// <param name="other">the specified instance of the <see cref="Filter"></see> class to compare to this object.</param>
118  /// <returns>an indication of their relative order.</returns>
119  ASPOSE_TASKS_SHARED_API int32_t CompareTo(System::SharedPtr<Filter> other) override;
120  /// <summary>
121  /// Returns a value indicating whether this instance is equal to the specified AssignmentBaseline object.
122  /// </summary>
123  /// <param name="other">the specified AssignmentBaseline object to compare with this instance.</param>
124  /// <returns>returns true if this instance is equal to the specified AssignmentBaseline object; otherwise, false.</returns>
125  ASPOSE_TASKS_SHARED_API bool Equals(System::SharedPtr<Filter> other) override;
126  /// <summary>
127  /// Returns a value indicating whether this instance is equal to the specified AssignmentBaseline object.
128  /// </summary>
129  /// <param name="obj">the specified AssignmentBaseline object to compare with this instance.</param>
130  /// <returns>returns true if this instance is equal to the specified AssignmentBaseline object; otherwise, false.</returns>
131  ASPOSE_TASKS_SHARED_API bool Equals(System::SharedPtr<System::Object> obj) override;
132  /// <summary>
133  /// Returns a hash code value for the filter.
134  /// </summary>
135  /// <returns>returns a hash code value for this object.</returns>
136  ASPOSE_TASKS_SHARED_API int32_t GetHashCode() const override;
137 
138  ASPOSE_TASKS_SHARED_API Filter();
139 
140 protected:
141 
142  /// <summary>
143  /// Gets the index of a <see cref="Filter"></see> object in the Filters containing object.
144  /// </summary>
145  ASPOSE_TASKS_SHARED_API void set_Index(int32_t value);
146  /// <summary>
147  /// Gets the unique identifier of a filter.
148  /// </summary>
149  ASPOSE_TASKS_SHARED_API void set_Uid(int32_t value);
150 
151  virtual ASPOSE_TASKS_SHARED_API ~Filter();
152 
153  #ifdef ASPOSE_GET_SHARED_MEMBERS
154  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
155  #endif
156 
157 
158 private:
159 
160  static const int32_t MaxNameLength;
161  System::String name;
162  ItemType pr_FilterType;
163  bool pr_ShowInMenu;
164  bool pr_ShowRelatedSummaryRows;
165  int32_t pr_Index;
166  int32_t pr_Uid;
167  System::SharedPtr<FilterCriteria> pr_Criteria;
168 
169  System::String get_DebuggerDisplay();
170 
171  System::String GetFilterTypeString();
172 
173 };
174 
175 ASPOSE_TASKS_SHARED_API bool operator ==(const System::SharedPtr<Filter>& a, const System::SharedPtr<Filter>& b);
176 ASPOSE_TASKS_SHARED_API bool operator !=(const System::SharedPtr<Filter>& a, const System::SharedPtr<Filter>& b);
177 ASPOSE_TASKS_SHARED_API bool operator <(const System::SharedPtr<Filter>& a, const System::SharedPtr<Filter>& b);
178 ASPOSE_TASKS_SHARED_API bool operator >(const System::SharedPtr<Filter>& a, const System::SharedPtr<Filter>& b);
179 ASPOSE_TASKS_SHARED_API bool operator >=(const System::SharedPtr<Filter>& a, const System::SharedPtr<Filter>& b);
180 ASPOSE_TASKS_SHARED_API bool operator <=(const System::SharedPtr<Filter>& a, const System::SharedPtr<Filter>& b);
181 
182 } // namespace Tasks
183 } // namespace Aspose
184 
185 
Contains a list of Filter objects. Implements ICollection<Filter> interface.
Definition: FilterCollection.h:52
Represents a filter in Project.
Definition: Filter.h:43
int32_t get_Index() const
Gets the index of a Filter object in the Filters containing object.
void set_Name(const System::String &value)
Sets the name of a Filter object.
bool get_ShowRelatedSummaryRows() const
Gets a value indicating whether related summary rows are displayed for the filter.
bool get_ShowInMenu() const
Gets a value indicating whether project shows the filter name in the Filter drop-down list on the Vie...
ItemType get_FilterType() const
Gets the type of the filter.
void set_ShowRelatedSummaryRows(bool value)
Sets a value indicating whether related summary rows are displayed for the filter.
int32_t GetHashCode() const override
Returns a hash code value for the filter.
int32_t CompareTo(System::SharedPtr< Filter > other) override
Compares this instance to the specified instance of the Filter class and returns an indication of the...
bool Equals(System::SharedPtr< System::Object > obj) override
Returns a value indicating whether this instance is equal to the specified AssignmentBaseline object.
System::String get_Name() const
Gets the name of a Filter object.
int32_t get_Uid() const
Gets the unique identifier of a filter.
bool Equals(System::SharedPtr< Filter > other) override
Returns a value indicating whether this instance is equal to the specified AssignmentBaseline object.
void set_ShowInMenu(bool value)
Sets a value indicating whether project shows the filter name in the Filter drop-down list on the Vie...
void set_Criteria(const System::SharedPtr< FilterCriteria > &value)
Sets the criteria that tasks or resources must meet to be displayed in MSP view.
void set_FilterType(ItemType value)
Gets the type of the filter.
const System::SharedPtr< FilterCriteria > & get_Criteria() const
Gets the criteria that tasks or resources must meet to be displayed in MSP view.
Definition: Asn.h:13