NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
LineCollection.hxx
1//--------------------------------------------------------------------------
2// Copyright 2024 Siemens
3//--------------------------------------------------------------------------
4// C++接口对JA API的头文件
5//--------------------------------------------------------------------------
6//
7// 源文件:
8// LineCollection.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/SmartObject.hxx>
24#include <NXOpen/TaggedObject.hxx>
25#include <NXOpen/libnxopencpp_exports.hxx>
26#ifdef _MSC_VER
27#pragma warning(push)
28#pragma warning(disable:4996)
29#endif
30#ifdef __GNUC__
31#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
32#endif
33namespace NXOpen
34{
35 class LineCollection;
36 class BasePart;
37 class Line;
39 class LineCollectionImpl;
43 class NXOPENCPPEXPORT LineCollection : public NXOpen::TaggedObjectCollection
44 {
45 private: LineCollectionImpl * m_linecollection_impl;
46 private: NXOpen::BasePart* m_owner;
48 public: explicit LineCollection(NXOpen::BasePart *owner);
50 public:
52 tag_t Tag() const;
53 public: ~LineCollection();
55 //lint -sem(NXOpen::LineCollection::iterator::copy,initializer)
56 class iterator : public std::iterator<std::forward_iterator_tag, NXOpen::Line *>
57 {
58 public:
60 iterator() : m_context(nullptr), m_current(NULL_TAG)
61 {
62 // coverity[uninit_member]
63 } //lint !e1401 m_state未初始化
64
65 explicit iterator(NXOpen::LineCollection *context) : m_context(context), m_current(NULL_TAG)
66 {
67 // coverity[uninit_member]
68 }//lint !e1401 m_state未初始化
70
71 iterator(const iterator &other): m_context(nullptr), m_current(NULL_TAG)
72 {
73 copy(other);
74 }
75
76 iterator &operator =(const iterator &other)
77 {
78 if (&other != this)
79 copy(other);
80 return *this;
81 }
82
83 bool operator ==(const iterator &other) const
84 {
85 return m_current == other.m_current && m_context == other.m_context;
86 }
87
88 bool operator !=(const iterator &other) const
89 {
90 return !operator == (other);
91 }
92
93 NXOPENCPPEXPORT value_type operator * () const;
95 iterator & operator ++()
96 {
97 next();
98 return *this;
99 }
100
101 iterator operator ++(int)
102 {
103 iterator tmp(*this);
104 ++*this;
105 return tmp;
106 }
107 private:
108 void copy(const iterator &other)
109 {
110 m_context = other.m_context;
111 m_current = other.m_current;
112 for (int i = 0; i < sizeof(m_state)/sizeof(m_state[0]); i++)
113 m_state[i] = other.m_state[i];
114 }
115 NXOPENCPPEXPORT void next();
116 NXOpen::LineCollection *m_context;
117 tag_t m_current;
118 unsigned int m_state[8];
119 };
120
124 {
125 return iterator(this);
126 }
127
133 (
134 const NXString & journalIdentifier
135 );
142 (
143 const char * journalIdentifier
144 );
149 (
152 );
157 (
160 );
166 (
169 );
170 }; //lint !e1712 类未定义默认构造函数
171}
172#ifdef _MSC_VER
173#pragma warning(pop)
174#endif
175#ifdef __GNUC__
176#ifndef NX_NO_GCC_DEPRECATION_WARNINGS
177#pragma GCC diagnostic warning "-Wdeprecated-declarations"
178#endif
179#endif
180#undef EXPORTLIBRARY