NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
AxisCollection.hxx
1//--------------------------------------------------------------------------
2// Copyright 2024 Siemens
3//--------------------------------------------------------------------------
4// C++ 接口访问 JA API 的头文件
5//--------------------------------------------------------------------------
6//
7// 源文件:
8// AxisCollection.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/SmartObject.hxx>
24#include <NXOpen/TaggedObject.hxx>
25#include <NXOpen/ugmath.hxx>
26#include <NXOpen/libnxopencpp_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 class AxisCollection;
37 class BasePart;
38 class Axis;
39 class Direction;
40 class Point;
41 class Xform;
42 class AxisCollectionImpl;
48 class NXOPENCPPEXPORT AxisCollection : public NXOpen::TaggedObjectCollection
49 {
50 private: AxisCollectionImpl * m_axiscollection_impl;
51 private: NXOpen::BasePart* m_owner;
53 public: explicit AxisCollection(NXOpen::BasePart *owner);
55 public:
57 tag_t Tag() const;
58 public: ~AxisCollection();
60 //lint -sem(NXOpen::AxisCollection::iterator::copy,initializer)
61 class iterator : public std::iterator<std::forward_iterator_tag, NXOpen::Axis *>
62 {
63 public:
65 iterator() : m_context(nullptr), m_current(NULL_TAG)
66 {
67 // coverity[uninit_member]
68 } //lint !e1401 m_state is not initialized
69
70 explicit iterator(NXOpen::AxisCollection *context) : m_context(context), m_current(NULL_TAG)
71 {
72 // coverity[uninit_member]
73 }//lint !e1401 m_state is not initialized
75
76 iterator(const iterator &other): m_context(nullptr), m_current(NULL_TAG)
77 {
78 copy(other);
79 }
80
81 iterator &operator =(const iterator &other)
82 {
83 if (&other != this)
84 copy(other);
85 return *this;
86 }
87
88 bool operator ==(const iterator &other) const
89 {
90 return m_current == other.m_current && m_context == other.m_context;
91 }
92
93 bool operator !=(const iterator &other) const
94 {
95 return !operator == (other);
96 }
97
98 NXOPENCPPEXPORT value_type operator * () const;
100 iterator & operator ++()
101 {
102 next();
103 return *this;
104 }
105
106 iterator operator ++(int)
107 {
108 iterator tmp(*this);
109 ++*this;
110 return tmp;
111 }
112 private:
113 void copy(const iterator &other)
114 {
115 m_context = other.m_context;
116 m_current = other.m_current;
117 for (int i = 0; i < sizeof(m_state)/sizeof(m_state[0]); i++)
118 m_state[i] = other.m_state[i];
119 }
120 NXOPENCPPEXPORT void next();
121 NXOpen::AxisCollection *m_context;
122 tag_t m_current;
123 unsigned int m_state[8];
124 };
125
129 {
130 return iterator(this);
131 }
132
136 (
137 NXOpen::Point * point ,
138 NXOpen::Direction * direction ,
142 );
147 (
148 const NXOpen::Point3d & point ,
149 const NXOpen::Vector3d & direction ,
153 );
158 (
159 NXOpen::Axis * axis ,
160 NXOpen::Xform * xform ,
162 );
163 }; //lint !e1712 default constructor not defined for class
164}
165#ifdef _MSC_VER
166#pragma warning(pop)
167#endif
168#ifdef __GNUC__
169#ifndef NX_NO_GCC_DEPRECATION_WARNINGS
170#pragma GCC diagnostic warning "-Wdeprecated-declarations"
171#endif
172#endif
173#undef EXPORTLIBRARY