NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
Motion_CouplerCollection.hxx
1//--------------------------------------------------------------------------
2// Copyright 2024 Siemens
3//--------------------------------------------------------------------------
4// C++接口JA API的头文件
5//--------------------------------------------------------------------------
6//
7// 源文件:
8// Motion_CouplerCollection.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/libnxopencpp_motion_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 Motion
35 {
37 }
38 namespace Motion
39 {
40 class MotionManager;
41 }
42 namespace Motion
43 {
44 class Coupler;
45 }
46 namespace Motion
47 {
48 class CouplerCable;
49 }
50 namespace Motion
51 {
53 }
54 namespace Motion
55 {
56 class CouplerGear;
57 }
58 namespace Motion
59 {
61 }
62 namespace Motion
63 {
64 class CouplerRckpn;
65 }
66 namespace Motion
67 {
69 }
70 namespace Motion
71 {
72 class CouplerCollectionImpl;
76 class NXOPENCPP_MOTIONEXPORT CouplerCollection : public NXOpen::TaggedObjectCollection
77 {
78 private: CouplerCollectionImpl * m_couplercollection_impl;
79 private: NXOpen::Motion::MotionManager* m_owner;
81 public: explicit CouplerCollection(NXOpen::Motion::MotionManager *owner);
83 public:
85 tag_t Tag() const;
86 public: ~CouplerCollection();
88 //lint -sem(NXOpen::Motion::CouplerCollection::iterator::copy,initializer)
89 class iterator : public std::iterator<std::forward_iterator_tag, NXOpen::Motion::Coupler *>
90 {
91 public:
93 iterator() : m_context(nullptr), m_current(NULL_TAG)
94 {
95 // coverity[uninit_member]
96 } //lint !e1401 m_state is not initialized
97
98 explicit iterator(NXOpen::Motion::CouplerCollection *context) : m_context(context), m_current(NULL_TAG)
99 {
100 // coverity[uninit_member]
101 }//lint !e1401 m_state is not initialized
103
104 iterator(const iterator &other): m_context(nullptr), m_current(NULL_TAG)
105 {
106 copy(other);
107 }
108
109 iterator &operator =(const iterator &other)
110 {
111 if (&other != this)
112 copy(other);
113 return *this;
114 }
115
116 bool operator ==(const iterator &other) const
117 {
118 return m_current == other.m_current && m_context == other.m_context;
119 }
120
121 bool operator !=(const iterator &other) const
122 {
123 return !operator == (other);
124 }
125
126 NXOPENCPP_MOTIONEXPORT value_type operator * () const;
128 iterator & operator ++()
129 {
130 next();
131 return *this;
132 }
133
134 iterator operator ++(int)
135 {
136 iterator tmp(*this);
137 ++*this;
138 return tmp;
139 }
140 private:
141 void copy(const iterator &other)
142 {
143 m_context = other.m_context;
144 m_current = other.m_current;
145 for (int i = 0; i < sizeof(m_state)/sizeof(m_state[0]); i++)
146 m_state[i] = other.m_state[i];
147 }
148 NXOPENCPP_MOTIONEXPORT void next();
150 tag_t m_current;
151 unsigned int m_state[8];
152 };
153
157 {
158 return iterator(this);
159 }
160
164 (
166 );
171 (
173 );
178 (
180 );
186 (
187 const NXString & name
188 );
194 (
195 const char * name
196 );
197}; //lint !e1712 类未定义默认构造函数
198 }
199}
200#ifdef _MSC_VER
201#pragma warning(pop)
202#endif
203#ifdef __GNUC__
204#ifndef NX_NO_GCC_DEPRECATION_WARNINGS
205#pragma GCC diagnostic warning "-Wdeprecated-declarations"
206#endif
207#endif
208#undef EXPORTLIBRARY