Aspose.Tasks for C++
Table.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="Table.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2025 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include <system/string.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 DateFormat;
18 namespace IO
19 {
20 namespace MSProject
21 {
22 class MPP14TableWriter;
23 class MPPTableReader;
24 class MPPTableWriter;
25 } // namespace MSProject
26 } // namespace IO
27 enum class ItemType;
28 namespace Saving
29 {
30 class TemplateProjectLoader;
31 } // namespace Saving
32 class TableCollection;
33 class TableFieldCollection;
34 } // namespace Tasks
35 } // namespace Aspose
36 
37 namespace Aspose {
38 
39 namespace Tasks {
40 
41 /// <summary>
42 /// Represents a table in Project
43 /// </summary>
44 class ASPOSE_TASKS_SHARED_CLASS Table : public System::Object
45 {
46  typedef Table ThisType;
47  typedef System::Object BaseType;
48 
49  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
50  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
51 
52  friend class Aspose::Tasks::Saving::TemplateProjectLoader;
53  friend class Aspose::Tasks::IO::MSProject::MPPTableReader;
54  friend class Aspose::Tasks::IO::MSProject::MPPTableWriter;
55  friend class Aspose::Tasks::IO::MSProject::MPP14TableWriter;
56  friend class Aspose::Tasks::TableCollection;
57 
58 public:
59 
60  /// <summary>
61  /// Gets the name of a Table object.
62  /// </summary>
63  ASPOSE_TASKS_SHARED_API System::String get_Name() const;
64  /// <summary>
65  /// Sets the name of a Table object.
66  /// </summary>
67  ASPOSE_TASKS_SHARED_API void set_Name(const System::String& value);
68  /// <summary>
69  /// Gets a value indicating whether project shows the table name in the Tables drop-down list on the View tab of the Ribbon.
70  /// </summary>
71  ASPOSE_TASKS_SHARED_API bool get_ShowInMenu() const;
72  /// <summary>
73  /// Sets a value indicating whether project shows the table name in the Tables drop-down list on the View tab of the Ribbon.
74  /// </summary>
75  ASPOSE_TASKS_SHARED_API void set_ShowInMenu(bool value);
76  /// <summary>
77  /// Gets a TableFields collection representing the fields in the table.
78  /// </summary>
79  ASPOSE_TASKS_SHARED_API const System::SharedPtr<TableFieldCollection>& get_TableFields() const;
80  /// <summary>
81  /// Gets the table type for the specified table.
82  /// </summary>
83  ASPOSE_TASKS_SHARED_API ItemType get_TableType() const;
84  /// <summary>
85  /// Sets the table type for the specified table.
86  /// </summary>
87  ASPOSE_TASKS_SHARED_API void set_TableType(ItemType value);
88  /// <summary>
89  /// Gets the unique identifier of a table.
90  /// </summary>
91  ASPOSE_TASKS_SHARED_API int32_t get_Uid() const;
92  /// @deprecated This member is obsolete and will be removed after release 25.7.
93  /// <summary>
94  /// Gets the index of a Table object in the Tables containing object.
95  /// </summary>
96  ASPOSE_TASKS_SHARED_API int32_t get_Index() const;
97  /// <summary>
98  /// Gets the row height in a table, where the row height is the number of lines of text.
99  /// </summary>
100  ASPOSE_TASKS_SHARED_API int32_t get_RowHeight() const;
101  /// <summary>
102  /// Sets the row height in a table, where the row height is the number of lines of text.
103  /// </summary>
104  ASPOSE_TASKS_SHARED_API void set_RowHeight(int32_t value);
105  /// <summary>
106  /// Gets the date format of the table.
107  /// </summary>
108  ASPOSE_TASKS_SHARED_API Aspose::Tasks::DateFormat get_DateFormat() const;
109  /// <summary>
110  /// Sets the date format of the table.
111  /// </summary>
112  ASPOSE_TASKS_SHARED_API void set_DateFormat(Aspose::Tasks::DateFormat value);
113  /// <summary>
114  /// Gets a value indicating whether the header row height of the table can be adjusted.
115  /// </summary>
116  ASPOSE_TASKS_SHARED_API bool get_AdjustHeaderRowHeight() const;
117  /// <summary>
118  /// Sets a value indicating whether the header row height of the table can be adjusted.
119  /// </summary>
120  ASPOSE_TASKS_SHARED_API void set_AdjustHeaderRowHeight(bool value);
121  /// <summary>
122  /// Gets a value indicating whether to show 'Add New Column' interface.
123  /// <remarks>Supported by MSP 2010 version and later.</remarks>
124  /// </summary>
125  ASPOSE_TASKS_SHARED_API bool get_ShowAddNewColumn() const;
126  /// <summary>
127  /// Sets a value indicating whether to show 'Add New Column' interface.
128  /// <remarks>Supported by MSP 2010 version and later.</remarks>
129  /// </summary>
130  ASPOSE_TASKS_SHARED_API void set_ShowAddNewColumn(bool value);
131  /// <summary>
132  /// Gets a value indicating whether the first column of a table is locked or editable.
133  /// </summary>
134  ASPOSE_TASKS_SHARED_API bool get_LockFirstColumn() const;
135  /// <summary>
136  /// Sets a value indicating whether the first column of a table is locked or editable.
137  /// </summary>
138  ASPOSE_TASKS_SHARED_API void set_LockFirstColumn(bool value);
139 
140  /// <summary>
141  /// Initializes a new instance of the <see cref="Table"></see> class.
142  /// </summary>
143  ASPOSE_TASKS_SHARED_API Table();
144 
145  /// <summary>
146  /// Returns a value indicating whether this instance is equal to a specified object.
147  /// </summary>
148  /// <param name="obj">The object to compare with this instance.</param>
149  /// <returns><b>True</b> if the specified object is a Table that has the same UID value as this instance; otherwise, <b>false</b>.</returns>
150  ASPOSE_TASKS_SHARED_API bool Equals(System::SharedPtr<System::Object> obj) override;
151  /// <summary>
152  /// Returns a hash code for this Table.
153  /// </summary>
154  /// <returns>Returns a hash code value for this object.</returns>
155  ASPOSE_TASKS_SHARED_API int32_t GetHashCode() const override;
156 
157 protected:
158 
159  /// <summary>
160  /// Gets the unique identifier of a table.
161  /// </summary>
162  ASPOSE_TASKS_SHARED_API void set_Uid(int32_t value);
163 
164  /// <summary>
165  /// Initializes a new instance of the <see cref="Table"></see> class.
166  /// </summary>
167  ASPOSE_TASKS_SHARED_API Table(int32_t uid, int32_t index);
168 
169  ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Table, CODEPORTING_ARGS(int32_t uid, int32_t index));
170  #ifdef ASPOSE_GET_SHARED_MEMBERS
171  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
172  #endif
173 
174 
175 private:
176 
177  int32_t uid;
178  int32_t index;
179  System::String pr_Name;
180  bool pr_ShowInMenu;
181  System::SharedPtr<TableFieldCollection> pr_TableFields;
182 
183  /// <summary>
184  /// Gets a TableFields collection representing the fields in the table.
185  /// </summary>
186  ASPOSE_TASKS_SHARED_API void set_TableFields(const System::SharedPtr<TableFieldCollection>& value);
187 
188  ItemType pr_TableType;
189  int32_t pr_RowHeight;
190  Aspose::Tasks::DateFormat pr_DateFormat;
191  bool pr_AdjustHeaderRowHeight;
192  bool pr_ShowAddNewColumn;
193  bool pr_LockFirstColumn;
194 
195 };
196 
197 } // namespace Tasks
198 } // namespace Aspose
199 
200 
Definition: Asn.h:12
Contains a list of Table objects. Implements ICollection<Table> interface.
Definition: TableCollection.h:60
Represents a table in Project
Definition: Table.h:44