NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
Layout2d_ComponentDefinitionCollection.hxx
1//--------------------------------------------------------------------------
2// Copyright 2024 Siemens
3//--------------------------------------------------------------------------
4// 2D布局组件定义集合接口的C++头文件
5//--------------------------------------------------------------------------
6//
7// 源文件:
8// Layout2d_ComponentDefinitionCollection.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/Layout2d_Types.hxx>
23#include <NXOpen/TaggedObjectCollection.hxx>
24#include <NXOpen/TaggedObject.hxx>
25#include <NXOpen/libnxopencpp_layout2d_exports.hxx>
26#ifdef _MSC_VER
27#pragma warning(push)
28#pragma warning(disable:4996)
29#endif
30#ifdef __GNUC__
31#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
32#endif
33namespace NXOpen
34{
35 namespace Layout2d
36 {
38 }
39 class Part;
40 namespace Layout2d
41 {
43 }
44 namespace Layout2d
45 {
47 }
48 namespace Layout2d
49 {
50 class ComponentDefinitionCollectionImpl;
54 class NXOPENCPP_LAYOUT2DEXPORT ComponentDefinitionCollection : public NXOpen::TaggedObjectCollection
55 {
56 private: ComponentDefinitionCollectionImpl * m_componentdefinitioncollection_impl;
57 private: NXOpen::Part* m_owner;
59 public: explicit ComponentDefinitionCollection(NXOpen::Part *owner);
61 public:
63 tag_t Tag() const;
66 //lint -sem(NXOpen::Layout2d::ComponentDefinitionCollection::iterator::copy,initializer)
67 class iterator : public std::iterator<std::forward_iterator_tag, NXOpen::Layout2d::LocalDefinitionFolder *>
68 {
69 public:
71 iterator() : m_context(nullptr), m_current(NULL_TAG)
72 {
73 // coverity[uninit_member]
74 } //lint !e1401 m_state 未初始化
75
76 explicit iterator(NXOpen::Layout2d::ComponentDefinitionCollection *context) : m_context(context), m_current(NULL_TAG)
77 {
78 // coverity[uninit_member]
79 }//lint !e1401 m_state 未初始化
81
82 iterator(const iterator &other): m_context(nullptr), m_current(NULL_TAG)
83 {
84 copy(other);
85 }
86
87 iterator &operator =(const iterator &other)
88 {
89 if (&other != this)
90 copy(other);
91 return *this;
92 }
93
94 bool operator ==(const iterator &other) const
95 {
96 return m_current == other.m_current && m_context == other.m_context;
97 }
98
99 bool operator !=(const iterator &other) const
100 {
101 return !operator == (other);
102 }
103
104 NXOPENCPP_LAYOUT2DEXPORT value_type operator * () const;
106 iterator & operator ++()
107 {
108 next();
109 return *this;
110 }
111
112 iterator operator ++(int)
113 {
114 iterator tmp(*this);
115 ++*this;
116 return tmp;
117 }
118 private:
119 void copy(const iterator &other)
120 {
121 m_context = other.m_context;
122 m_current = other.m_current;
123 for (int i = 0; i < sizeof(m_state)/sizeof(m_state[0]); i++)
124 m_state[i] = other.m_state[i];
125 }
126 NXOPENCPP_LAYOUT2DEXPORT void next();
128 tag_t m_current;
129 unsigned int m_state[8];
130 };
131
135 {
136 return iterator(this);
137 }
138
144 (
145 const NXString & sid
146 );
153 (
154 const char * sid
155 );
159 public: void Rename
160 (
162 const NXString & definitionPath ,
163 const NXString & newName
164 );
169 (
171 const char * definitionPath ,
172 const char * newName
173 );
177 public: void Delete
178 (
180 const NXString & definitionPath
181 );
186 (
188 const char * definitionPath
189 );
193 public: void UpdateImage
194 (
196 const NXString & definitionPath ,
197 const NXString & imagePath
198 );
203 (
205 const char * definitionPath ,
206 const char * imagePath
207 );
212 (
214 const NXString & definitionPath ,
215 bool isAutomatic
216 );
221 (
223 const char * definitionPath ,
224 bool isAutomatic
225 );
229 public: void Update
230 (
232 const NXString & definitionPath
233 );
238 (
240 const char * definitionPath
241 );
246 (
247 );
248 }; //lint !e1712 类未定义默认构造函数
249 }
250}
251#ifdef _MSC_VER
252#pragma warning(pop)
253#endif
254#ifdef __GNUC__
255#ifndef NX_NO_GCC_DEPRECATION_WARNINGS
256#pragma GCC diagnostic warning "-Wdeprecated-declarations"
257#endif
258#endif
259#undef EXPORTLIBRARY