NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
LayoutCollection.hxx
1//--------------------------------------------------------------------------
2// Copyright 2024 Siemens
3//--------------------------------------------------------------------------
4// C++接口的JA API头文件
5//--------------------------------------------------------------------------
6//
7// 源文件:
8// LayoutCollection.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/LayoutDefinition.hxx>
23#include <NXOpen/TaggedObjectCollection.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 LayoutCollection;
36 class BasePart;
37 class Layout;
38 class LayoutDefinition;
39 class View;
40 class LayoutCollectionImpl;
44 class NXOPENCPPEXPORT LayoutCollection : public NXOpen::TaggedObjectCollection
45 {
46 private: LayoutCollectionImpl * m_layoutcollection_impl;
47 private: NXOpen::BasePart* m_owner;
49 public: explicit LayoutCollection(NXOpen::BasePart *owner);
51 public:
53 tag_t Tag() const;
54 public: ~LayoutCollection();
56 //lint -sem(NXOpen::LayoutCollection::iterator::copy,initializer)
57 class iterator : public std::iterator<std::forward_iterator_tag, NXOpen::Layout *>
58 {
59 public:
61 iterator() : m_context(nullptr), m_current(NULL_TAG)
62 {
63 // coverity[uninit_member]
64 } //lint !e1401 m_state 未初始化
65
66 explicit iterator(NXOpen::LayoutCollection *context) : m_context(context), m_current(NULL_TAG)
67 {
68 // coverity[uninit_member]
69 }//lint !e1401 m_state 未初始化
71
72 iterator(const iterator &other): m_context(nullptr), m_current(NULL_TAG)
73 {
74 copy(other);
75 }
76
77 iterator &operator =(const iterator &other)
78 {
79 if (&other != this)
80 copy(other);
81 return *this;
82 }
83
84 bool operator ==(const iterator &other) const
85 {
86 return m_current == other.m_current && m_context == other.m_context;
87 }
88
89 bool operator !=(const iterator &other) const
90 {
91 return !operator == (other);
92 }
93
94 NXOPENCPPEXPORT value_type operator * () const;
96 iterator & operator ++()
97{
98 next();
99 return *this;
100 }
101
102 iterator operator ++(int)
103 {
104 iterator tmp(*this);
105 ++*this;
106 return tmp;
107 }
108 private:
109 void copy(const iterator &other)
110 {
111 m_context = other.m_context;
112 m_current = other.m_current;
113 for (int i = 0; i < sizeof(m_state)/sizeof(m_state[0]); i++)
114 m_state[i] = other.m_state[i];
115 }
116 NXOPENCPPEXPORT void next();
117 NXOpen::LayoutCollection *m_context;
118 tag_t m_current;
119 unsigned int m_state[8];
120 };
121
125 {
126 return iterator(this);
127 }
128
132 (
133 const NXString & name ,
134 NXOpen::LayoutDefinition * layoutArrangement ,
135 bool fitAllViews
136 );
141 (
142 const char * name ,
143 NXOpen::LayoutDefinition * layoutArrangement ,
144 bool fitAllViews
145 );
150 (
152 NXOpen::LayoutDefinition ** layoutArrangement
153 );
160 (
161 );
168 (
169 const NXString & journalIdentifier
170 );
177 (
178 const char * journalIdentifier
179 );
185 (
186 const NXString & leftViewName ,
187 const NXString & rightViewname ,
188 NXOpen::Layout ** layout ,
189 NXOpen::View ** leftView ,
190 NXOpen::View ** rightView
191 );
196 (
197 const char * leftViewName ,
198 const char * rightViewname ,
199 NXOpen::Layout ** layout ,
200 NXOpen::View ** leftView ,
201 NXOpen::View ** rightView
202 );
207 (
208 NXOpen::Layout * layout
209 );
213 public: void ChangeLayout
214 (
215 NXOpen::Layout * layout
216 );
221 (
222 NXOpen::Layout * layout ,
223 const NXString & leftViewName ,
224 const NXString & rightViewName
225 );
230 (
231 NXOpen::Layout * layout ,
232 const char * leftViewName ,
233 const char * rightViewName
234 );
239 (
240 NXOpen::Layout * layout ,
241 bool removeOldLayoutCache ,
242 bool ignoreNewLayoutCache
243 );
244 }; //lint !e1712 default constructor not defined for class
245}
246#ifdef _MSC_VER
247#pragma warning(pop)
248#endif
249#ifdef __GNUC__
250#ifndef NX_NO_GCC_DEPRECATION_WARNINGS
251#pragma GCC diagnostic warning "-Wdeprecated-declarations"
252#endif
253#endif
254#undef EXPORTLIBRARY