Aspose.Tasks for C++
CustomProjectPropertyCollection.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="CustomProjectPropertyCollection.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2024 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include <system/details/pointer_collection_helpers.h>
9 #include <cstdint>
10 
11 #include "aspose.tasks.cpp/PropertyCollections/PropertyKeyedCollection.h"
12 #include "aspose.tasks.cpp/PropertyCollections/CustomProjectProperty.h"
13 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
14 
15 namespace Aspose
16 {
17 namespace Tasks
18 {
19 namespace IO
20 {
21 namespace MSProject
22 {
23 class DocSummaryInformationReader;
24 class DocSummaryInformationWriter;
25 } // namespace MSProject
26 } // namespace IO
27 namespace Properties
28 {
29 class CustomProjectPropertyWrapperCollection;
30 template <typename> class PropertyKeyedCollection;
31 } // namespace Properties
32 } // namespace Tasks
33 } // namespace Aspose
34 namespace System
35 {
36 class DateTime;
37 class String;
38 } // namespace System
39 
40 namespace Aspose {
41 
42 namespace Tasks {
43 
44 namespace Properties {
45 
46 /// <summary>
47 /// Represents a collection of custom project properties.
48 /// </summary>
49 class ASPOSE_TASKS_SHARED_CLASS CustomProjectPropertyCollection final : public Aspose::Tasks::Properties::PropertyKeyedCollection<System::SharedPtr<Aspose::Tasks::Properties::CustomProjectProperty>>
50 {
53 
54  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
55  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
56 
57  friend class Aspose::Tasks::Properties::CustomProjectPropertyWrapperCollection;
58  friend class Aspose::Tasks::IO::MSProject::DocSummaryInformationReader;
59  friend class Aspose::Tasks::IO::MSProject::DocSummaryInformationWriter;
60 
61 public:
62 
63  /// <summary>
64  /// Gets a value indicating whether this collection is read-only; otherwise, false.
65  /// </summary>
66  ASPOSE_TASKS_SHARED_API bool get_IsReadOnly() const override;
67 
68  /// <summary>
69  /// Initializes a new instance of the <see cref="CustomProjectPropertyCollection"></see> class.
70  /// </summary>
71  ASPOSE_TASKS_SHARED_API CustomProjectPropertyCollection();
72 
73  /// <summary>
74  /// Removes a property with the specified name from the collection.
75  /// </summary>
76  /// <param name="name">The case-insensitive name of the property.</param>
77  /// <returns>True if the element is successfully found and removed; otherwise, false.</returns>
78  ASPOSE_TASKS_SHARED_API bool Remove(const System::String& name);
79  /// <summary>
80  /// Creates a new custom property.
81  /// </summary>
82  /// <param name="name"> The name of the property.</param>
83  /// <param name="value">The newly created property object value.</param>
84  /// <returns>The newly created property object.</returns>
85  ASPOSE_TASKS_SHARED_API System::SharedPtr<CustomProjectProperty> Add(const System::String& name, const System::String& value);
86  /// <summary>
87  /// Creates a new custom property.
88  /// </summary>
89  /// <param name="name"> The name of the property.</param>
90  /// <param name="value">The newly created property object value.</param>
91  /// <returns>The newly created property object.</returns>
92  ASPOSE_TASKS_SHARED_API System::SharedPtr<CustomProjectProperty> Add(const System::String& name, bool value);
93  /// <summary>
94  /// Creates a new custom property.
95  /// </summary>
96  /// <param name="name"> The name of the property.</param>
97  /// <param name="value">The newly created property object value.</param>
98  /// <returns>The newly created property object.</returns>
99  ASPOSE_TASKS_SHARED_API System::SharedPtr<CustomProjectProperty> Add(const System::String& name, double value);
100  /// <summary>
101  /// Creates a new custom property.
102  /// </summary>
103  /// <param name="name"> The name of the property.</param>
104  /// <param name="value">The newly created property object value.</param>
105  /// <returns>The newly created property object.</returns>
106  ASPOSE_TASKS_SHARED_API System::SharedPtr<CustomProjectProperty> Add(const System::String& name, System::DateTime value);
107  ASPOSE_TASKS_SHARED_API void SetTemplateWeakPtr(uint32_t argument) override;
108 
109 protected:
110 
111  ASPOSE_TASKS_SHARED_API System::SharedPtr<CustomProjectProperty> Add(const System::String& name, const System::SharedPtr<System::Object>& value);
112 
113  virtual ASPOSE_TASKS_SHARED_API ~CustomProjectPropertyCollection();
114 
115 private:
116 
117  System::SharedPtr<CustomProjectProperty> AddProperty(const System::String& name, const System::SharedPtr<System::Object>& value);
118 
119 };
120 
121 } // namespace Properties
122 } // namespace Tasks
123 } // namespace Aspose
124 
125 
Represents a collection of custom project properties.
Definition: CustomProjectPropertyCollection.h:50
bool get_IsReadOnly() const override
Gets a value indicating whether this collection is read-only; otherwise, false.
System::SharedPtr< CustomProjectProperty > Add(const System::String &name, bool value)
Creates a new custom property.
System::SharedPtr< CustomProjectProperty > Add(const System::String &name, const System::String &value)
Creates a new custom property.
CustomProjectPropertyCollection()
Initializes a new instance of the CustomProjectPropertyCollection class.
System::SharedPtr< CustomProjectProperty > Add(const System::String &name, System::DateTime value)
Creates a new custom property.
bool Remove(const System::String &name)
Removes a property with the specified name from the collection.
System::SharedPtr< CustomProjectProperty > Add(const System::String &name, double value)
Creates a new custom property.
A base class of collection of properties.
Definition: PropertyKeyedCollection.h:48
Definition: Asn.h:13