NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
ValidationCollection.hxx
1//--------------------------------------------------------------------------
2// Copyright 2024 Siemens
3//--------------------------------------------------------------------------
4// C++接口到JA API的头文件
5//--------------------------------------------------------------------------
6//
7// 源文件:
8// ValidationCollection.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/Validation.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{
36 class BasePart;
37 class Validation;
38 class NXObject;
39 class ValidationCollectionImpl;
46 {
47 private: ValidationCollectionImpl * m_validationcollection_impl;
48 private: NXOpen::BasePart* m_owner;
50 public: explicit ValidationCollection(NXOpen::BasePart *owner);
52 public:
54 tag_t Tag() const;
55 public: ~ValidationCollection();
57 //lint -sem(NXOpen::ValidationCollection::iterator::copy,initializer)
58 class iterator : public std::iterator<std::forward_iterator_tag, NXOpen::Validation *>
59 {
60 public:
62 iterator() : m_context(nullptr), m_current(NULL_TAG)
63 {
64 // coverity[uninit_member]
65 } //lint !e1401 m_state 未初始化
66
67 explicit iterator(NXOpen::ValidationCollection *context) : m_context(context), m_current(NULL_TAG)
68 {
69 // coverity[uninit_member]
70 }//lint !e1401 m_state 未初始化
72
73 iterator(const iterator &other): m_context(nullptr), m_current(NULL_TAG)
74 {
75 copy(other);
76 }
77
78 iterator &operator =(const iterator &other)
79 {
80 if (&other != this)
81 copy(other);
82 return *this;
83 }
84
85 bool operator ==(const iterator &other) const
86 {
87 return m_current == other.m_current && m_context == other.m_context;
88 }
89
90 bool operator !=(const iterator &other) const
91 {
92 return !operator == (other);
93 }
94
95 NXOPENCPPEXPORT value_type operator * () const;
97 iterator & operator ++()
98 {
99 next();
100 return *this;
101 }
102
103 iterator operator ++(int)
104 {
105 iterator tmp(*this);
106 ++*this;
107 return tmp;
108 }
109 private:
110 void copy(const iterator &other)
111 {
112 m_context = other.m_context;
113 m_current = other.m_current;
114 for (int i = 0; i < sizeof(m_state)/sizeof(m_state[0]); i++)
115 m_state[i] = other.m_state[i];
116 }
117 NXOPENCPPEXPORT void next();
119 tag_t m_current;
120 unsigned int m_state[8];
121 };
122
126 {
127 return iterator(this);
128 }
129
133 (
134 const NXString & source ,
136 );
141 (
142 const char * source ,
144 );
149 public: NX_DEPRECATED("在NX8.5.0中已过时。 请使用 NXOpen::Validate::RequirementCollection::RevisionRule 替代。") NXString GetRevisionRule
150 (
151 );
156 public: NX_DEPRECATED("在NX8.5.0中已过时。 请使用 NXOpen::Validate::RequirementCollection::SetRevisionRule 替代。") void SetRevisionRule
157 (
158 const NXString & rule
159 );
165 (
166 const char * rule
167 );
168 }; //lint !e1712 类未定义默认构造函数
169}
170#ifdef _MSC_VER
171#pragma warning(pop)
172#endif
173#ifdef __GNUC__
174#ifndef NX_NO_GCC_DEPRECATION_WARNINGS
175#pragma GCC diagnostic warning "-Wdeprecated-declarations"
176#endif
177#endif
178#undef EXPORTLIBRARY