NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
Routing_ArcSegmentCollection.hxx
1//--------------------------------------------------------------------------
2// Copyright 2024 Siemens
3//--------------------------------------------------------------------------
4// JA API的C++接口头文件
5//--------------------------------------------------------------------------
6//
7// 源文件:
8// Routing_ArcSegmentCollection.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_routing_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 Routing
35 {
37 }
38 namespace Routing
39 {
40 class SegmentManager;
41 }
42 namespace Routing
43 {
44 class ArcSegment;
45 }
46 namespace Routing
47 {
48 class ArcSegmentCollectionImpl;
53 class NXOPENCPP_ROUTINGEXPORT ArcSegmentCollection : public NXOpen::TaggedObjectCollection
54 {
55 private: ArcSegmentCollectionImpl * m_arcsegmentcollection_impl;
56 private: NXOpen::Routing::SegmentManager* m_owner;
60 public:
62 tag_t Tag() const;
63 public: ~ArcSegmentCollection();
65 //lint -sem(NXOpen::Routing::ArcSegmentCollection::iterator::copy,initializer)
66 class iterator : public std::iterator<std::forward_iterator_tag, NXOpen::Routing::ArcSegment *>
67 {
68 public:
70 iterator() : m_context(nullptr), m_current(NULL_TAG)
71 {
72 // coverity[uninit_member]
73 } //lint !e1401 m_state未初始化
74
75 explicit iterator(NXOpen::Routing::ArcSegmentCollection *context) : m_context(context), m_current(NULL_TAG)
76 {
77 // coverity[uninit_member]
78 }//lint !e1401 m_state未初始化
80
81 iterator(const iterator &other): m_context(nullptr), m_current(NULL_TAG)
82 {
83 copy(other);
84 }
85
86 iterator &operator =(const iterator &other)
87 {
88 if (&other != this)
89 copy(other);
90 return *this;
91 }
92
93 bool operator ==(const iterator &other) const
94 {
95 return m_current == other.m_current && m_context == other.m_context;
96 }
97
98 bool operator !=(const iterator &other) const
99 {
100 return !operator == (other);
101 }
102
103 NXOPENCPP_ROUTINGEXPORT value_type operator * () const;
105 iterator & operator ++()
106 {
107 next();
108 return *this;
109 }
110
111 iterator operator ++(int)
112 {
113 iterator tmp(*this);
114 ++*this;
115 return tmp;
116 }
117 private:
118 void copy(const iterator &other)
119 {
120 m_context = other.m_context;
121 m_current = other.m_current;
122 for (int i = 0; i < sizeof(m_state)/sizeof(m_state[0]); i++)
123 m_state[i] = other.m_state[i];
124 }
125 NXOPENCPP_ROUTINGEXPORT void next();
127 tag_t m_current;
128 unsigned int m_state[8];
129 };
130
134 {
135 return iterator(this);
136 }
137 }; //lint !e1712 类未定义默认构造函数
138 }
139}
140#ifdef _MSC_VER
141#pragma warning(pop)
142#endif
143#ifdef __GNUC__
144#ifndef NX_NO_GCC_DEPRECATION_WARNINGS
145#pragma GCC diagnostic warning "-Wdeprecated-declarations"
146#endif
147#endif
148#undef EXPORTLIBRARY