NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
Motion_LinkCollection.hxx
1//--------------------------------------------------------------------------
2// Copyright 2024 Siemens
3//--------------------------------------------------------------------------
4// C++接口到JA API的头文件
5//--------------------------------------------------------------------------
6//
7// 源文件:
8// Motion_LinkCollection.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/Motion_Link.hxx>
23#include <NXOpen/Motion_LinkBuilder.hxx>
24#include <NXOpen/TaggedObjectCollection.hxx>
25#include <NXOpen/TaggedObject.hxx>
26#include <NXOpen/libnxopencpp_motion_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 Motion
37 {
38 class LinkCollection;
39 }
40 namespace Motion
41 {
42 class MotionManager;
43 }
44 namespace Motion
45 {
46 class Link;
47 }
48 namespace Motion
49 {
50 class Joint;
51 }
52 namespace Motion
53 {
54 class LinkBuilder;
55 }
56 namespace Motion
57 {
58 class LinkCollectionImpl;
62 class NXOPENCPP_MOTIONEXPORT LinkCollection : public NXOpen::TaggedObjectCollection
63 {
64 private: LinkCollectionImpl * m_linkcollection_impl;
65 private: NXOpen::Motion::MotionManager* m_owner;
67 public: explicit LinkCollection(NXOpen::Motion::MotionManager *owner);
69 public:
71 tag_t Tag() const;
72 public: ~LinkCollection();
74 //lint -sem(NXOpen::Motion::LinkCollection::iterator::copy,initializer)
75 class iterator : public std::iterator<std::forward_iterator_tag, NXOpen::Motion::Link *>
76 {
77 public:
79 iterator() : m_context(nullptr), m_current(NULL_TAG)
80 {
81 // coverity[uninit_member]
82 } //lint !e1401 m_state未初始化
83
84 explicit iterator(NXOpen::Motion::LinkCollection *context) : m_context(context), m_current(NULL_TAG)
85 {
86 // coverity[uninit_member]
87 }//lint !e1401 m_state未初始化
89
90 iterator(const iterator &other): m_context(nullptr), m_current(NULL_TAG)
91 {
92 copy(other);
93 }
94
95 iterator &operator =(const iterator &other)
96 {
97 if (&other != this)
98 copy(other);
99 return *this;
100 }
101
102 bool operator ==(const iterator &other) const
103 {
104 return m_current == other.m_current && m_context == other.m_context;
105 }
106
107 bool operator !=(const iterator &other) const
108 {
109 return !operator == (other);
110 }
111
112 NXOPENCPP_MOTIONEXPORT value_type operator * () const;
114 iterator & operator ++()
115 {
116 next();
117 return *this;
118 }
119
120 iterator operator ++(int)
121 {
122 iterator tmp(*this);
123 ++*this;
124 return tmp;
125 }
126 private:
127 void copy(const iterator &other)
128 {
129 m_context = other.m_context;
130 m_current = other.m_current;
131 for (int i = 0; i < sizeof(m_state)/sizeof(m_state[0]); i++)
132 m_state[i] = other.m_state[i];
133 }
134 NXOPENCPP_MOTIONEXPORT void next();
136 tag_t m_current;
137 unsigned int m_state[8];
138 };
139
143 {
144 return iterator(this);
145 }
146
150 (
152 );
157 (
159 );
165 (
166 const NXString & name
167 );
173 (
174 const char * name
175 );
176 }; //lint !e1712 类未定义默认构造函数
177 }
178}
179#ifdef _MSC_VER
180#pragma warning(pop)
181#endif
182#ifdef __GNUC__
183#ifndef NX_NO_GCC_DEPRECATION_WARNINGS
184#pragma GCC diagnostic warning "-Wdeprecated-declarations"
185#endif
186#endif
187#undef EXPORTLIBRARY