Aspose.Tasks for C++
WBSCodeMask.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="WBSCodeMask.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 <cstdint>
10 
11 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
12 
13 namespace Aspose
14 {
15 namespace Tasks
16 {
17 namespace IO
18 {
19 namespace Xml
20 {
21 class WBSCodeDefinitionNodeReader;
22 class WBSCodeDefinitionNodeWriter;
23 } // namespace Xml
24 } // namespace IO
25 class WBSCodeDefinition;
26 class WBSCodeMaskCollection;
27 enum class WBSSequence;
28 } // namespace Tasks
29 } // namespace Aspose
30 namespace System
31 {
32 namespace Text
33 {
34 class StringBuilder;
35 } // namespace Text
36 } // namespace System
37 
38 namespace Aspose {
39 
40 namespace Tasks {
41 
42 /// <summary>
43 /// Represents WBS Code mask.
44 /// </summary>
45 class ASPOSE_TASKS_SHARED_CLASS WBSCodeMask : public System::Object
46 {
47  typedef WBSCodeMask ThisType;
48  typedef System::Object BaseType;
49 
50  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
51  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
52 
53  friend class Aspose::Tasks::IO::Xml::WBSCodeDefinitionNodeReader;
54  friend class Aspose::Tasks::IO::Xml::WBSCodeDefinitionNodeWriter;
57 
58 public:
59 
60  /// <summary>
61  /// Gets the mask level.
62  /// </summary>
63  ASPOSE_TASKS_SHARED_API int32_t get_Level() const;
64  /// <summary>
65  /// Gets the number of characters of the code string.
66  /// </summary>
67  ASPOSE_TASKS_SHARED_API uint8_t get_Length() const;
68  /// <summary>
69  /// Sets the number of characters of the code string.
70  /// </summary>
71  ASPOSE_TASKS_SHARED_API void set_Length(uint8_t value);
72  /// <summary>
73  /// Gets the type of character of the code string.
74  /// </summary>
75  ASPOSE_TASKS_SHARED_API WBSSequence get_Sequence() const;
76  /// <summary>
77  /// Sets the type of character of the code string.
78  /// </summary>
79  ASPOSE_TASKS_SHARED_API void set_Sequence(WBSSequence value);
80  /// <summary>
81  /// Gets the separator of the code string.
82  /// <remarks>Default value is Period.</remarks>
83  /// </summary>
84  ASPOSE_TASKS_SHARED_API System::String get_Separator() const;
85  /// <summary>
86  /// Sets the separator of the code string.
87  /// <remarks>Default value is Period.</remarks>
88  /// </summary>
89  ASPOSE_TASKS_SHARED_API void set_Separator(const System::String& value);
90 
91  /// <summary>
92  /// Initializes a new instance of the <see cref="WBSCodeMask"></see> class.
93  /// </summary>
94  ASPOSE_TASKS_SHARED_API WBSCodeMask();
95 
96  ASPOSE_TASKS_SHARED_API System::String ToString() const override;
97 
98 protected:
99 
100  /// <summary>
101  /// Gets the mask level.
102  /// </summary>
103  ASPOSE_TASKS_SHARED_API void set_Level(int32_t value);
104 
105  /// <summary>
106  /// Calculates code mask for the specified number.
107  /// </summary>
108  /// <param name="n">specified number to calculate code mask for.</param>
109  /// <returns>Calculated code mask string.</returns>
110  ASPOSE_TASKS_SHARED_API System::String ToString(int32_t n);
111  #ifdef ASPOSE_GET_SHARED_MEMBERS
112  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
113  #endif
114 
115 
116 private:
117 
118  System::String separator;
119  int32_t pr_Level;
120  uint8_t pr_Length;
121  WBSSequence pr_Sequence;
122 
123  char16_t get_Char() const;
124 
125  void Insert(const System::SharedPtr<System::Text::StringBuilder>& sb, char16_t c, uint8_t count) const;
126  int64_t GetValidCount() const;
127  int32_t GetModule() const;
128 
129 };
130 
131 } // namespace Tasks
132 } // namespace Aspose
133 
134 
Represents a WBS Code Definition.
Definition: WBSCodeDefinition.h:56
Represents a collection of WBSCodeMask objects.
Definition: WBSCodeMaskCollection.h:49
Represents WBS Code mask.
Definition: WBSCodeMask.h:46
void set_Length(uint8_t value)
Sets the number of characters of the code string.
void set_Separator(const System::String &value)
Sets the separator of the code string.
WBSCodeMask()
Initializes a new instance of the WBSCodeMask class.
uint8_t get_Length() const
Gets the number of characters of the code string.
System::String get_Separator() const
Gets the separator of the code string.
WBSSequence get_Sequence() const
Gets the type of character of the code string.
int32_t get_Level() const
Gets the mask level.
void set_Sequence(WBSSequence value)
Sets the type of character of the code string.
Definition: Asn.h:13