Aspose.Tasks for C++
Value.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="Value.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/nullable.h>
10 #include <system/date_time.h>
11 #include <cstdint>
12 
13 #include "aspose.tasks.cpp/Duration.h"
14 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
15 
16 namespace Aspose
17 {
18 namespace Tasks
19 {
20 class ExtendedAttributeDefinition;
21 namespace IO
22 {
23 namespace MSProject
24 {
25 class MPP12OutlineCodeDefinitionWriter;
26 class MPP14OutlineCodeDefinitionWriter;
27 class MPPOutlineCodeDefinitionWriter;
28 class MPPReader;
29 } // namespace MSProject
30 namespace Pwa
31 {
32 namespace InternalApi
33 {
34 class InternalApiProjectSerializer;
35 namespace Mapping
36 {
37 class ExtendedAttributeDefinitionMapper;
38 class ExtendedAttributeDefinitionToRawValuesMapper;
39 } // namespace Mapping
40 } // namespace InternalApi
41 } // namespace Pwa
42 namespace Xml
43 {
44 class OutlineValueXml;
45 } // namespace Xml
46 } // namespace IO
47 class OutlineCodesSynchronizer;
48 class OutlineValue;
49 } // namespace Tasks
50 } // namespace Aspose
51 namespace System
52 {
53 namespace Collections
54 {
55 namespace Generic
56 {
57 template <typename> class IEnumerable;
58 template <typename> class List;
59 } // namespace Generic
60 } // namespace Collections
61 class Decimal;
62 class Guid;
63 } // namespace System
64 
65 namespace Aspose {
66 
67 namespace Tasks {
68 
69 /// <summary>
70 /// Represents a value in a value list.
71 /// </summary>
72 class ASPOSE_TASKS_SHARED_CLASS Value : public System::Object
73 {
74  typedef Value ThisType;
75  typedef System::Object BaseType;
76 
77  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
78  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
79 
80  friend class Aspose::Tasks::IO::Pwa::InternalApi::Mapping::ExtendedAttributeDefinitionToRawValuesMapper;
81  friend class Aspose::Tasks::IO::Pwa::InternalApi::InternalApiProjectSerializer;
83  friend class Aspose::Tasks::IO::MSProject::MPPReader;
84  friend class Aspose::Tasks::IO::MSProject::MPP14OutlineCodeDefinitionWriter;
85  friend class Aspose::Tasks::IO::MSProject::MPP12OutlineCodeDefinitionWriter;
86  friend class Aspose::Tasks::IO::MSProject::MPPOutlineCodeDefinitionWriter;
87  friend class Aspose::Tasks::IO::Pwa::InternalApi::Mapping::ExtendedAttributeDefinitionMapper;
88  friend class Aspose::Tasks::IO::Xml::OutlineValueXml;
89  friend class Aspose::Tasks::OutlineCodesSynchronizer;
90 
91 public:
92 
93  /// <summary>
94  /// Gets the unique identifier of a value across a project.
95  /// <para>It's important to not have same identifiers for different <see cref="Value"></see> instances.</para>
96  /// <para>Minimal <see cref="Id"></see> value is <c>1</c>.</para>
97  /// </summary>
98  ASPOSE_TASKS_SHARED_API int32_t get_Id();
99  /// <summary>
100  /// Sets the unique identifier of a value across a project.
101  /// <para>It's important to not have same identifiers for different <see cref="Value"></see> instances.</para>
102  /// <para>Minimal <see cref="Id"></see> value is <c>1</c>.</para>
103  /// </summary>
104  ASPOSE_TASKS_SHARED_API void set_Id(int32_t value);
105  /// <summary>
106  /// Gets a GUID which identifies this value among others in the entire project.
107  /// </summary>
108  ASPOSE_TASKS_SHARED_API System::Guid get_ValueGuid();
109  /// <summary>
110  /// Gets the actual value in internal representation. Prefer using strongly typed properties which are listed below.
111  /// </summary>
112  /// <remarks>
113  /// <para>If you want to set Text value prefer using strongly typed <see cref="StringValue"></see> property.</para>
114  /// <para>If you want to set Number or Cost value prefer using strongly typed <see cref="NumericValue"></see> property.</para>
115  /// <para>If you want to set Date/Start/Finish values, prefer using strongly typed <see cref="DateTimeValue"></see> property.</para>
116  /// <para>If you want to set Duration value prefer using strongly typed <see cref="Duration"></see> property.</para>
117  /// <para>If your type wasn't listed, use <see cref="Val"></see> property.</para>
118  /// </remarks>
119  ASPOSE_TASKS_SHARED_API System::String get_Val();
120  /// <summary>
121  /// Sets the actual value in internal representation. Prefer using strongly typed properties which are listed below.
122  /// </summary>
123  /// <remarks>
124  /// <para>If you want to set Text value prefer using strongly typed <see cref="StringValue"></see> property.</para>
125  /// <para>If you want to set Number or Cost value prefer using strongly typed <see cref="NumericValue"></see> property.</para>
126  /// <para>If you want to set Date/Start/Finish values, prefer using strongly typed <see cref="DateTimeValue"></see> property.</para>
127  /// <para>If you want to set Duration value prefer using strongly typed <see cref="Duration"></see> property.</para>
128  /// <para>If your type wasn't listed, use <see cref="Val"></see> property.</para>
129  /// </remarks>
130  ASPOSE_TASKS_SHARED_API void set_Val(const System::String& value);
131  /// <summary>
132  /// Gets the actual value which is used to represent Text string.
133  /// </summary>
134  /// <remarks>
135  /// Prefer this property over the <see cref="Val"></see>, when you need to set the Text value.
136  /// </remarks>
137  ASPOSE_TASKS_SHARED_API System::String get_StringValue();
138  /// <summary>
139  /// Sets the actual value which is used to represent Text string.
140  /// </summary>
141  /// <remarks>
142  /// Prefer this property over the <see cref="Val"></see>, when you need to set the Text value.
143  /// </remarks>
144  ASPOSE_TASKS_SHARED_API void set_StringValue(const System::String& value);
145  /// <summary>
146  /// Gets the actual value which is used to represent number or cost value.
147  /// </summary>
148  /// <remarks>
149  /// Prefer this property over the <see cref="Val"></see>, when you need to set the Number or Cost value.
150  /// </remarks>
151  ASPOSE_TASKS_SHARED_API System::Decimal get_NumericValue();
152  /// <summary>
153  /// Sets the actual value which is used to represent number or cost value.
154  /// </summary>
155  /// <remarks>
156  /// Prefer this property over the <see cref="Val"></see>, when you need to set the Number or Cost value.
157  /// </remarks>
158  ASPOSE_TASKS_SHARED_API void set_NumericValue(System::Decimal value);
159  /// <summary>
160  /// Gets the actual value which is used to represent Duration.
161  /// </summary>
162  /// <remarks>
163  /// Prefer this property over the <see cref="Val"></see>, when you need to set the Duration value.
164  /// </remarks>
165  ASPOSE_TASKS_SHARED_API System::Nullable<Aspose::Tasks::Duration> get_Duration();
166  /// <summary>
167  /// Sets the actual value which is used to represent Duration.
168  /// </summary>
169  /// <remarks>
170  /// Prefer this property over the <see cref="Val"></see>, when you need to set the Duration value.
171  /// </remarks>
172  ASPOSE_TASKS_SHARED_API void set_Duration(System::Nullable<Aspose::Tasks::Duration> value);
173  /// <summary>
174  /// Gets the actual value if it can be represented as DateTime. Default value is <see cref="DateTime::MinValue"></see>.
175  /// </summary>
176  /// <remarks>
177  /// Prefer this property over the <see cref="Val"></see>, when you need to set the DateTime value.
178  /// </remarks>
179  ASPOSE_TASKS_SHARED_API System::DateTime get_DateTimeValue() const;
180  /// <summary>
181  /// Sets the actual value if it can be represented as DateTime. Default value is <see cref="DateTime::MinValue"></see>.
182  /// </summary>
183  /// <remarks>
184  /// Prefer this property over the <see cref="Val"></see>, when you need to set the DateTime value.
185  /// </remarks>
186  ASPOSE_TASKS_SHARED_API void set_DateTimeValue(System::DateTime value);
187  /// <summary>
188  /// Gets the description of a value.
189  /// </summary>
190  ASPOSE_TASKS_SHARED_API System::String get_Description();
191  /// <summary>
192  /// Sets the description of a value.
193  /// </summary>
194  ASPOSE_TASKS_SHARED_API void set_Description(const System::String& value);
195  /// <summary>
196  /// Gets the phonetic information about custom field name.
197  /// </summary>
198  ASPOSE_TASKS_SHARED_API System::String get_Phonetic() const;
199  /// <summary>
200  /// Sets the phonetic information about custom field name.
201  /// </summary>
202  ASPOSE_TASKS_SHARED_API void set_Phonetic(const System::String& value);
203 
204  /// <summary>
205  /// Initializes a new instance of the <see cref="Value"></see> class.
206  /// </summary>
207  ASPOSE_TASKS_SHARED_API Value();
208 
209 protected:
210 
211  ASPOSE_TASKS_SHARED_API System::Nullable<double> get_SortOrder();
212  ASPOSE_TASKS_SHARED_API void set_SortOrder(System::Nullable<double> value);
213  ASPOSE_TASKS_SHARED_API System::SharedPtr<Aspose::Tasks::OutlineValue> get_OutlineValue() const;
214 
215  static ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Value>>> ConvertFromOutlineValues(const System::SharedPtr<System::Collections::Generic::IEnumerable<System::SharedPtr<Aspose::Tasks::OutlineValue>>>& values);
216  #ifdef ASPOSE_GET_SHARED_MEMBERS
217  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
218  #endif
219 
220 
221 private:
222 
223  static System::DateTime& MinimallySupportedDate();
224  static System::DateTime& MaximallySupportedDate();
225 
226  System::SharedPtr<Aspose::Tasks::OutlineValue> outlineValue;
227  System::DateTime dateTimeValue;
228  System::String pr_Phonetic;
229 
230  System::String get_DebuggerDisplay();
231 
232  Value(const System::SharedPtr<Aspose::Tasks::OutlineValue>& outlineValue);
233 
234  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Value, CODEPORTING_ARGS(const System::SharedPtr<Aspose::Tasks::OutlineValue>& outlineValue));
235 
236 };
237 
238 } // namespace Tasks
239 } // namespace Aspose
240 
241 
Represents an extended attribute definition associated with a project.
Definition: ExtendedAttributeDefinition.h:180
Represents a value in a value list.
Definition: Value.h:73
void set_Phonetic(const System::String &value)
Sets the phonetic information about custom field name.
void set_NumericValue(System::Decimal value)
Sets the actual value which is used to represent number or cost value.
void set_Duration(System::Nullable< Aspose::Tasks::Duration > value)
Sets the actual value which is used to represent Duration.
System::String get_StringValue()
Gets the actual value which is used to represent Text string.
void set_Id(int32_t value)
Sets the unique identifier of a value across a project.
Value()
Initializes a new instance of the Value class.
System::String get_Phonetic() const
Gets the phonetic information about custom field name.
void set_StringValue(const System::String &value)
Sets the actual value which is used to represent Text string.
int32_t get_Id()
Gets the unique identifier of a value across a project.
System::Guid get_ValueGuid()
Gets a GUID which identifies this value among others in the entire project.
System::DateTime get_DateTimeValue() const
Gets the actual value if it can be represented as DateTime. Default value is DateTime::MinValue.
System::String get_Description()
Gets the description of a value.
System::String get_Val()
Gets the actual value in internal representation. Prefer using strongly typed properties which are li...
void set_DateTimeValue(System::DateTime value)
Sets the actual value if it can be represented as DateTime. Default value is DateTime::MinValue.
void set_Description(const System::String &value)
Sets the description of a value.
System::Nullable< Aspose::Tasks::Duration > get_Duration()
Gets the actual value which is used to represent Duration.
System::Decimal get_NumericValue()
Gets the actual value which is used to represent number or cost value.
void set_Val(const System::String &value)
Sets the actual value in internal representation. Prefer using strongly typed properties which are li...
Definition: Asn.h:13