NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
BodyCollection.hxx
1//--------------------------------------------------------------------------
2// Copyright 2024 Siemens
3//--------------------------------------------------------------------------
4// C++接口到JA API的头文件
5//--------------------------------------------------------------------------
6//
7// 源文件:
8// BodyCollection.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_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 class BodyCollection;
35 class Part;
36 class Body;
39 class BodyCollectionImpl;
43 class NXOPENCPPEXPORT BodyCollection : public NXOpen::TaggedObjectCollection
44 {
45 private: BodyCollectionImpl * m_bodycollection_impl;
46 private: NXOpen::Part* m_owner;
48 public: explicit BodyCollection(NXOpen::Part *owner);
50 public:
52 tag_t Tag() const;
53 public: ~BodyCollection();
55 //lint -sem(NXOpen::BodyCollection::iterator::copy,initializer)
56 class iterator : public std::iterator<std::forward_iterator_tag, NXOpen::Body *>
57 {
58 public:
60 iterator() : m_context(nullptr), m_current(NULL_TAG)
61 {
62 // coverity[uninit_member]
63 } //lint !e1401 m_state is not initialized
64
65 explicit iterator(NXOpen::BodyCollection *context) : m_context(context), m_current(NULL_TAG)
66 {
67 // coverity[uninit_member]
68 }//lint !e1401 m_state is not initialized
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::BodyCollection *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 (
150 );
155 (
156 );
161 (
162 bool setColor
163 );
164 }; //lint !e1712 类未定义默认构造函数
165}
166#ifdef _MSC_VER
167#pragma warning(pop)
168#endif
169#ifdef __GNUC__
170#ifndef NX_NO_GCC_DEPRECATION_WARNINGS
171#pragma GCC diagnostic warning "-Wdeprecated-declarations"
172#endif
173#endif
174#undef EXPORTLIBRARY