NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
UserDefinedTemplate_Collection.hxx
1//--------------------------------------------------------------------------
2// Copyright 2024 Siemens
3//--------------------------------------------------------------------------
4// JA API的C++接口头文件
5//--------------------------------------------------------------------------
6//
7// 源文件:
8// UserDefinedTemplate_Collection.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_userdefinedtemplate_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 UserDefinedTemplate
35 {
36 class Collection;
37 }
38 class Part;
39 class TaggedObject;
40 namespace Features
41 {
42 class Feature;
43 }
44 namespace UserDefinedTemplate
45 {
46 class Definition;
47 }
48 namespace UserDefinedTemplate
49 {
51 }
52 namespace UserDefinedTemplate
53 {
54 class Instantiation;
55 }
56 namespace UserDefinedTemplate
57 {
59 }
60 namespace UserDefinedTemplate
61 {
62 class CollectionImpl;
66 class NXOPENCPP_USERDEFINEDTEMPLATEEXPORT Collection : public NXOpen::TaggedObjectCollection
67 {
68 private: CollectionImpl * m_collection_impl;
69 private: NXOpen::Part* m_owner;
71 public: explicit Collection(NXOpen::Part *owner);
73 public:
75 tag_t Tag() const;
76 public: ~Collection();
78 //lint -sem(NXOpen::UserDefinedTemplate::Collection::iterator::copy,initializer)
79 class iterator : public std::iterator<std::forward_iterator_tag, NXOpen::TaggedObject *>
80 {
81 public:
83 iterator() : m_context(nullptr), m_current(NULL_TAG)
84 {
85 // coverity[uninit_member]
86 } //lint !e1401 m_state is not initialized
87
88 explicit iterator(NXOpen::UserDefinedTemplate::Collection *context) : m_context(context), m_current(NULL_TAG)
89 {
90 // coverity[uninit_member]
91 }//lint !e1401 m_state is not initialized
93
94 iterator(const iterator &other): m_context(nullptr), m_current(NULL_TAG)
95 {
96 copy(other);
97}
98
99 iterator &operator =(const iterator &other)
100 {
101 if (&other != this)
102 copy(other);
103 return *this;
104 }
105
106 bool operator ==(const iterator &other) const
107 {
108 return m_current == other.m_current && m_context == other.m_context;
109 }
110
111 bool operator !=(const iterator &other) const
112 {
113 return !operator == (other);
114 }
115
116 NXOPENCPP_USERDEFINEDTEMPLATEEXPORT value_type operator * () const;
118 iterator & operator ++()
119 {
120 next();
121 return *this;
122 }
123
124 iterator operator ++(int)
125 {
126 iterator tmp(*this);
127 ++*this;
128 return tmp;
129 }
130 private:
131 void copy(const iterator &other)
132 {
133 m_context = other.m_context;
134 m_current = other.m_current;
135 for (int i = 0; i < sizeof(m_state)/sizeof(m_state[0]); i++)
136 m_state[i] = other.m_state[i];
137 }
138 NXOPENCPP_USERDEFINEDTEMPLATEEXPORT void next();
140 tag_t m_current;
141 unsigned int m_state[8];
142 };
143
147 {
148 return iterator(this);
149 }
150
154 (
155 NXOpen::UserDefinedTemplate::Instantiation * userDefinedTemplateInstantiation
156 );
161 public: NX_DEPRECATED("在NX2007.0.0中已弃用。此方法无替代方案,不再使用或支持。") NXOpen::TaggedObject * FindObject
162 (
163 const NXString & journalIdentifier
164 );
170 (
171 const char * journalIdentifier
172 );
177 (
178 NXOpen::UserDefinedTemplate::Definition * userDefinedTemplateDefinition
179 );
184 (
185 const NXString & journalIdentifier
186 );
191 (
192 const char * journalIdentifier
193 );
198 (
199 const NXString & journalIdentifier
200 );
205 (
206 const char * journalIdentifier
207 );
212 (
213 const NXString & categoryAlias ,
214 const NXString & titleAlias ,
215 const NXString & value ,
216 const NXString & units ,
217 const NXString & type
218 );
223 (
224 const char * categoryAlias ,
225 const char * titleAlias ,
226 const char * value ,
227 const char * units ,
228 const char * type
229 );
233 public: void CreateRelation
234 (
235 NXOpen::TaggedObject * sourcePartTag
236 );
241 (
242 NXOpen::Features::Feature * udfFeatureTag
243 );
248 (
249 NXOpen::Features::Feature * flexFeatureTag
250 );
255 (
257 NXOpen::TaggedObject * definitionPartTag
258 );
259 }; //lint !e1712 default constructor not defined for class
260 }
261}
262#ifdef _MSC_VER
263#pragma warning(pop)
264#endif
265#ifdef __GNUC__
266#ifndef NX_NO_GCC_DEPRECATION_WARNINGS
267#pragma GCC diagnostic warning "-Wdeprecated-declarations"
268#endif
269#endif
270#undef EXPORTLIBRARY