NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
Positioning_DisplayedConstraintCollection.hxx
1//--------------------------------------------------------------------------
2// Copyright 2024 Siemens
3//--------------------------------------------------------------------------
4// JA API的C++接口头文件
5//--------------------------------------------------------------------------
6//
7// 源文件:
8// Positioning_DisplayedConstraintCollection.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_positioning_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 Positioning
35 {
37 }
38 class Part;
39 namespace Positioning
40 {
42 }
43 namespace Positioning
44 {
45 class DisplayedConstraintCollectionImpl;
51 class NXOPENCPP_POSITIONINGEXPORT DisplayedConstraintCollection : public NXOpen::TaggedObjectCollection
52 {
53 private: DisplayedConstraintCollectionImpl * m_displayedconstraintcollection_impl;
54 private: NXOpen::Part* m_owner;
56 public: explicit DisplayedConstraintCollection(NXOpen::Part *owner);
58 public:
60 tag_t Tag() const;
63 //lint -sem(NXOpen::Positioning::DisplayedConstraintCollection::iterator::copy,initializer)
64 class iterator : public std::iterator<std::forward_iterator_tag, NXOpen::Positioning::DisplayedConstraint *>
65 {
66 public:
68 iterator() : m_context(nullptr), m_current(NULL_TAG)
69 {
70 // coverity[uninit_member]
71 } //lint !e1401 m_state未初始化
72
73 explicit iterator(NXOpen::Positioning::DisplayedConstraintCollection *context) : m_context(context), m_current(NULL_TAG)
74 {
75 // coverity[uninit_member]
76 }//lint !e1401 m_state未初始化
78
79 iterator(const iterator &other): m_context(nullptr), m_current(NULL_TAG)
80 {
81 copy(other);
82 }
83
84 iterator &operator =(const iterator &other)
85 {
86 if (&other != this)
87 copy(other);
88 return *this;
89 }
90
91 bool operator ==(const iterator &other) const
92 {
93 return m_current == other.m_current && m_context == other.m_context;
94 }
95
96 bool operator !=(const iterator &other) const
97 {
98 return !operator == (other);
99 }
100
101 NXOPENCPP_POSITIONINGEXPORT value_type operator * () const;
103 iterator & operator ++()
104 {
105 next();
106 return *this;
107 }
108
109 iterator operator ++(int)
110 {
111 iterator tmp(*this);
112 ++*this;
113 return tmp;
114 }
115 private:
116 void copy(const iterator &other)
117 {
118 m_context = other.m_context;
119 m_current = other.m_current;
120 for (int i = 0; i < sizeof(m_state)/sizeof(m_state[0]); i++)
121 m_state[i] = other.m_state[i];
122 }
123 NXOPENCPP_POSITIONINGEXPORT void next();
125 tag_t m_current;
126 unsigned int m_state[8];
127 };
128
132 {
133 return iterator(this);
134 }
135 }; //lint !e1712 类未定义默认构造函数
136 }
137}
138#ifdef _MSC_VER
139#pragma warning(pop)
140#endif
141#ifdef __GNUC__
142#ifndef NX_NO_GCC_DEPRECATION_WARNINGS
143#pragma GCC diagnostic warning "-Wdeprecated-declarations"
144#endif
145#endif
146#undef EXPORTLIBRARY