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