NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
Annotations_PmiCollection.hxx
1//--------------------------------------------------------------------------
2// Copyright 2024 Siemens
3//--------------------------------------------------------------------------
4// C++接口到JA API的头文件
5//--------------------------------------------------------------------------
6//
7// 源文件:
8// Annotations_PmiCollection.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_annotations_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 Annotations
35 {
36 class PmiCollection;
37 }
38 namespace Annotations
39 {
40 class PmiManager;
41 }
42 namespace Annotations
43 {
44 class Pmi;
45 }
46 namespace Annotations
47 {
48 class PmiCollectionImpl;
52 class NXOPENCPP_ANNOTATIONSEXPORT PmiCollection : public NXOpen::TaggedObjectCollection
53 {
54 private: PmiCollectionImpl * m_pmicollection_impl;
55 private: NXOpen::Annotations::PmiManager* m_owner;
57 public: explicit PmiCollection(NXOpen::Annotations::PmiManager *owner);
59 public:
61 tag_t Tag() const;
62 public: ~PmiCollection();
64 //lint -sem(NXOpen::Annotations::PmiCollection::iterator::copy,initializer)
65 class iterator : public std::iterator<std::forward_iterator_tag, NXOpen::Annotations::Pmi *>
66 {
67 public:
69 iterator() : m_context(nullptr), m_current(NULL_TAG)
70 {
71 // coverity[uninit_member]
72 } //lint !e1401 m_state is not initialized
73
74 explicit iterator(NXOpen::Annotations::PmiCollection *context) : m_context(context), m_current(NULL_TAG)
75 {
76 // coverity[uninit_member]
77 }//lint !e1401 m_state is not initialized
79
80 iterator(const iterator &other): m_context(nullptr), m_current(NULL_TAG)
81 {
82 copy(other);
83 }
84
85 iterator &operator =(const iterator &other)
86 {
87 if (&other != this)
88 copy(other);
89 return *this;
90 }
91
92 bool operator ==(const iterator &other) const
93 {
94 return m_current == other.m_current && m_context == other.m_context;
95 }
96
97 bool operator !=(const iterator &other) const
98 {
99 return !operator == (other);
100 }
101
102 NXOPENCPP_ANNOTATIONSEXPORT value_type operator * () const;
104 iterator & operator ++()
105 {
106 next();
107 return *this;
108 }
109
110 iterator operator ++(int)
111 {
112 iterator tmp(*this);
113 ++*this;
114 return tmp;
115 }
116 private:
117 void copy(const iterator &other)
118 {
119 m_context = other.m_context;
120 m_current = other.m_current;
121 for (int i = 0; i < sizeof(m_state)/sizeof(m_state[0]); i++)
122 m_state[i] = other.m_state[i];
123 }
124 NXOPENCPP_ANNOTATIONSEXPORT void next();
126 tag_t m_current;
127 unsigned int m_state[8];
128 };
129
133 {
134 return iterator(this);
135 }
136
140 (
141 bool expand
142 );
143 }; //lint !e1712 default constructor not defined for class
144 }
145}
146#ifdef _MSC_VER
147#pragma warning(pop)
148#endif
149#ifdef __GNUC__
150#ifndef NX_NO_GCC_DEPRECATION_WARNINGS
151#pragma GCC diagnostic warning "-Wdeprecated-declarations"
152#endif
153#endif
154#undef EXPORTLIBRARY