NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
Mechatronics_ProxyObjectCollection.hxx
1//--------------------------------------------------------------------------
2// Copyright 2024 Siemens
3//--------------------------------------------------------------------------
4// JA API的C++接口头文件
5//--------------------------------------------------------------------------
6//
7// 源文件:
8// Mechatronics_ProxyObjectCollection.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/Mechatronics_ProxyObject.hxx>
23#include <NXOpen/Mechatronics_ProxyObjectBuilder.hxx>
24#include <NXOpen/TaggedObjectCollection.hxx>
25#include <NXOpen/TaggedObject.hxx>
26#include <NXOpen/libnxopencpp_mechatronics_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 Mechatronics
37 {
39 }
40 class Part;
41 namespace Mechatronics
42 {
43 class ProxyObject;
44 }
45 namespace Mechatronics
46 {
48 }
49 namespace Mechatronics
50 {
52 }
53 namespace Mechatronics
54 {
55 class ProxyObjectCollectionImpl;
59 class NXOPENCPP_MECHATRONICSEXPORT ProxyObjectCollection : public NXOpen::TaggedObjectCollection
60 {
61 private: ProxyObjectCollectionImpl * m_proxyobjectcollection_impl;
62 private: NXOpen::Part* m_owner;
64 public: explicit ProxyObjectCollection(NXOpen::Part *owner);
66 public:
68 tag_t Tag() const;
69 public: ~ProxyObjectCollection();
71 //lint -sem(NXOpen::Mechatronics::ProxyObjectCollection::iterator::copy,initializer)
72 class iterator : public std::iterator<std::forward_iterator_tag, NXOpen::Mechatronics::ProxyObject *>
73 {
74 public:
76 iterator() : m_context(nullptr), m_current(NULL_TAG)
77 {
78 // coverity[uninit_member]
79 } //lint !e1401 m_state 未初始化
80
81 explicit iterator(NXOpen::Mechatronics::ProxyObjectCollection *context) : m_context(context), m_current(NULL_TAG)
82 {
83 // coverity[uninit_member]
84 }//lint !e1401 m_state 未初始化
86
87 iterator(const iterator &other): m_context(nullptr), m_current(NULL_TAG)
88 {
89 copy(other);
90 }
91
92 iterator &operator =(const iterator &other)
93 {
94 if (&other != this)
95 copy(other);
96 return *this;
97 }
98
99 bool operator ==(const iterator &other) const
100 {
101 return m_current == other.m_current && m_context == other.m_context;
102 }
103
104 bool operator !=(const iterator &other) const
105 {
106 return !operator == (other);
107 }
108
109 NXOPENCPP_MECHATRONICSEXPORT value_type operator * () const;
111 iterator & operator ++()
112 {
113 next();
114 return *this;
115 }
116
117 iterator operator ++(int)
118 {
119 iterator tmp(*this);
120 ++*this;
121 return tmp;
122 }
123 private:
124 void copy(const iterator &other)
125 {
126 m_context = other.m_context;
127 m_current = other.m_current;
128 for (int i = 0; i < sizeof(m_state)/sizeof(m_state[0]); i++)
129 m_state[i] = other.m_state[i];
130 }
131 NXOPENCPP_MECHATRONICSEXPORT void next();
133 tag_t m_current;
134 unsigned int m_state[8];
135 };
136
140 {
141 return iterator(this);
142 }
143
147 (
149 );
154 (
155 );
161 (
162 const NXString & name
163 );
169 (
170 const char * name
171 );
172 }; //lint !e1712 类未定义默认构造函数
173 }
174}
175#ifdef _MSC_VER
176#pragma warning(pop)
177#endif
178#ifdef __GNUC__
179#ifndef NX_NO_GCC_DEPRECATION_WARNINGS
180#pragma GCC diagnostic warning "-Wdeprecated-declarations"
181#endif
182#endif
183#undef EXPORTLIBRARY