NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
Routing_StockCollection.hxx
1//--------------------------------------------------------------------------
2// Copyright 2024 Siemens
3//--------------------------------------------------------------------------
4// 管路库(Stock)集合的C++接口头文件
5//--------------------------------------------------------------------------
6//
7// 源文件:
8// Routing_StockCollection.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/Routing_CharacteristicList.hxx>
24#include <NXOpen/Routing_Stock.hxx>
25#include <NXOpen/TaggedObject.hxx>
26#include <NXOpen/libnxopencpp_routing_exports.hxx>
27#ifdef _MSC_VER
28#pragma warning(push)
29#pragma warning(disable:4996)
30#endif
31#ifdef __GNUC__
32#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
33#endif
34namespace NXOpen
35{
36 namespace Routing
37 {
38 class StockCollection;
39 }
40 namespace Routing
41 {
42 class RouteManager;
43 }
44 namespace Routing
45 {
46 class Stock;
47 }
48 namespace Assemblies
49 {
50 class Component;
51 }
52 class NXObject;
53 namespace Routing
54 {
55 class Anchor;
56 }
57 namespace Routing
58 {
60 }
61 namespace Routing
62 {
63 class CrossSection;
64 }
65 namespace Routing
66 {
67 class ISegment;
68 }
69 namespace Routing
70 {
71 class StockData;
72 }
73 namespace Routing
74 {
75 class StockCollectionImpl;
81 class NXOPENCPP_ROUTINGEXPORT StockCollection : public NXOpen::TaggedObjectCollection
82 {
83 private: StockCollectionImpl * m_stockcollection_impl;
84 private: NXOpen::Routing::RouteManager* m_owner;
86 public: explicit StockCollection(NXOpen::Routing::RouteManager *owner);
88 public:
90 tag_t Tag() const;
91 public: ~StockCollection();
93 //lint -sem(NXOpen::Routing::StockCollection::iterator::copy,initializer)
94 class iterator : public std::iterator<std::forward_iterator_tag, NXOpen::Routing::Stock *>
95 {
96 public:
98 iterator() : m_context(nullptr), m_current(NULL_TAG)
99{
100 // coverity[uninit_member]
101 } //lint !e1401 m_state is not initialized
102
103 explicit iterator(NXOpen::Routing::StockCollection *context) : m_context(context), m_current(NULL_TAG)
104 {
105 // coverity[uninit_member]
106 }//lint !e1401 m_state is not initialized
108
109 iterator(const iterator &other): m_context(nullptr), m_current(NULL_TAG)
110 {
111 copy(other);
112 }
113
114 iterator &operator =(const iterator &other)
115 {
116 if (&other != this)
117 copy(other);
118 return *this;
119 }
120
121 bool operator ==(const iterator &other) const
122 {
123 return m_current == other.m_current && m_context == other.m_context;
124 }
125
126 bool operator !=(const iterator &other) const
127 {
128 return !operator == (other);
129 }
130
131 NXOPENCPP_ROUTINGEXPORT value_type operator * () const;
133 iterator & operator ++()
134 {
135 next();
136 return *this;
137 }
138
139 iterator operator ++(int)
140 {
141 iterator tmp(*this);
142 ++*this;
143 return tmp;
144 }
145 private:
146 void copy(const iterator &other)
147 {
148 m_context = other.m_context;
149 m_current = other.m_current;
150 for (int i = 0; i < sizeof(m_state)/sizeof(m_state[0]); i++)
151 m_state[i] = other.m_state[i];
152 }
153 NXOPENCPP_ROUTINGEXPORT void next();
155 tag_t m_current;
156 unsigned int m_state[8];
157 };
158
162 {
163 return iterator(this);
164 }
165
168 public: std::vector<NXOpen::Routing::Stock *> CreateStock
169 (
170 NXOpen::Routing::StockData * stockData ,
171 NXOpen::Routing::Anchor * anchor ,
172 NXOpen::Routing::CrossSection * crossSection ,
173 const std::vector<NXOpen::Routing::ISegment *> & segments
174 );
180 (
182 );
188 (
189 bool convertSpaceReservartion ,
192 );
196 public: void AddStock
197 (
202 const std::vector<NXOpen::Routing::ISegment *> & segments ,
203 const NXString & routeLevel
204 );
209 (
214 const std::vector<NXOpen::Routing::ISegment *> & segments ,
215 const char * routeLevel
216 );
220 public: void AddStock
221 (
226 const std::vector<NXOpen::Routing::ISegment *> & segments ,
227 const NXString & routeLevel ,
228 std::vector<NXOpen::Routing::Stock *> & stocks
229 );
234 (
239 const std::vector<NXOpen::Routing::ISegment *> & segments ,
240 const char * routeLevel ,
241 std::vector<NXOpen::Routing::Stock *> & stocks
242 );
246 public: void AddStock
247 (
252 const std::vector<NXOpen::Routing::ISegment *> & segments ,
253 const NXString & routeLevel ,
254 bool isSpaceReservation ,
255 std::vector<NXOpen::Routing::Stock *> & stocks
256 );
261 (
266 const std::vector<NXOpen::Routing::ISegment *> & segments ,
267 const char * routeLevel ,
268 bool isSpaceReservation ,
269 std::vector<NXOpen::Routing::Stock *> & stocks
270 );
274 public: void AddStock
275 (
280 const std::vector<NXOpen::Routing::ISegment *> & segments ,
281 const NXString & routeLevel ,
282 bool isSpaceReservation ,
283 const NXString & anchorName ,
284 std::vector<NXOpen::Routing::Stock *> & stocks
285 );
290 (
294 const std::vector<NXOpen::Routing::ISegment *> & segments ,
295 const char * routeLevel ,
296 bool isSpaceReservation ,
297 const char * anchorName ,
298 std::vector<NXOpen::Routing::Stock *> & stocks
299 );
303 public: void RemoveStock
304 (
305 const std::vector<NXOpen::Routing::ISegment *> & segments
306 );
311 (
312 const std::vector<NXOpen::Routing::ISegment *> & segments
313 );
318 (
319 const std::vector<NXOpen::Routing::ISegment *> & segments
320 );
325 (
327 );
332 (
333 NXOpen::NXObject * object
334 );
339 (
340 );
345 (
346 NXOpen::NXObject * object
347 );
348 }; //lint !e1712 default constructor not defined for class
349 }
350}
351#ifdef _MSC_VER
352#pragma warning(pop)
353#endif
354#ifdef __GNUC__
355#ifndef NX_NO_GCC_DEPRECATION_WARNINGS
356#pragma GCC diagnostic warning "-Wdeprecated-declarations"
357#endif
358#endif
359#undef EXPORTLIBRARY