Teamcenter C++ API Reference  2312
Clone.hxx
Go to the documentation of this file.
1 // Copyright 2022 Siemens Digital Industries Software
2 // ==================================================
3 // Copyright 2019.
4 // Siemens Product Lifecycle Management Software Inc.
5 // All Rights Reserved.
6 // ==================================================
7 // Copyright 2022 Siemens Digital Industries Software
8 
9 
10 #ifndef TEAMCENTER_CLONE_HXX
11 #define TEAMCENTER_CLONE_HXX
12 
13 #include <unidefs.h>
14 #include <vector>
16 #include <Mpr0process/libmpr0process_exports.h>
17 
18 namespace Teamcenter
19 {
20  namespace Mpr0Process
21  {
22  class Clone;
23  }
24 }
25 
26 class MPR0PROCESS_API Teamcenter::Mpr0Process::Clone
27 {
28 public:
29  struct CloneInfo
30  {
31  tag_t source;
32  tag_t clone;
33  };
34 
36  {
37  DeleteClone = 0,
38  UnlinkClone = 1,
39  SkipClone = 2
40  };
41 
42  static int cloneObjects(const std::vector<tag_t>& objects, const tag_t& targetScope, bool withTraceability, const tag_t& revisionRule, std::vector<CloneInfo>& clonesInfo, std::vector<Mpr0ErrorInfoEx>& errors);
43  static int unlinkObjects(const std::vector<tag_t>& cloneObjects, std::vector<Mpr0ErrorInfoEx>& errors);
44  static int updateCloneObjects(const std::vector<tag_t>& cloneObjects, const DeletedMasterAction& action, std::vector<Mpr0ErrorInfoEx>& errors);
45 
46 private:
47  static void populateErrorInfo(const int& ifail, const std::string& msg, std::vector<tag_t> objects, std::vector<Mpr0ErrorInfoEx>& errors);
48 
49 };
50 
51 #include <Mpr0process/libmpr0process_undef.h>
52 #endif //TEAMCENTER_CLONE_HXX