NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
Document_ContextObjectCollection.hxx
1//--------------------------------------------------------------------------
2// Copyright 2024 Siemens
3//--------------------------------------------------------------------------
4// C++接口文档的JA API头文件
5//--------------------------------------------------------------------------
6//
7// 源文件:
8// Document_ContextObjectCollection.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/libdocumentopencpp_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 Document
35 {
37 }
38 namespace Document
39 {
40 class DocumentPart;
41 }
42 namespace Document
43 {
44 class ContextObject;
45 }
46 class NXObject;
47 namespace Document
48 {
49 class ContextObjectCollectionImpl;
54 class DOCUMENTOPENCPPEXPORT ContextObjectCollection : public NXOpen::TaggedObjectCollection
55 {
56 private: ContextObjectCollectionImpl * m_contextobjectcollection_impl;
57 private: NXOpen::Document::DocumentPart* m_owner;
61 public:
63 tag_t Tag() const;
66 //lint -sem(NXOpen::Document::ContextObjectCollection::iterator::copy,initializer)
67 class iterator : public std::iterator<std::forward_iterator_tag, NXOpen::Document::ContextObject *>
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::Document::ContextObjectCollection *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 DOCUMENTOPENCPPEXPORT 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 DOCUMENTOPENCPPEXPORT void next();
128 tag_t m_current;
129 unsigned int m_state[8];
130 };
131
135 {
136 return iterator(this);
137 }
138
143 (
144 const NXString & journalIdentifier
145 );
151 (
152 const char * journalIdentifier
153 );
158 (
159 const NXString & uniqueKey
160 );
165 (
166 const char * uniqueKey
167 );
172 (
173 NXOpen::NXObject * applicationObject ,
175 );
180 (
181 NXOpen::Document::ContextObject * contextObject
182 );
183 }; //lint !e1712 类未定义默认构造函数
184 }
185}
186#ifdef _MSC_VER
187#pragma warning(pop)
188#endif
189#ifdef __GNUC__
190#ifndef NX_NO_GCC_DEPRECATION_WARNINGS
191#pragma GCC diagnostic warning "-Wdeprecated-declarations"
192#endif
193#endif
194#undef EXPORTLIBRARY