NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
NXMatrixCollection.hxx
1//--------------------------------------------------------------------------
2// Copyright 2024 Siemens
3//--------------------------------------------------------------------------
4// C++接口JA API的头文件
5//--------------------------------------------------------------------------
6//
7// 源文件:
8// NXMatrixCollection.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/ugmath.hxx>
25#include <NXOpen/libnxopencpp_exports.hxx>
26#ifdef _MSC_VER
27#pragma warning(push)
28#pragma warning(disable:4996)
29#endif
30#ifdef __GNUC__
31#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
32#endif
33namespace NXOpen
34{
36 class BasePart;
37 class NXMatrix;
38 class NXMatrixCollectionImpl;
45 {
46 private: NXMatrixCollectionImpl * m_nxmatrixcollection_impl;
47 private: NXOpen::BasePart* m_owner;
49 public: explicit NXMatrixCollection(NXOpen::BasePart *owner);
51 public:
53 tag_t Tag() const;
54 public: ~NXMatrixCollection();
56 //lint -sem(NXOpen::NXMatrixCollection::iterator::copy,initializer)
57 class iterator : public std::iterator<std::forward_iterator_tag, NXOpen::NXMatrix *>
58 {
59 public:
61 iterator() : m_context(nullptr), m_current(NULL_TAG)
62 {
63 // coverity[uninit_member]
64 } //lint !e1401 m_state未初始化
65
66 explicit iterator(NXOpen::NXMatrixCollection *context) : m_context(context), m_current(NULL_TAG)
67 {
68 // coverity[uninit_member]
69 }//lint !e1401 m_state未初始化
71
72 iterator(const iterator &other): m_context(nullptr), m_current(NULL_TAG)
73 {
74 copy(other);
75 }
76
77 iterator &operator =(const iterator &other)
78 {
79 if (&other != this)
80 copy(other);
81 return *this;
82 }
83
84 bool operator ==(const iterator &other) const
85 {
86 return m_current == other.m_current && m_context == other.m_context;
87 }
88
89 bool operator !=(const iterator &other) const
90 {
91 return !operator == (other);
92 }
93
94 NXOPENCPPEXPORT value_type operator * () const;
96 iterator & operator ++()
97 {
98 next();
99 return *this;
100 }
101
102 iterator operator ++(int)
103 {
104 iterator tmp(*this);
105 ++*this;
106 return tmp;
107 }
108 private:
109 void copy(const iterator &other)
110 {
111 m_context = other.m_context;
112 m_current = other.m_current;
113 for (int i = 0; i < sizeof(m_state)/sizeof(m_state[0]); i++)
114 m_state[i] = other.m_state[i];
115 }
116 NXOPENCPPEXPORT void next();
118 tag_t m_current;
119 unsigned int m_state[8];
120 };
121
125 {
126 return iterator(this);
127 }
128
134 (
135 const NXOpen::Matrix3x3 & element
137 );
142 (
143 const NXString & sid
144 );
149 (
150 const char * sid
151 );
152 }; //lint !e1712 类未定义默认构造函数
153}
154#ifdef _MSC_VER
155#pragma warning(pop)
156#endif
157#ifdef __GNUC__
158#ifndef NX_NO_GCC_DEPRECATION_WARNINGS
159#pragma GCC diagnostic warning "-Wdeprecated-declarations"
160#endif
161#endif
162#undef EXPORTLIBRARY