NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
Routing_PortCollection.hxx
1//--------------------------------------------------------------------------
2// Copyright 2024 Siemens
3//--------------------------------------------------------------------------
4// C++接口头文件:JA API
5//--------------------------------------------------------------------------
6//
7// 源文件:
8// Routing_PortCollection.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 PortCollection;
37 }
38 namespace Routing
39 {
40 class RouteManager;
41 }
42 namespace Routing
43 {
44 class Port;
45 }
46 namespace Assemblies
47 {
48 class Component;
49 }
50 class Group;
51 class NXObject;
52 class Point;
53 namespace Routing
54 {
55 class ExtractPort;
56 }
57 namespace Routing
58 {
59 class PortCollectionImpl;
65 class NXOPENCPP_ROUTINGEXPORT PortCollection : public NXOpen::TaggedObjectCollection
66 {
67 private: PortCollectionImpl * m_portcollection_impl;
68 private: NXOpen::Routing::RouteManager* m_owner;
70 public: explicit PortCollection(NXOpen::Routing::RouteManager *owner);
72 public:
74 tag_t Tag() const;
75 public: ~PortCollection();
77 //lint -sem(NXOpen::Routing::PortCollection::iterator::copy,initializer)
78 class iterator : public std::iterator<std::forward_iterator_tag, NXOpen::Routing::Port *>
79 {
80 public:
82 iterator() : m_context(nullptr), m_current(NULL_TAG)
83 {
84 // coverity[uninit_member]
85 } //lint !e1401 m_state is not initialized
86
87 explicit iterator(NXOpen::Routing::PortCollection *context) : m_context(context), m_current(NULL_TAG)
88 {
89 // coverity[uninit_member]
90 }//lint !e1401 m_state is not initialized
92
93 iterator(const iterator &other): m_context(nullptr), m_current(NULL_TAG)
94{
95 copy(other);
96 }
97
98 iterator &operator =(const iterator &other)
99 {
100 if (&other != this)
101 copy(other);
102 return *this;
103 }
104
105 bool operator ==(const iterator &other) const
106 {
107 return m_current == other.m_current && m_context == other.m_context;
108 }
109
110 bool operator !=(const iterator &other) const
111 {
112 return !operator == (other);
113 }
114
115 NXOPENCPP_ROUTINGEXPORT value_type operator * () const;
117 iterator & operator ++()
118 {
119 next();
120 return *this;
121 }
122
123 iterator operator ++(int)
124 {
125 iterator tmp(*this);
126 ++*this;
127 return tmp;
128 }
129 private:
130 void copy(const iterator &other)
131 {
132 m_context = other.m_context;
133 m_current = other.m_current;
134 for (int i = 0; i < sizeof(m_state)/sizeof(m_state[0]); i++)
135 m_state[i] = other.m_state[i];
136 }
137 NXOPENCPP_ROUTINGEXPORT void next();
139 tag_t m_current;
140 unsigned int m_state[8];
141 };
142
146 {
147 return iterator(this);
148 }
149
154 (
156 );
162 (
163 NXOpen::Routing::Port * port ,
164 bool allowMultipleConnections
165 );
173 public: void ConvertToFeatures
174 (
175 );
179 public: std::vector<NXOpen::Routing::Port *> GetComponentPorts
180 (
182 );
192 public: std::vector<NXOpen::Routing::Port *> GetObjectPorts
193 (
194 NXOpen::NXObject * entity
195 );
200 (
201 );
208 (
209 NXOpen::Point * point
210 );
215 (
217 );
218 }; //lint !e1712 default constructor not defined for class
219 }
220}
221#ifdef _MSC_VER
222#pragma warning(pop)
223#endif
224#ifdef __GNUC__
225#ifndef NX_NO_GCC_DEPRECATION_WARNINGS
226#pragma GCC diagnostic warning "-Wdeprecated-declarations"
227#endif
228#endif
229#undef EXPORTLIBRARY