NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
PartMfg_ElementCollection.hxx
1//--------------------------------------------------------------------------
2// Copyright 2024 Siemens
3//--------------------------------------------------------------------------
4// JA API的C++接口头文件
5//--------------------------------------------------------------------------
6//
7// 源文件:
8// PartMfg_ElementCollection.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/PartMfg_AdHocElementBuilder.hxx>
24#include <NXOpen/PartMfg_AttributeBuilder.hxx>
25#include <NXOpen/PartMfg_DocumentElementBuilder.hxx>
26#include <NXOpen/PartMfg_Element.hxx>
27#include <NXOpen/PartMfg_FolderElementBuilder.hxx>
28#include <NXOpen/PartMfg_MaterialElementBuilder.hxx>
29#include <NXOpen/PartMfg_ModelElementBuilder.hxx>
30#include <NXOpen/PartMfg_OperationElementBuilder.hxx>
31#include <NXOpen/PartMfg_ResourceElementBuilder.hxx>
32#include <NXOpen/PartMfg_RoleElementBuilder.hxx>
33#include <NXOpen/PartMfg_StepElementBuilder.hxx>
34#include <NXOpen/TaggedObject.hxx>
35#include <NXOpen/libpartmfgopencpp_exports.hxx>
36#ifdef _MSC_VER
37#pragma warning(push)
38#pragma warning(disable:4996)
39#endif
40#ifdef __GNUC__
41#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
42#endif
43namespace NXOpen
44{
45 namespace PartMfg
46 {
48 }
49 namespace PartMfg
50 {
51 class PartMfgPart;
52 }
53 namespace PartMfg
54 {
55 class Element;
56 }
57 namespace PartMfg
58 {
60 }
61 namespace PartMfg
62 {
63 class AttributeBuilder;
64 }
65 namespace PartMfg
66 {
68 }
69 namespace PartMfg
70 {
72 }
73 namespace PartMfg
74 {
76 }
77 namespace PartMfg
78 {
80 }
81 namespace PartMfg
82 {
84 }
85 namespace PartMfg
86 {
88 }
89 namespace PartMfg
90 {
92 }
93 namespace PartMfg
94 {
96 }
97 namespace PartMfg
98 {
99 class ElementCollectionImpl;
104 class PARTMFGOPENCPPEXPORT ElementCollection : public NXOpen::TaggedObjectCollection
105 {
106 private: ElementCollectionImpl * m_elementcollection_impl;
107 private: NXOpen::PartMfg::PartMfgPart* m_owner;
109 public: explicit ElementCollection(NXOpen::PartMfg::PartMfgPart *owner);
111 public:
113 tag_t Tag() const;
114 public: ~ElementCollection();
116 //lint -sem(NXOpen::PartMfg::ElementCollection::iterator::copy,initializer)
117 class iterator : public std::iterator<std::forward_iterator_tag, NXOpen::PartMfg::Element *>
118 {
119 public:
121 iterator() : m_context(nullptr), m_current(NULL_TAG)
122 {
123 // coverity[uninit_member]
124 } //lint !e1401 m_state is not initialized
125
126 explicit iterator(NXOpen::PartMfg::ElementCollection *context) : m_context(context), m_current(NULL_TAG)
127 {
128 // coverity[uninit_member]
129 }//lint !e1401 m_state is not initialized
131
132 iterator(const iterator &other): m_context(nullptr), m_current(NULL_TAG)
133 {
134 copy(other);
135 }
136
137 iterator &operator =(const iterator &other)
138 {
139 if (&other != this)
140 copy(other);
141 return *this;
142 }
143
144 bool operator ==(const iterator &other) const
145 {
146 return m_current == other.m_current && m_context == other.m_context;
147 }
148
149 bool operator !=(const iterator &other) const
150 {
151 return !operator == (other);
152 }
153
154 PARTMFGOPENCPPEXPORT value_type operator * () const;
156 iterator & operator ++()
157 {
158 next();
159 return *this;
160 }
161
162 iterator operator ++(int)
163 {
164 iterator tmp(*this);
165 ++*this;
166 return tmp;
167 }
168 private:
169 void copy(const iterator &other)
170 {
171 m_context = other.m_context;
172 m_current = other.m_current;
173 for (int i = 0; i < sizeof(m_state)/sizeof(m_state[0]); i++)
174 m_state[i] = other.m_state[i];
175 }
176 PARTMFGOPENCPPEXPORT void next();
178 tag_t m_current;
179 unsigned int m_state[8];
180 };
181
185 {
186 return iterator(this);
187 }
188
193 (
194 );
200 (
201 NXOpen::PartMfg::Element * element
202 );
208 (
209 NXOpen::PartMfg::Element * element
210 );
216 (
217 NXOpen::PartMfg::Element * element
218 );
224 (
225 NXOpen::PartMfg::Element * element
226 );
232 (
233 NXOpen::PartMfg::Element * element
234 );
240 (
241 NXOpen::PartMfg::Element * element
242 );
248 (
249 NXOpen::PartMfg::Element * element
250 );
256 (
257 NXOpen::PartMfg::Element * element
258 );
265 (
266 const NXString & journalIdentifier
267 );
274 (
275 const char * journalIdentifier
276 );
281 public: void RemoveNthElements
282 (
283 const std::vector<int> & nthIndexes ,
284 NXOpen::PartMfg::Element * parentLineElement
285 );
291 (
292 const std::vector<int> & nthIndexes ,
293 NXOpen::PartMfg::Element * parentLineElement ,
294 int tagretIndex
295 );
300 public: void AddElements
301 (
302 const std::vector<NXOpen::PartMfg::Element *> & elementsToBeAdded ,
303 NXOpen::PartMfg::Element * parentLineElement ,
304 int targetIndex
305 );
310 public: void MoveElements
311 (
312 const std::vector<NXOpen::PartMfg::Element *> & elementsToBeMoved ,
313 NXOpen::PartMfg::Element * parentLineElement ,
314 NXOpen::PartMfg::Element * targetElement
315 );
321 (
322 NXOpen::PartMfg::Element * element
323 );
328 (
329 const std::vector<NXOpen::PartMfg::Element *> & objects ,
330 std::vector<NXOpen::PartMfg::Element *> & copiedObjects
331 );
332 }; //lint !e1712 default constructor not defined for class
333 }
334}
335#ifdef _MSC_VER
336#pragma warning(pop)
337#endif
338#ifdef __GNUC__
339#ifndef NX_NO_GCC_DEPRECATION_WARNINGS
340#pragma GCC diagnostic warning "-Wdeprecated-declarations"
341#endif
342#endif
343#undef EXPORTLIBRARY