NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
Validate_RequirementCollection.hxx
1//--------------------------------------------------------------------------
2// Copyright 2024 Siemens
3//--------------------------------------------------------------------------
4// C++接口到JA API的头文件
5//--------------------------------------------------------------------------
6//
7// 源文件:
8// Validate_RequirementCollection.ja
9//
10// 生成方式:
11// apiwrap
12//
13// 警告:
14// 此文件由自动生成 - 请勿手动编辑
15//
16#pragma once
17#include <NXOpen/NXDeprecation.hxx>
18#include <iterator>
19#include <vector>
20#include <NXOpen/NXString.hxx>
21#include <NXOpen/Callback.hxx>
22#include <NXOpen/TaggedObjectCollection.hxx>
23#include <NXOpen/TaggedObject.hxx>
24#include <NXOpen/Validate_Requirement.hxx>
25#include <NXOpen/Validate_RequirementBuilder.hxx>
26#include <NXOpen/libnxopencpp_validate_exports.hxx>
27#ifdef _MSC_VER
28#pragma warning(push)
29#pragma warning(disable:4996)
30#endif
31#ifdef __GNUC__
32#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
33#endif
34namespace NXOpen
35{
36 namespace Validate
37 {
39 }
40 class BasePart;
41 namespace Validate
42 {
43 class Requirement;
44 }
45 namespace Validate
46 {
48 }
49 namespace Validate
50 {
51 class RequirementCollectionImpl;
57 class NXOPENCPP_VALIDATEEXPORT RequirementCollection : public NXOpen::TaggedObjectCollection
58 {
67 private: RequirementCollectionImpl * m_requirementcollection_impl;
68 private: NXOpen::BasePart* m_owner;
70 public: explicit RequirementCollection(NXOpen::BasePart *owner);
72 public:
74 tag_t Tag() const;
75 public: ~RequirementCollection();
77 //lint -sem(NXOpen::Validate::RequirementCollection::iterator::copy,initializer)
78 class iterator : public std::iterator<std::forward_iterator_tag, NXOpen::Validate::Requirement *>
79 {
80 public:
82 iterator() : m_context(nullptr), m_current(NULL_TAG)
83 {
84 // coverity[uninit_member]
85 } //lint !e1401 m_state 未初始化
86
87 explicit iterator(NXOpen::Validate::RequirementCollection *context) : m_context(context), m_current(NULL_TAG)
88 {
89 // coverity[uninit_member]
90 }//lint !e1401 m_state 未初始化
92
93 iterator(const iterator &other): m_context(nullptr), m_current(NULL_TAG)
94 {
95 copy(other);
96}
97
98 iterator &operator =(const iterator &other)
99 {
100 if (&other != this)
101 copy(other);
102 return *this;
103 }
104
105 bool operator ==(const iterator &other) const
106 {
107 return m_current == other.m_current && m_context == other.m_context;
108 }
109
110 bool operator !=(const iterator &other) const
111 {
112 return !operator == (other);
113 }
114
115 NXOPENCPP_VALIDATEEXPORT value_type operator * () const;
117 iterator & operator ++()
118 {
119 next();
120 return *this;
121 }
122
123 iterator operator ++(int)
124 {
125 iterator tmp(*this);
126 ++*this;
127 return tmp;
128 }
129 private:
130 void copy(const iterator &other)
131 {
132 m_context = other.m_context;
133 m_current = other.m_current;
134 for (int i = 0; i < sizeof(m_state)/sizeof(m_state[0]); i++)
135 m_state[i] = other.m_state[i];
136 }
137 NXOPENCPP_VALIDATEEXPORT void next();
139 tag_t m_current;
140 unsigned int m_state[8];
141 };
142
146 {
147 return iterator(this);
148 }
149
153 (
154 NXOpen::Validate::Requirement * requirement
155 );
161 (
162 const NXString & id
163 );
169 (
170 const char * id
171 );
213 (
215 const NXString & source ,
216 const NXString & revision ,
217 const NXString & project
219 );
261 (
263 const char * source ,
264 const char * revision ,
265 const char * project
267 );
272 (
273 );
277 public: void SetRevisionRule
278 (
279 const NXString & rule
280 );
285 (
286 const char * rule
287 );
292 (
293 const std::vector<NXOpen::Validate::Requirement *> & requirementTags
294 );
295 }; //lint !e1712 类未定义默认构造函数
296 }
297}
298#ifdef _MSC_VER
299#pragma warning(pop)
300#endif
301#ifdef __GNUC__
302#ifndef NX_NO_GCC_DEPRECATION_WARNINGS
303#pragma GCC diagnostic warning "-Wdeprecated-declarations"
304#endif
305#endif
306#undef EXPORTLIBRARY