NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
Display_VisualMaterialCollection.hxx
1//--------------------------------------------------------------------------
2// Copyright 2024 Siemens
3//--------------------------------------------------------------------------
4// Header for C++ interface to JA API
5//--------------------------------------------------------------------------
6//
7// Source File:
8// Display_VisualMaterialCollection.ja
9//
10// Generated by:
11// apiwrap
12//
13// WARNING:
14// This file is automatically generated - do not edit by hand
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/Display_VisualMaterial.hxx>
23#include <NXOpen/TaggedObjectCollection.hxx>
24#include <NXOpen/TaggedObject.hxx>
25#include <NXOpen/libnxopencpp_display_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 namespace Display
36 {
38 }
39 class BasePart;
40 namespace Display
41 {
42 class VisualMaterial;
43 }
44 class NXObject;
45 namespace Display
46 {
47 class VisualMaterialCollectionImpl;
52 class NXOPENCPP_DISPLAYEXPORT VisualMaterialCollection : public NXOpen::TaggedObjectCollection
53 {
54 private: VisualMaterialCollectionImpl * m_visualmaterialcollection_impl;
55 private: NXOpen::BasePart* m_owner;
57 public: explicit VisualMaterialCollection(NXOpen::BasePart *owner);
59 public:
61 tag_t Tag() const;
64 //lint -sem(NXOpen::Display::VisualMaterialCollection::iterator::copy,initializer)
65 class iterator : public std::iterator<std::forward_iterator_tag, NXOpen::Display::VisualMaterial *>
66 {
67 public:
69 iterator() : m_context(nullptr), m_current(NULL_TAG)
70 {
71 // coverity[uninit_member]
72 } //lint !e1401 m_state 未初始化
73
74 explicit iterator(NXOpen::Display::VisualMaterialCollection *context) : m_context(context), m_current(NULL_TAG)
75 {
76 // coverity[uninit_member]
77 }//lint !e1401 m_state 未初始化
79
80 iterator(const iterator &other): m_context(nullptr), m_current(NULL_TAG)
81 {
82 copy(other);
83 }
84
85 iterator &operator =(const iterator &other)
86 {
87 if (&other != this)
88 copy(other);
89 return *this;
90 }
91
92 bool operator ==(const iterator &other) const
93 {
94 return m_current == other.m_current && m_context == other.m_context;
95 }
96
97 bool operator !=(const iterator &other) const
98 {
99 return !operator == (other);
100 }
101
102 NXOPENCPP_DISPLAYEXPORT value_type operator * () const;
104 iterator & operator ++()
105 {
106 next();
107 return *this;
108 }
109
110 iterator operator ++(int)
111 {
112 iterator tmp(*this);
113 ++*this;
114 return tmp;
115 }
116 private:
117 void copy(const iterator &other)
118 {
119 m_context = other.m_context;
120 m_current = other.m_current;
121 for (int i = 0; i < sizeof(m_state)/sizeof(m_state[0]); i++)
122 m_state[i] = other.m_state[i];
123 }
124 NXOPENCPP_DISPLAYEXPORT void next();
126 tag_t m_current;
127 unsigned int m_state[8];
128 };
129
133 {
134 return iterator(this);
135 }
136
139 public: void CreateMaterial
140 (
141 const NXString & materialName ,
143 NXString* newMaterialName
144 );
149 (
150 const char * materialName ,
152 NXString* newMaterialName
153 );
157 public: void AssignMaterial
158 (
159 NXOpen::Display::VisualMaterial * materialTag ,
160 const std::vector<NXOpen::NXObject *> & objects
161 );
165 public: void DeleteMaterial
166 (
168 );
173 public: void RemoveMaterial
174 (
175 const std::vector<NXOpen::NXObject *> & objects
176 );
181 (
182 std::vector<NXOpen::Display::VisualMaterial *> & materialTags ,
183 std::vector<NXString> & materialNames
184 );
189 (
191 std::vector<NXOpen::Display::VisualMaterial *> & materialTags ,
192 std::vector<NXString> & materialNames
193 );
198 (
199 const NXString & name
200 );
205 (
206 const char * name
207 );
212 (
213 bool skipAppearanceMat ,
214 NXOpen::Display::VisualMaterial ** materialTag ,
215 NXString* materialName
216 );
217 }; //lint !e1712 default constructor not defined for class
218 }
219}
220#ifdef _MSC_VER
221#pragma warning(pop)
222#endif
223#ifdef __GNUC__
224#ifndef NX_NO_GCC_DEPRECATION_WARNINGS
225#pragma GCC diagnostic warning "-Wdeprecated-declarations"
226#endif
227#endif
228#undef EXPORTLIBRARY