Aspose.Tasks for C++
Property.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="Property.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 Properties
17 {
18 class BuiltInProjectProperty;
19 class CustomProjectProperty;
20 } // namespace Properties
21 } // namespace Tasks
22 } // namespace Aspose
23 
24 namespace Aspose {
25 
26 namespace Tasks {
27 
28 namespace Properties {
29 
30 /// <summary>
31 /// Represents a base class of a property.
32 /// </summary>
33 class ASPOSE_TASKS_SHARED_CLASS Property : public System::Object
34 {
35  typedef Property ThisType;
36  typedef System::Object BaseType;
37 
38  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
39  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
40 
43 
44 public:
45 
46  /// <summary>
47  /// Gets a name of the property.
48  /// </summary>
49  ASPOSE_TASKS_SHARED_API System::String get_Name() const;
50  /// <summary>
51  /// Gets a value of the property.
52  /// </summary>
53  ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Object> get_Value() const;
54  /// <summary>
55  /// Sets a value of the property.
56  /// </summary>
57  ASPOSE_TASKS_SHARED_API void set_Value(const System::SharedPtr<System::Object>& value);
58 
59  /// <summary>
60  /// Returns the property value as string.
61  /// </summary>
62  /// <returns>String value.</returns>
63  ASPOSE_TASKS_SHARED_API System::String ToString() const override;
64 
65 protected:
66 
67  ASPOSE_TASKS_SHARED_API Property(const System::String& name);
68 
69  /// <summary>
70  /// Allow to get value.
71  /// </summary>
72  /// <returns>Returns the value as an object.</returns>
73  virtual ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Object> GetValue() const;
74  /// <summary>
75  /// Allow to set value.
76  /// </summary>
77  virtual ASPOSE_TASKS_SHARED_API void SetValue(System::SharedPtr<System::Object> val);
78  #ifdef ASPOSE_GET_SHARED_MEMBERS
79  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
80  #endif
81 
82 
83 private:
84 
85  System::SharedPtr<System::Object> value;
86  System::String pr_Name;
87 
88  /// <summary>
89  /// Gets a name of the property.
90  /// </summary>
91  ASPOSE_TASKS_SHARED_API void set_Name(const System::String& value);
92 
93 };
94 
95 } // namespace Properties
96 } // namespace Tasks
97 } // namespace Aspose
98 
99 
Represents a built-in property.
Definition: BuiltInProjectProperty.h:37
Represents a custom property.
Definition: CustomProjectProperty.h:44
Represents a base class of a property.
Definition: Property.h:34
System::String ToString() const override
Returns the property value as string.
void set_Value(const System::SharedPtr< System::Object > &value)
Sets a value of the property.
System::String get_Name() const
Gets a name of the property.
System::SharedPtr< System::Object > get_Value() const
Gets a value of the property.
Definition: Asn.h:13