Aspose.Tasks for C++
CsvOptions.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="CsvOptions.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 
10 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
11 #include "aspose.tasks.cpp/Saving/SimpleSaveOptions.h"
12 
13 namespace Aspose
14 {
15 namespace Tasks
16 {
17 class IWriter;
18 namespace Saving
19 {
20 enum class CsvTextDelimiter;
21 class CsvWriter;
22 enum class DataCategory;
23 } // namespace Saving
24 namespace Visualization
25 {
26 class GanttChartColumn;
27 class ProjectView;
28 } // namespace Visualization
29 } // namespace Tasks
30 } // namespace Aspose
31 namespace System
32 {
33 class DateTime;
34 namespace Text
35 {
36 class Encoding;
37 } // namespace Text
38 } // namespace System
39 
40 namespace Aspose {
41 
42 namespace Tasks {
43 
44 namespace Saving {
45 
46 /// <summary>
47 /// Allows to specify additional options when saving project to CSV.
48 /// </summary>
49 class ASPOSE_TASKS_SHARED_CLASS CsvOptions : public SimpleSaveOptions
50 {
51  typedef CsvOptions ThisType;
53 
54  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
55  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
56 
57  friend class CsvWriter;
58 
59 public:
60 
61  /// <summary>
62  /// Gets a data category to be saved.
63  /// </summary>
64  ASPOSE_TASKS_SHARED_API Aspose::Tasks::Saving::DataCategory get_DataCategory() const;
65  /// <summary>
66  /// Sets a data category to be saved.
67  /// </summary>
68  ASPOSE_TASKS_SHARED_API void set_DataCategory(Aspose::Tasks::Saving::DataCategory value);
69  /// <summary>
70  /// Gets an encoding to save CSV with.
71  /// </summary>
72  ASPOSE_TASKS_SHARED_API const System::SharedPtr<System::Text::Encoding>& get_Encoding() const;
73  /// <summary>
74  /// Sets an encoding to save CSV with.
75  /// </summary>
76  ASPOSE_TASKS_SHARED_API void set_Encoding(const System::SharedPtr<System::Text::Encoding>& value);
77  /// <summary>
78  /// Gets a value indicating whether to include headers or not (default value is TRUE).
79  /// </summary>
80  ASPOSE_TASKS_SHARED_API bool get_IncludeHeaders() const;
81  /// <summary>
82  /// Sets a value indicating whether to include headers or not (default value is TRUE).
83  /// </summary>
84  ASPOSE_TASKS_SHARED_API void set_IncludeHeaders(bool value);
85  /// <summary>
86  /// Gets a text delimiter.
87  /// </summary>
88  ASPOSE_TASKS_SHARED_API CsvTextDelimiter get_TextDelimiter() const;
89  /// <summary>
90  /// Sets a text delimiter.
91  /// </summary>
92  ASPOSE_TASKS_SHARED_API void set_TextDelimiter(CsvTextDelimiter value);
93  /// <summary>
94  /// Gets a list of the view columns (<see cref="GanttChartColumn"></see>) to save to XLSX format.
95  /// If not set then default columns are saved.
96  /// </summary>
97  ASPOSE_TASKS_SHARED_API const System::SharedPtr<Visualization::ProjectView>& get_View() const;
98  /// <summary>
99  /// Sets a list of the view columns (<see cref="GanttChartColumn"></see>) to save to XLSX format.
100  /// If not set then default columns are saved.
101  /// </summary>
102  ASPOSE_TASKS_SHARED_API void set_View(const System::SharedPtr<Visualization::ProjectView>& value);
103 
104  /// <summary>
105  /// Initializes a new instance of the <see cref="CsvOptions"></see> class which can be used to save project in CSV format.
106  /// </summary>
107  ASPOSE_TASKS_SHARED_API CsvOptions();
108 
109 protected:
110 
111  ASPOSE_TASKS_SHARED_API System::String get_CostFormatLabel() const;
112  ASPOSE_TASKS_SHARED_API void set_CostFormatLabel(const System::String& value);
113 
114  ASPOSE_TASKS_SHARED_API System::SharedPtr<IWriter> GetWriter() override;
115  ASPOSE_TASKS_SHARED_API void SetView();
116  ASPOSE_TASKS_SHARED_API System::SharedPtr<Visualization::ProjectView> GetTasksScheduleView();
117 
118  ASPOSE_TASKS_SHARED_API virtual ~CsvOptions();
119 
120  #ifdef ASPOSE_GET_SHARED_MEMBERS
121  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
122  #endif
123 
124 
125 private:
126 
127  Aspose::Tasks::Saving::DataCategory dataCategory;
128  System::String pr_CostFormatLabel;
129  System::SharedPtr<System::Text::Encoding> pr_Encoding;
130  bool pr_IncludeHeaders;
131  CsvTextDelimiter pr_TextDelimiter;
132  System::SharedPtr<Visualization::ProjectView> pr_View;
133 
134  System::SharedPtr<Visualization::GanttChartColumn> GetTaskIdColumn();
135  System::SharedPtr<Visualization::GanttChartColumn> GetTaskNameColumn();
136  System::SharedPtr<Visualization::GanttChartColumn> GetTaskDurationColumn();
137  System::SharedPtr<Visualization::GanttChartColumn> GetTaskStartColumn();
138  System::SharedPtr<Visualization::GanttChartColumn> GetTaskFinishColumn();
139  System::SharedPtr<Visualization::GanttChartColumn> GetTaskPercentCompleteColumn();
140  System::SharedPtr<Visualization::GanttChartColumn> GetTaskCostColumn();
141  System::SharedPtr<Visualization::GanttChartColumn> GetTaskWorkColumn();
142  System::SharedPtr<Visualization::GanttChartColumn> GetTaskOutlineLevelColumn();
143  System::String GetDateString(System::DateTime date);
144  System::SharedPtr<Visualization::ProjectView> GetRscView();
145 
146 };
147 
148 } // namespace Saving
149 } // namespace Tasks
150 } // namespace Aspose
151 
152 
Allows to specify additional options when saving project to CSV.
Definition: CsvOptions.h:50
void set_View(const System::SharedPtr< Visualization::ProjectView > &value)
Sets a list of the view columns (GanttChartColumn) to save to XLSX format. If not set then default co...
void set_TextDelimiter(CsvTextDelimiter value)
Sets a text delimiter.
const System::SharedPtr< Visualization::ProjectView > & get_View() const
Gets a list of the view columns (GanttChartColumn) to save to XLSX format. If not set then default co...
bool get_IncludeHeaders() const
Gets a value indicating whether to include headers or not (default value is TRUE).
void set_IncludeHeaders(bool value)
Sets a value indicating whether to include headers or not (default value is TRUE).
CsvTextDelimiter get_TextDelimiter() const
Gets a text delimiter.
Aspose::Tasks::Saving::DataCategory get_DataCategory() const
Gets a data category to be saved.
const System::SharedPtr< System::Text::Encoding > & get_Encoding() const
Gets an encoding to save CSV with.
void set_Encoding(const System::SharedPtr< System::Text::Encoding > &value)
Sets an encoding to save CSV with.
CsvOptions()
Initializes a new instance of the CsvOptions class which can be used to save project in CSV format.
void set_DataCategory(Aspose::Tasks::Saving::DataCategory value)
Sets a data category to be saved.
This is an abstract base class that allow the user to specify basic options when saving a project int...
Definition: SimpleSaveOptions.h:52
Aspose.
Definition: Asn.h:13