NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
CutViewCollection.hxx
1//--------------------------------------------------------------------------
2// Copyright 2024 Siemens
3//--------------------------------------------------------------------------
4// JA API的C++接口头文件
5//--------------------------------------------------------------------------
6//
7// 源文件:
8// CutViewCollection.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_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{
35 class Part;
36 class CutView;
37 class Body;
39 class ModelingView;
40 class CutViewCollectionImpl;
45 {
46 private: CutViewCollectionImpl * m_cutviewcollection_impl;
47 private: NXOpen::Part* m_owner;
49 public: explicit CutViewCollection(NXOpen::Part *owner);
51 public:
53 tag_t Tag() const;
54 public: ~CutViewCollection();
56 //lint -sem(NXOpen::CutViewCollection::iterator::copy,initializer)
57 class iterator : public std::iterator<std::forward_iterator_tag, NXOpen::CutView *>
58 {
59 public:
61 iterator() : m_context(nullptr), m_current(NULL_TAG)
62 {
63 // coverity[uninit_member]
64 } //lint !e1401 m_state is not initialized
65
66 explicit iterator(NXOpen::CutViewCollection *context) : m_context(context), m_current(NULL_TAG)
67 {
68 // coverity[uninit_member]
69 }//lint !e1401 m_state is not initialized
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();
117 NXOpen::CutViewCollection *m_context;
118 tag_t m_current;
119 unsigned int m_state[8];
120 };
121
125 {
126 return iterator(this);
127 }
128
137 (
138 const NXString & journalIdentifier
139 );
149 (
150 const char * journalIdentifier
151 );
155 public: void UpdateCutView
156 (
157 NXOpen::CutView * view
158 );
162 public: void DeleteCutView
163 (
164 NXOpen::CutView * view
165 );
170 (
171 NXOpen::CutView * view
172 );
177 public: bool IsCutBody
178 (
179 NXOpen::Body * body
180 );
185 public: bool IsCutBodyOfView
186 (
187 NXOpen::Body * body ,
188 NXOpen::CutView * view ,
189 NXOpen::Body ** uncutBody
190 );
194 public: bool IsUncutBodyOfView
195 (
196 NXOpen::Body * body ,
197 NXOpen::CutView * view ,
198 NXOpen::Body ** cutBody
199 );
203 public: bool IsToolBody
204 (
205 NXOpen::Body * body
206 );
210 public: std::vector<NXOpen::DisplayableObject *> GetCutViewsOfObject
211 (
212 NXOpen::Body * body
213 );
214 }; //lint !e1712 default constructor not defined for class
215}
216#ifdef _MSC_VER
217#pragma warning(pop)
218#endif
219#ifdef __GNUC__
220#ifndef NX_NO_GCC_DEPRECATION_WARNINGS
221#pragma GCC diagnostic warning "-Wdeprecated-declarations"
222#endif
223#endif
224#undef EXPORTLIBRARY