NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
Rule_RuleInstanceCollection.hxx
1//--------------------------------------------------------------------------
2// Copyright 2024 Siemens
3//--------------------------------------------------------------------------
4// JA API的C++接口头文件
5//--------------------------------------------------------------------------
6//
7// 源文件:
8// Rule_RuleInstanceCollection.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/libruleopencpp_exports.hxx>
25#ifdef _MSC_VER
26#pragma warning(push)
27#pragma warning(disable:4996)
28#endif
29#ifdef __GNUC__
30#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
31#endif
32namespace NXOpen
33{
34 namespace Rule
35 {
37 }
38 namespace Rule
39 {
40 class RuleManager;
41 }
42 namespace Rule
43 {
44 class RuleInstance;
45 }
46 class Part;
47 namespace Rule
48 {
49 class RuleInstanceCollectionImpl;
54 {
55 private: RuleInstanceCollectionImpl * m_ruleinstancecollection_impl;
56 private: NXOpen::Rule::RuleManager* m_owner;
60 public:
62 tag_t Tag() const;
65 //lint -sem(NXOpen::Rule::RuleInstanceCollection::iterator::copy,initializer)
66 class iterator : public std::iterator<std::forward_iterator_tag, NXOpen::Rule::RuleInstance *>
67 {
68 public:
70 iterator() : m_context(nullptr), m_current(NULL_TAG)
71 {
72 // coverity[uninit_member]
73 } //lint !e1401 m_state未初始化
74
75 explicit iterator(NXOpen::Rule::RuleInstanceCollection *context) : m_context(context), m_current(NULL_TAG)
76 {
77 // coverity[uninit_member]
78 }//lint !e1401 m_state未初始化
80
81 iterator(const iterator &other): m_context(nullptr), m_current(NULL_TAG)
82 {
83 copy(other);
84 }
85
86 iterator &operator =(const iterator &other)
87 {
88 if (&other != this)
89 copy(other);
90 return *this;
91 }
92
93 bool operator ==(const iterator &other) const
94 {
95 return m_current == other.m_current && m_context == other.m_context;
96 }
97
98 bool operator !=(const iterator &other) const
99 {
100 return !operator == (other);
101 }
102
103 RULEOPENCPPEXPORT value_type operator * () const;
105 iterator & operator ++()
106 {
107 next();
108 return *this;
109 }
110
111 iterator operator ++(int)
112 {
113 iterator tmp(*this);
114 ++*this;
115 return tmp;
116 }
117 private:
118 void copy(const iterator &other)
119 {
120 m_context = other.m_context;
121 m_current = other.m_current;
122 for (int i = 0; i < sizeof(m_state)/sizeof(m_state[0]); i++)
123 m_state[i] = other.m_state[i];
124 }
125 RULEOPENCPPEXPORT void next();
127 tag_t m_current;
128 unsigned int m_state[8];
129 };
130
134 {
135 return iterator(this);
136 }
137
142 (
143 NXOpen::Part * partTag ,
144 const NXString & journalIdentifier
145 );
151 (
152 NXOpen::Part * partTag ,
153 const char * journalIdentifier
154 );
158 public: void GetRules
159 (
160 NXOpen::Part * partTag ,
161 std::vector<NXOpen::Rule::RuleInstance *> & rules
162 );
167 public: void FindRules
168 (
169 NXOpen::Part * partTag ,
170 std::vector<NXString> & ruleNames ,
171 std::vector<NXOpen::Rule::RuleInstance *> & rules ,
172 std::vector<NXString> & notFoundNames
173 );
174 }; //lint !e1712 类未定义默认构造函数
175 }
176}
177#ifdef _MSC_VER
178#pragma warning(pop)
179#endif
180#ifdef __GNUC__
181#ifndef NX_NO_GCC_DEPRECATION_WARNINGS
182#pragma GCC diagnostic warning "-Wdeprecated-declarations"
183#endif
184#endif
185#undef EXPORTLIBRARY