NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
Routing_WireCollection.hxx
1//--------------------------------------------------------------------------
2// Copyright 2024 Siemens
3//--------------------------------------------------------------------------
4// 用于JA API的C++接口头文件
5//--------------------------------------------------------------------------
6//
7// 源文件:
8// Routing_WireCollection.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 {
36 class WireCollection;
37 }
38 namespace Routing
39 {
40 class RouteManager;
41 }
42 namespace Routing
43 {
44 class Wire;
45 }
46 namespace Routing
47 {
48 class ControlPoint;
49 }
50 namespace Routing
51 {
52 class ISegment;
53 }
54 namespace Routing
55 {
56 class Stock;
57 }
58 namespace Routing
59 {
60 class StockData;
61 }
62 namespace Routing
63 {
64 class WireCollectionImpl;
69 class NXOPENCPP_ROUTINGEXPORT WireCollection : public NXOpen::TaggedObjectCollection
70 {
71 private: WireCollectionImpl * m_wirecollection_impl;
72 private: NXOpen::Routing::RouteManager* m_owner;
74 public: explicit WireCollection(NXOpen::Routing::RouteManager *owner);
76 public:
78 tag_t Tag() const;
79 public: ~WireCollection();
81 //lint -sem(NXOpen::Routing::WireCollection::iterator::copy,initializer)
82 class iterator : public std::iterator<std::forward_iterator_tag, NXOpen::Routing::Wire *>
83 {
84 public:
86 iterator() : m_context(nullptr), m_current(NULL_TAG)
87 {
88 // coverity[uninit_member]
89 } //lint !e1401 m_state未初始化
90
91 explicit iterator(NXOpen::Routing::WireCollection *context) : m_context(context), m_current(NULL_TAG)
92 {
93 // coverity[uninit_member]
94 }//lint !e1401 m_state未初始化
96
97 iterator(const iterator &other): m_context(nullptr), m_current(NULL_TAG)
98 {
99 copy(other);
100 }
101
102 iterator &operator =(const iterator &other)
103 {
104 if (&other != this)
105 copy(other);
106 return *this;
107 }
108
109 bool operator ==(const iterator &other) const
110 {
111 return m_current == other.m_current && m_context == other.m_context;
112 }
113
114 bool operator !=(const iterator &other) const
115 {
116 return !operator == (other);
117 }
118
119 NXOPENCPP_ROUTINGEXPORT value_type operator * () const;
121 iterator & operator ++()
122 {
123 next();
124 return *this;
125 }
126
127 iterator operator ++(int)
128 {
129 iterator tmp(*this);
130 ++*this;
131 return tmp;
132 }
133 private:
134 void copy(const iterator &other)
135 {
136 m_context = other.m_context;
137 m_current = other.m_current;
138 for (int i = 0; i < sizeof(m_state)/sizeof(m_state[0]); i++)
139 m_state[i] = other.m_state[i];
140 }
141 NXOPENCPP_ROUTINGEXPORT void next();
143 tag_t m_current;
144 unsigned int m_state[8];
145 };
146
150 {
151 return iterator(this);
152 }
153
157 (
158 NXOpen::Routing::ControlPoint * startControlPoint ,
159 NXOpen::Routing::ControlPoint * endControlPoint ,
160 const std::vector<NXOpen::Routing::ISegment *> & segments ,
161 NXOpen::Routing::StockData * stockData ,
162 const std::vector<NXOpen::Routing::Stock *> & stocks ,
164 double lengthOfWire
165 );
166 }; //lint !e1712 类未定义默认构造函数
167 }
168}
169#ifdef _MSC_VER
170#pragma warning(pop)
171#endif
172#ifdef __GNUC__
173#ifndef NX_NO_GCC_DEPRECATION_WARNINGS
174#pragma GCC diagnostic warning "-Wdeprecated-declarations"
175#endif
176#endif
177#undef EXPORTLIBRARY