Aspose.Tasks for C++
DbSettings.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="DbSettings.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 
10 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
11 
12 namespace Aspose
13 {
14 namespace Tasks
15 {
16 namespace Connectivity
17 {
18 template <typename, typename> class DbMapper;
19 class DbReader;
20 class DbTypeConverter;
21 class MpdAssignmentBaselineMapper;
22 class MpdAssignmentMapper;
23 class MpdDateFieldMapper;
24 class MpdDurationFieldMapper;
25 class MpdExtendedAttributeDefinitionMapper;
26 class MpdFlagFieldMapper;
27 class MpdNumberFieldMapper;
28 class MpdOutlineCodeDefinitionMapper;
29 class MpdOutlineCodeFieldMapper;
30 class MpdProjectPropsMapper;
31 class MpdReader;
32 class MpdResourceBaselineMapper;
33 class MpdResourceMapper;
34 class MpdSettings;
35 class MpdTaskBaselineMapper;
36 class MpdTaskLinkMapper;
37 class MpdTaskMapper;
38 class MpdTextFieldMapper;
39 class MspAssignmentMapper;
40 class MspCalendarMapper;
41 class MspDbReader;
42 class MspDbSettings;
43 class MspProjectPropsMapper;
44 class MspResourceMapper;
45 class MspTaskLinksMapper;
46 class MspTaskMapper;
47 class PmCurrencyMapper;
48 class PmProjectTimeMapper;
49 class PmResourceMapper;
50 class PmResourceRateMapper;
51 class PmTaskMapper;
52 class PmTaskRelationMapper;
53 class PmWbsMapper;
54 class PrimaveraDbReader;
55 class PrimaveraDbSettings;
56 } // namespace Connectivity
57 class Project;
58 } // namespace Tasks
59 } // namespace Aspose
60 
61 namespace Aspose {
62 
63 namespace Tasks {
64 
65 namespace Connectivity {
66 
67 /// <summary>
68 /// Allows to specify settings to read from project database.
69 /// </summary>
70 class ASPOSE_TASKS_SHARED_CLASS DbSettings : public System::Object
71 {
72  typedef DbSettings ThisType;
73  typedef System::Object BaseType;
74 
75  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
76  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
77 
78  friend class Aspose::Tasks::Project;
79  template<typename FT0, typename FT1> friend class Aspose::Tasks::Connectivity::DbMapper;
80  friend class Aspose::Tasks::Connectivity::MpdAssignmentBaselineMapper;
81  friend class Aspose::Tasks::Connectivity::MpdAssignmentMapper;
82  friend class Aspose::Tasks::Connectivity::MpdDateFieldMapper;
83  friend class Aspose::Tasks::Connectivity::MpdDurationFieldMapper;
84  friend class Aspose::Tasks::Connectivity::MpdExtendedAttributeDefinitionMapper;
85  friend class Aspose::Tasks::Connectivity::MpdFlagFieldMapper;
86  friend class Aspose::Tasks::Connectivity::MpdNumberFieldMapper;
87  friend class Aspose::Tasks::Connectivity::MpdOutlineCodeDefinitionMapper;
88  friend class Aspose::Tasks::Connectivity::MpdOutlineCodeFieldMapper;
89  friend class Aspose::Tasks::Connectivity::MpdProjectPropsMapper;
90  friend class Aspose::Tasks::Connectivity::MpdReader;
91  friend class Aspose::Tasks::Connectivity::MpdResourceBaselineMapper;
92  friend class Aspose::Tasks::Connectivity::MpdResourceMapper;
94  friend class Aspose::Tasks::Connectivity::MpdTaskBaselineMapper;
95  friend class Aspose::Tasks::Connectivity::MpdTaskLinkMapper;
96  friend class Aspose::Tasks::Connectivity::MpdTaskMapper;
97  friend class Aspose::Tasks::Connectivity::MpdTextFieldMapper;
99  friend class Aspose::Tasks::Connectivity::MspAssignmentMapper;
100  friend class Aspose::Tasks::Connectivity::MspCalendarMapper;
101  friend class Aspose::Tasks::Connectivity::MspDbReader;
102  friend class Aspose::Tasks::Connectivity::MspProjectPropsMapper;
103  friend class Aspose::Tasks::Connectivity::MspResourceMapper;
104  friend class Aspose::Tasks::Connectivity::MspTaskLinksMapper;
105  friend class Aspose::Tasks::Connectivity::MspTaskMapper;
106  friend class Aspose::Tasks::Connectivity::PmCurrencyMapper;
107  friend class Aspose::Tasks::Connectivity::PmProjectTimeMapper;
108  friend class Aspose::Tasks::Connectivity::PmResourceMapper;
109  friend class Aspose::Tasks::Connectivity::PmResourceRateMapper;
110  friend class Aspose::Tasks::Connectivity::PmTaskMapper;
111  friend class Aspose::Tasks::Connectivity::PmTaskRelationMapper;
112  friend class Aspose::Tasks::Connectivity::PmWbsMapper;
113  friend class Aspose::Tasks::Connectivity::PrimaveraDbReader;
115 
116 public:
117 
118  /// <summary>
119  /// Gets the connection string.
120  /// </summary>
121  ASPOSE_TASKS_SHARED_API System::String get_ConnectionString() const;
122  /// <summary>
123  /// Sets the connection string.
124  /// </summary>
125  ASPOSE_TASKS_SHARED_API void set_ConnectionString(const System::String& value);
126  /// <summary>
127  /// Gets provider invariant name which is used to get an instance of the <see cref="System::Data::Common::DbProviderFactory"></see> class.
128  /// <remarks>Default value is <see cref="System::Data::SqlClient"></see>.</remarks>
129  /// </summary>
130  ASPOSE_TASKS_SHARED_API System::String get_ProviderInvariantName() const;
131  /// <summary>
132  /// Sets provider invariant name which is used to get an instance of the <see cref="System::Data::Common::DbProviderFactory"></see> class.
133  /// <remarks>Default value is <see cref="System::Data::SqlClient"></see>.</remarks>
134  /// </summary>
135  ASPOSE_TASKS_SHARED_API void set_ProviderInvariantName(const System::String& value);
136 
137 protected:
138 
139  ASPOSE_TASKS_SHARED_API const System::SharedPtr<Aspose::Tasks::Project>& get_Project() const;
140  ASPOSE_TASKS_SHARED_API void set_Project(const System::SharedPtr<Aspose::Tasks::Project>& value);
141 
142  /// <summary>
143  /// Initializes a new instance of the <see cref="DbSettings"></see> class.
144  /// </summary>
145  /// <param name="connectionString">the specified connection string.</param>
146  ASPOSE_TASKS_SHARED_API DbSettings(const System::String& connectionString);
147 
148  virtual ASPOSE_TASKS_SHARED_API System::SharedPtr<DbReader> GetDbReader() = 0;
149  virtual ASPOSE_TASKS_SHARED_API System::SharedPtr<DbTypeConverter> GetTypeConverter() = 0;
150  #ifdef ASPOSE_GET_SHARED_MEMBERS
151  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
152  #endif
153 
154 
155 private:
156 
157  System::String pr_ConnectionString;
158  System::String pr_ProviderInvariantName;
159  System::WeakPtr<Aspose::Tasks::Project> pr_Project;
160 
161 };
162 
163 } // namespace Connectivity
164 } // namespace Tasks
165 } // namespace Aspose
166 
167 
Allows to specify settings to read from project database.
Definition: DbSettings.h:71
void set_ConnectionString(const System::String &value)
Sets the connection string.
System::String get_ConnectionString() const
Gets the connection string.
void set_ProviderInvariantName(const System::String &value)
Sets provider invariant name which is used to get an instance of the System::Data::Common::DbProvider...
System::String get_ProviderInvariantName() const
Gets provider invariant name which is used to get an instance of the System::Data::Common::DbProvider...
Allows to set necessary options to read project data from MPD format (MS Access database file format)...
Definition: MpdSettings.h:56
Allows to set necessary options to read project data from MS Project Server database.
Definition: MspDbSettings.h:36
Allows to set necessary options to read project data from Primavera database.
Definition: PrimaveraDbSettings.h:40
Represents a project.
Definition: Project.h:552
Definition: Asn.h:13