NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
PartCollection.hxx
1//--------------------------------------------------------------------------
2// Copyright 2024 Siemens
3//--------------------------------------------------------------------------
4// JA API的C++接口头文件
5//--------------------------------------------------------------------------
6//
7// 源文件:
8// PartCollection.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/BasePart.hxx>
23#include <NXOpen/CloudDM_NewPartBuilder.hxx>
24#include <NXOpen/Gateway_GenericFileNewBuilder.hxx>
25#include <NXOpen/LinkedMirrorPartBuilder.hxx>
26#include <NXOpen/TaggedObjectCollection.hxx>
27#include <NXOpen/Part.hxx>
28#include <NXOpen/PartCloseResponses.hxx>
29#include <NXOpen/PartLoadStatus.hxx>
30#include <NXOpen/PartReopenReport.hxx>
31#include <NXOpen/PartSaveStatus.hxx>
32#include <NXOpen/PartTypes.hxx>
33#include <NXOpen/TaggedObject.hxx>
34#include <NXOpen/ugmath.hxx>
35#include <NXOpen/libnxopencpp_exports.hxx>
36#ifdef _MSC_VER
37#pragma warning(push)
38#pragma warning(disable:4996)
39#endif
40#ifdef __GNUC__
41#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
42#endif
43namespace NXOpen
44{
45 class PartCollection;
46 class Session;
47 class BasePart;
48 namespace Assemblies
49 {
50 class Component;
51 }
52 namespace CloudDM
53 {
54 class NewPartBuilder;
55 }
56 class FileNew;
57 namespace Gateway
58 {
60 }
62 class LoadOptions;
63 namespace PDM
64 {
65 class PartManager;
66 }
67 class Part;
69 class PartLoadStatus;
70 class PartReopenReport;
71 class PartSaveStatus;
72 class SaveOptions;
73 namespace ShapeSearch
74 {
75 class SearchManager;
76 }
77 class PartCollectionImpl;
99 class NXOPENCPPEXPORT PartCollection : public NXOpen::TaggedObjectCollection
100 {
113
121
127
134 public:
138 public:
143 public:
147 public:
151 public:
157 public:
161 public:
165 public:
180
190 private: PartCollectionImpl * m_partcollection_impl;
191 private: NXOpen::Session* m_owner;
193 public: explicit PartCollection(NXOpen::Session *owner);
195 public:
197 tag_t Tag() const;
198 public: ~PartCollection();
200 //lint -sem(NXOpen::PartCollection::iterator::copy,initializer)
201 class iterator : public std::iterator<std::forward_iterator_tag, NXOpen::BasePart *>
202 {
203 public:
205 iterator() : m_context(nullptr), m_current(NULL_TAG)
206 {
207 // coverity[uninit_member]
208 } //lint !e1401 m_state is not initialized
209
210 explicit iterator(NXOpen::PartCollection *context) : m_context(context), m_current(NULL_TAG)
211 {
212 // coverity[uninit_member]
213 }//lint !e1401 m_state is not initialized
215
216 iterator(const iterator &other): m_context(nullptr), m_current(NULL_TAG)
217 {
218 copy(other);
219 }
220
221 iterator &operator =(const iterator &other)
222 {
223 if (&other != this)
224 copy(other);
225 return *this;
226 }
227
228 bool operator ==(const iterator &other) const
229 {
230 return m_current == other.m_current && m_context == other.m_context;
231 }
232
233 bool operator !=(const iterator &other) const
234 {
235 return !operator == (other);
236 }
237
238 NXOPENCPPEXPORT value_type operator * () const;
240 iterator & operator ++()
241{
242 next();
243 return *this;
244 }
245
246 iterator operator ++(int)
247 {
248 iterator tmp(*this);
249 ++*this;
250 return tmp;
251 }
252 private:
253 void copy(const iterator &other)
254 {
255 m_context = other.m_context;
256 m_current = other.m_current;
257 for (int i = 0; i < sizeof(m_state)/sizeof(m_state[0]); i++)
258 m_state[i] = other.m_state[i];
259 }
260 NXOPENCPPEXPORT void next();
261 NXOpen::PartCollection *m_context;
262 tag_t m_current;
263 unsigned int m_state[8];
264 };
265
269 {
270 return iterator(this);
271 }
272
279 (
280 const NXString & name
281 );
289 (
290 const char * name
291 );
301 (
302 const NXString & name ,
304 );
314 (
315 const char * name ,
317 );
322 (
323 const NXString & name ,
325 );
330 (
331 const char * name ,
333 );
338 (
339 const NXString & name ,
341 );
346 (
347 const char * name ,
349 );
360 (
361 const NXString & filename ,
362 NXOpen::PartLoadStatus ** loadStatus
363 );
374 (
375 const char * filename ,
376 NXOpen::PartLoadStatus ** loadStatus
377 );
387 (
388 const NXString & filename ,
389 NXOpen::PartLoadStatus ** loadStatus
390 );
400 (
401 const char * filename ,
402 NXOpen::PartLoadStatus ** loadStatus
403 );
429 (
430 const NXString & filename ,
431 NXOpen::PartLoadStatus ** loadStatus
432 );
458 (
459 const char * filename ,
460 NXOpen::PartLoadStatus ** loadStatus
461 );
469 (
470 const NXString & filename ,
471 NXOpen::DisplayPartOption displayPartOption ,
472 NXOpen::PartLoadStatus ** loadStatus
473 );
481 (
482 const char * filename ,
483 NXOpen::DisplayPartOption displayPartOption ,
484 NXOpen::PartLoadStatus ** loadStatus
485 );
520 (
521 const NXString & filename ,
522 NXOpen::PartLoadStatus ** loadStatus
523 );
559 (
560 const char * filename ,
561 NXOpen::PartLoadStatus ** loadStatus
562 );
566 public: void SaveAll
567 (
568 bool* anyPartsModified ,
569 NXOpen::PartSaveStatus ** saveStatus
570 );
574 public: void CloseAll
575 (
576 NXOpen::BasePart::CloseModified closeModified ,
577 NXOpen::PartCloseResponses * responses
582 );
587 (
588 NXOpen::BasePart::CloseModified closeModified ,
589 NXOpen::PartCloseResponses * responses
594 );
601 (
602 );
608 (
609 );
614 (
615 );
620 (
621 );
633 public: std::vector<NXOpen::BasePart *> GetDisplayedParts
634 (
635 );
640 public: void SetWork
641 (
642 NXOpen::BasePart * part
643 );
649 (
650 );
657 public: void SetWorkComponent
658 (
659 NXOpen::Assemblies::Component * workComponent ,
662 NXOpen::PartLoadStatus ** loadStatus
663 );
667 public: void SetWorkComponent
668 (
669 NXOpen::Assemblies::Component * workComponent ,
674 NXOpen::PartLoadStatus ** loadStatus
675 );
682 (
683 NXOpen::Assemblies::Component * workComponent
685 );
693 (
694 NXOpen::BasePart * part ,
695 bool maintainWorkPart ,
696 bool setEntirePart ,
697 NXOpen::PartLoadStatus ** loadStatus
698 );
708 (
709 NXOpen::BasePart * part ,
710 NXOpen::DisplayPartOption displayPartOption ,
712 NXOpen::PartLoadStatus ** loadStatus
713 );
722 (
723 NXOpen::BasePart * part ,
724 NXOpen::DisplayPartOption displayPartOption ,
726 NXOpen::PartLoadStatus ** loadStatus
727 );
732 (
733 );
738 (
739 );
744 (
746 );
751 (
752 int id
753 );
759 (
761 );
766 (
767 int id
768 );
773 (
775 );
780 (
781 int id
782 );
787 (
789 );
794 (
795 int id
796 );
801 (
803 );
808 (
809 int id
810 );
815 (
817 );
822 (
823 int id
824 );
829 (
831 );
836 (
837 int id
838 );
843 (
845 );
850 (
851 int id
852 );
857 (
858 );
863 (
864 const NXString & filename ,
865 const NXString & templateName ,
866 bool addMaster
867 );
872 (
873 const char * filename ,
874 const char * templateName ,
875 bool addMaster
876 );
881 (
882 const NXString & filename ,
883 bool addMaster
884 );
889 (
890 const char * filename ,
891 bool addMaster
892 );
897 (
898 const NXString & filename
899 );
904 (
905 const char * filename
906 );
912 (
913 NXOpen::Part * part
914 );
918 public: bool IsMirroredPart
919 (
920 NXOpen::Part * part
921 );
926 (
927 NXOpen::Part * part
928 );
932 public: void SetMirrorPartType
933 (
934 NXOpen::Part * part ,
936 );
941 (
942 NXOpen::Part * part
943 );
948 (
949 NXOpen::Part * mirrorPart
950 );
955 public: NX_DEPRECATED("Deprecated in NX11.0.0. Use overloaded SetPassword instead.") void SetPassword
956 (
957 NXOpen::Part * part ,
958 const NXString & uAdminPassword ,
959 const NXString & uReadPassword ,
960 const NXString & uWritePassword ,
961 const NXString & uFullControlPassword
962 );
968 (
969 NXOpen::Part * part ,
970 const char * uAdminPassword ,
971 const char * uReadPassword ,
972 const char * uWritePassword ,
973 const char * uFullControlPassword
974 );
979 public: NX_DEPRECATED("Deprecated in NX11.0.0. Use overloaded RemovePassword instead.") void RemovePassword
980 (
981 NXOpen::Part * part
982 );
986 public: void SetOpenPassword
987 (
988 const NXString & fileName ,
989 const NXString & password
990 );
995 (
996 const char * fileName ,
997 const char * password
998 );
1003 (
1004 const NXString & filename ,
1005 const NXString & outputDirectory ,
1006 NXOpen::PartLoadStatus ** loadStatus ,
1007 NXOpen::PartSaveStatus ** saveStatus
1008 );
1013 (
1014 const char * filename ,
1015 const char * outputDirectory ,
1016 NXOpen::PartLoadStatus ** loadStatus ,
1017 NXOpen::PartSaveStatus ** saveStatus
1018 );
1023 (
1024 NXOpen::Part * part
1025 );
1030 (
1031 NXOpen::Part * part ,
1032 NXOpen::Point3d* mirrorPlaneOrigin ,
1033 NXOpen::Vector3d* mirrorPlaneDirection
1034 );
1040 (
1041 );
1046 public: NX_DEPRECATED("Deprecated in NX12.0.0. A direct call to refresh the part navigator should not be needed.") void RefreshPartNavigator
1047 (
1048 );
1052 public: NXOpen::Gateway::GenericFileNewBuilder * CreateGenericFileNewBuilder
1053 (
1054 );
1058 public: void OpenPasswordSafe
1059 (
1060 const NXString & fileName ,
1061 const NXString & password
1062 );
1067 (
1068 const char * fileName ,
1069 const char * password
1070 );
1075 (
1076 );
1081 public: void SetPassword
1082 (
1083 NXOpen::Part * part ,
1084 const NXString & adminPassword ,
1085 const NXString & readPassword ,
1086 const NXString & writePassword ,
1087 const NXString & fullControlPassword ,
1089 );
1095 (
1096 NXOpen::Part * part ,
1097 const char * adminPassword ,
1098 const char * readPassword ,
1099 const char * writePassword ,
1100 const char * fullControlPassword ,
1102 );
1106 public: void RemovePassword
1107 (
1108 NXOpen::Part * part ,
1110 );
1115 (
1116 );
1128 (
1129 bool additionalPartsDisplayed
1130 );
1137 (
1138 const std::vector<NXOpen::BasePart *> & parts ,
1139 bool includeChildren
1141 );
1147 (
1148 const std::vector<NXOpen::BasePart *> & parts ,
1149 bool includeChildren
1151 );
1156 (
1157 const NXString & fileName
1158 );
1163 (
1164 const char * fileName
1165 );
1167
1170 public: NXOpen::CloudDM::NewPartBuilder * CreateCloudDMNewPartBuilder
1171 (
1172 );
1175
1178 public: NXOpen::PartCollection::DesignWorksetIntentType IntentForWorksetWithoutNxDataset
1179 (
1180 );
1183
1186 public: void SetIntentForWorksetWithoutNxDataset
1187 (
1189 );
1191
1202 public: NXOpen::PDM::PartManager *PDMPartManager();
1206 public: NXOpen::ShapeSearch::SearchManager *ShapeSearchManager();
1207 }; //lint !e1712 default constructor not defined for class
1208}
1209#ifdef _MSC_VER
1210#pragma warning(pop)
1211#endif
1212#ifdef __GNUC__
1213#ifndef NX_NO_GCC_DEPRECATION_WARNINGS
1214#pragma GCC diagnostic warning "-Wdeprecated-declarations"
1215#endif
1216#endif
1217#undef EXPORTLIBRARY