Teamcenter C++ API Reference  2312
RootObject.hxx
Go to the documentation of this file.
1 //Copyright 2022 Siemens Digital Industries Software
2 //==================================================
3 //Copyright $2008.
4 //Siemens Product Lifecycle Management Software Inc.
5 //All Rights Reserved.
6 //==================================================
7 //Copyright 2022 Siemens Digital Industries Software
8 
9 /*==================================================================================================
10 File description:
11  This file contains the declaration for the abstract class RootObject
12 
13  Filename: RootObject.hxx
14  Module : metaframework
15 
16 ==================================================================================================*/
17 
18 #ifndef TEAMCENTER__ROOTOBJECT__HXX
19 #define TEAMCENTER__ROOTOBJECT__HXX
20 
21 #include <string>
22 #include <unidefs.h>
23 #include <vector>
24 #include <cstdarg>
25 
26 
27 #include <metaframework/Object.hxx>
28 
29 #include <metaframework/libmetaframework_exports.h>
30 
31 namespace Teamcenter
32 {
33  class RootObject;
34 }
35 namespace Teamcenter
36 {
37  class RootObjectImpl;
38  class RuntimeBusinessObjectImpl;
39  class BusinessObjectRegistryImpl;
40 }
41 namespace Teamcenter
42 {
43  class BusinessObject;
44 }
45 
46 class METAFRAMEWORK_API Teamcenter::RootObject : public Teamcenter::Object
47 {
48 public:
49 
50  // Getter method for the Implementation Object
51  virtual RuntimeBusinessObjectImpl* getRuntimeBusinessObjectImpl() const;
52 
53  // Get the Interface Name
54  static const std::string& getInterfaceName();
55 
56  //operations
57  // get the object tag
58  tag_t getTag() const;
59 
60  // get the BusinessObject(Type) name
61  const std::string& getTypeName() const;
62 
63  // get the BusinessObject(Type) tag
64  tag_t getTypeTag() const;
65 
66  // va_list does not support std::string& so converting to std::string*
67  int invokeOperation( const std::string* operationId, ...);
68  int invokeOperation( const std::string& operationId, va_list args );
69  int invokeOperation( int operationIdInt, va_list args );
70  int invokeOperation( const std::string& operationId, std::vector<void*>& args );
71  int invokeOperation( int operationIdInt, std::vector<void*>& args );
72 
73 protected:
74  RootObject();
75  virtual ~RootObject();
76 
77  // initialization for object instantiation
78  virtual void initialize(RootObjectImpl * impl = 0);
79 
80  // set the object tag
81  void setTag(tag_t tag);
82 
83 private:
84  void setType(tag_t tag, const std::string& name);
85 
86  // object tag
87  tag_t m_tag;
88 
89  // business object type name
90  std::string m_typeName;
91  // business object type tag
92  tag_t m_typeTag;
93 
94  // Name of the Object
95  static std::string name;
96 
97  // Private default constructor. We do not want this class instantiated without the business object passed in.
98  RootObject( const RootObject& );
99  RootObject& operator=( const RootObject& );
100 
101  // friends
102  friend class Teamcenter::BusinessObjectRegistryImpl;// persist BusinessObject: accessing setTag and setType
103 };
104 
105 #include <metaframework/libmetaframework_undef.h>
106 #endif // TEAMCENTER__ROOTOBJECT__HXX