NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
SectionCollection.hxx
1//--------------------------------------------------------------------------
2// Copyright 2024 Siemens
3//--------------------------------------------------------------------------
4// JA API的C++接口头文件
5//--------------------------------------------------------------------------
6//
7// 源文件:
8// SectionCollection.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 BasePart;
36 class Section;
37 class NXObject;
38 class SectionCollectionImpl;
43 {
51 private: SectionCollectionImpl * m_sectioncollection_impl;
52 private: NXOpen::BasePart* m_owner;
54 public: explicit SectionCollection(NXOpen::BasePart *owner);
56 public:
58 tag_t Tag() const;
59 public: ~SectionCollection();
61 //lint -sem(NXOpen::SectionCollection::iterator::copy,initializer)
62 class iterator : public std::iterator<std::forward_iterator_tag, NXOpen::Section *>
63 {
64 public:
66 iterator() : m_context(nullptr), m_current(NULL_TAG)
67 {
68 // coverity[uninit_member]
69 } //lint !e1401 m_state is not initialized
70
71 explicit iterator(NXOpen::SectionCollection *context) : m_context(context), m_current(NULL_TAG)
72 {
73 // coverity[uninit_member]
74 }//lint !e1401 m_state is not initialized
76
77 iterator(const iterator &other): m_context(nullptr), m_current(NULL_TAG)
78 {
79 copy(other);
80 }
81
82 iterator &operator =(const iterator &other)
83 {
84 if (&other != this)
85 copy(other);
86 return *this;
87 }
88
89 bool operator ==(const iterator &other) const
90 {
91 return m_current == other.m_current && m_context == other.m_context;
92 }
93
94 bool operator !=(const iterator &other) const
95 {
96 return !operator == (other);
97}
98
99 NXOPENCPPEXPORT value_type operator * () const;
101 iterator & operator ++()
102 {
103 next();
104 return *this;
105 }
106
107 iterator operator ++(int)
108 {
109 iterator tmp(*this);
110 ++*this;
111 return tmp;
112 }
113 private:
114 void copy(const iterator &other)
115 {
116 m_context = other.m_context;
117 m_current = other.m_current;
118 for (int i = 0; i < sizeof(m_state)/sizeof(m_state[0]); i++)
119 m_state[i] = other.m_state[i];
120 }
121 NXOPENCPPEXPORT void next();
122 NXOpen::SectionCollection *m_context;
123 tag_t m_current;
124 unsigned int m_state[8];
125 };
126
130 {
131 return iterator(this);
132 }
133
151 (
152 double chainingTolerance ,
153 double distanceTolerance ,
154 double angleTolerance
155 );
174 (
175 );
187 (
188 const std::vector<NXOpen::NXObject *> & curves ,
190 double chainingTolerance ,
191 double distanceTolerance ,
192 double angleTolerance ,
193 std::vector<NXOpen::Section *> & section
194 );
199 (
200 NXOpen::NXObject * curve
201 );
202}; //lint !e1712 未为类定义默认构造函数
203}
204#ifdef _MSC_VER
205#pragma warning(pop)
206#endif
207#ifdef __GNUC__
208#ifndef NX_NO_GCC_DEPRECATION_WARNINGS
209#pragma GCC diagnostic warning "-Wdeprecated-declarations"
210#endif
211#endif
212#undef EXPORTLIBRARY