NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
Document_LineCollection.hxx
1//--------------------------------------------------------------------------
2// Copyright 2024 Siemens
3//--------------------------------------------------------------------------
4// C++接口的JA API头文件
5//--------------------------------------------------------------------------
6//
7// 源文件:
8// Document_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/Document_Line.hxx>
23#include <NXOpen/Document_LineBuilder.hxx>
24#include <NXOpen/Document_Page.hxx>
25#include <NXOpen/TaggedObjectCollection.hxx>
26#include <NXOpen/TaggedObject.hxx>
27#include <NXOpen/libdocumentopencpp_exports.hxx>
28#ifdef _MSC_VER
29#pragma warning(push)
30#pragma warning(disable:4996)
31#endif
32#ifdef __GNUC__
33#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
34#endif
35namespace NXOpen
36{
37 namespace Document
38 {
39 class LineCollection;
40 }
41 namespace Document
42 {
43 class DocumentPart;
44 }
45 namespace Document
46 {
47 class Line;
48 }
49 namespace Document
50 {
51 class LineBuilder;
52 }
53 namespace Document
54 {
55 class Page;
56 }
57 namespace Document
58 {
59 class LineCollectionImpl;
64 class DOCUMENTOPENCPPEXPORT LineCollection : public NXOpen::TaggedObjectCollection
65 {
66 private: LineCollectionImpl * m_linecollection_impl;
67 private: NXOpen::Document::DocumentPart* m_owner;
69 public: explicit LineCollection(NXOpen::Document::DocumentPart *owner);
71 public:
73 tag_t Tag() const;
74 public: ~LineCollection();
76 //lint -sem(NXOpen::Document::LineCollection::iterator::copy,initializer)
77 class iterator : public std::iterator<std::forward_iterator_tag, NXOpen::Document::Line *>
78 {
79 public:
81 iterator() : m_context(nullptr), m_current(NULL_TAG)
82 {
83 // coverity[uninit_member]
84 } //lint !e1401 m_state 未初始化
85
86 explicit iterator(NXOpen::Document::LineCollection *context) : m_context(context), m_current(NULL_TAG)
87 {
88 // coverity[uninit_member]
89 }//lint !e1401 m_state 未初始化
91
92 iterator(const iterator &other): m_context(nullptr), m_current(NULL_TAG)
93 {
94 copy(other);
95 }
96
97 iterator &operator =(const iterator &other)
98 {
99 if (&other != this)
100 copy(other);
101 return *this;
102 }
103
104 bool operator ==(const iterator &other) const
105 {
106 return m_current == other.m_current && m_context == other.m_context;
107 }
108
109 bool operator !=(const iterator &other) const
110 {
111 return !operator == (other);
112 }
113
114 DOCUMENTOPENCPPEXPORT value_type operator * () const;
116 iterator & operator ++()
117 {
118 next();
119 return *this;
120 }
121
122 iterator operator ++(int)
123 {
124 iterator tmp(*this);
125 ++*this;
126 return tmp;
127 }
128 private:
129 void copy(const iterator &other)
130 {
131 m_context = other.m_context;
132 m_current = other.m_current;
133 for (int i = 0; i < sizeof(m_state)/sizeof(m_state[0]); i++)
134 m_state[i] = other.m_state[i];
135 }
136 DOCUMENTOPENCPPEXPORT void next();
138 tag_t m_current;
139 unsigned int m_state[8];
140 };
141
145 {
146 return iterator(this);
147 }
148
153 (
154 const NXString & journalIdentifier
155 );
161 (
162 const char * journalIdentifier
163 );
168 (
171 );
172 }; //lint !e1712 类未定义默认构造函数
173 }
174}
175#ifdef _MSC_VER
176#pragma warning(pop)
177#endif
178#ifdef __GNUC__
179#ifndef NX_NO_GCC_DEPRECATION_WARNINGS
180#pragma GCC diagnostic warning "-Wdeprecated-declarations"
181#endif
182#endif
183#undef EXPORTLIBRARY