NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
PartMfg_OperationCollection.hxx
1//--------------------------------------------------------------------------
2// Copyright 2024 Siemens
3//--------------------------------------------------------------------------
4// JA API的C++接口头文件
5//--------------------------------------------------------------------------
6//
7// 源文件:
8// PartMfg_OperationCollection.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/PartMfg_Operation.hxx>
24#include <NXOpen/PartMfg_OperationBuilder.hxx>
25#include <NXOpen/TaggedObject.hxx>
26#include <NXOpen/libpartmfgopencpp_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 PartMfg
37 {
39 }
40 namespace PartMfg
41 {
42 class PartMfgPart;
43 }
44 namespace PartMfg
45 {
46 class Operation;
47 }
48 namespace PartMfg
49 {
50 class OperationBuilder;
51 }
52 namespace PartMfg
53 {
54 class OperationCollectionImpl;
59 class PARTMFGOPENCPPEXPORT OperationCollection : public NXOpen::TaggedObjectCollection
60 {
61 private: OperationCollectionImpl * m_operationcollection_impl;
62 private: NXOpen::PartMfg::PartMfgPart* m_owner;
66 public:
68 tag_t Tag() const;
69 public: ~OperationCollection();
71 //lint -sem(NXOpen::PartMfg::OperationCollection::iterator::copy,initializer)
72 class iterator : public std::iterator<std::forward_iterator_tag, NXOpen::PartMfg::Operation *>
73 {
74 public:
76 iterator() : m_context(nullptr), m_current(NULL_TAG)
77 {
78 // coverity[uninit_member]
79 } //lint !e1401 m_state未初始化
80
81 explicit iterator(NXOpen::PartMfg::OperationCollection *context) : m_context(context), m_current(NULL_TAG)
82 {
83 // coverity[uninit_member]
84 }//lint !e1401 m_state未初始化
86
87 iterator(const iterator &other): m_context(nullptr), m_current(NULL_TAG)
88 {
89 copy(other);
90 }
91
92 iterator &operator =(const iterator &other)
93 {
94 if (&other != this)
95 copy(other);
96 return *this;
97 }
98
99 bool operator ==(const iterator &other) const
100 {
101 return m_current == other.m_current && m_context == other.m_context;
102 }
103
104 bool operator !=(const iterator &other) const
105 {
106 return !operator == (other);
107 }
108
109 PARTMFGOPENCPPEXPORT value_type operator * () const;
111 iterator & operator ++()
112 {
113 next();
114 return *this;
115 }
116
117 iterator operator ++(int)
118 {
119 iterator tmp(*this);
120 ++*this;
121 return tmp;
122 }
123 private:
124 void copy(const iterator &other)
125 {
126 m_context = other.m_context;
127 m_current = other.m_current;
128 for (int i = 0; i < sizeof(m_state)/sizeof(m_state[0]); i++)
129 m_state[i] = other.m_state[i];
130 }
131 PARTMFGOPENCPPEXPORT void next();
133 tag_t m_current;
134 unsigned int m_state[8];
135 };
136
140 {
141 return iterator(this);
142 }
143
148 (
149 NXOpen::PartMfg::Operation * operation
150 );
151 }; //lint !e1712 类未定义默认构造函数
152 }
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