Teamcenter C++ API Reference  2312
BusinessObjectRegistry.hxx
Go to the documentation of this file.
1 /*==================================================================================================
2 
3  Copyright (c) 2007 UGS
4  Unpublished - All rights reserved
5 ====================================================================================================
6 File description:
7 
8  Filename: BusinessObjectRegistry.hxx
9  Module : metaframework
10 
11  This is the interface class to handle all the business object registration
12  and module initializer registration.
13 
14 ====================================================================================================
15  Date Name Description of Change
16 $HISTORY$
17 ==================================================================================================*/
18 #ifndef BUSINESSOBJECTREGISTRY_HXX
19 #define BUSINESSOBJECTREGISTRY_HXX
20 
21 #include <unidefs.h>
22 #include <string>
23 #include <vector>
25 #include <base_utils/ScopedPtr.hxx>
31 
32 #include <tc/Fnd0BaseProvider.hxx>
33 
34 #include <metaframework/libmetaframework_exports.h>
35 
36 #define OPERATIONINPUT_CREATE "Create"
37 #define OPERATIONINPUT_REVISE "Revise"
38 #define OPERATIONINPUT_SAVEAS "SaveAs"
39 #define OPERATIONINPUT_DEEPCOPYDATA "DeepCopyData"
40 #define OPERATIONINPUT_ANY "OperationInput"
41 #define OPERATIONINPUT_BULKINPUT "BulkInput"
42 
43 namespace Teamcenter
44 {
45  class OperationInput;
46  class CreateInput;
47  class SaveAsInput;
48  class ReviseInput;
49  class BulkInput;
50  class BulkData;
51  class BusinessObjectRegistry;
52  class RootObject;
53  class BusinessObject;
54  class RuntimeBusinessObject;
55  class BusinessObjectTagManager;
56  struct BusinessObjectRegEntry;
57  typedef RootObject* (*BusinessObjectConstructor)();
58  typedef int (*BusinessObjectInitializer)();
59  typedef int (*BusinessObjectPropFnRegister)();
60 }
61 
62 
63 class METAFRAMEWORK_API Teamcenter::BusinessObjectRegistry
64 {
65 public:
66  // get singleton object
68 
69  // given a object tag, get the object
70  virtual RootObject* getObject( tag_t objTag ) = 0;
71  // load the object
72  virtual BusinessObject* load( tag_t objTag ) = 0;
73 
74  // regisiter business object constructor and initializer
75  virtual void initializeRegister( const std::string& name,
77  BusinessObjectInitializer initilaizer = 0,
78  BusinessObjectInitializer reinitilaizer = 0,
79  BusinessObjectInitializer uninitilaizer = 0 ) = 0;
80 
81 
82  // initialize a business object by name.
83  virtual int initialize( const std::string& boName ) = 0;
84 
85  // delete the operation input object
86  virtual void deleteInputObject( OperationInput* input ) = 0;
87 
88  // create a BusinessObject by name
89  virtual RootObject* createBusinessObject( const std::string& name ) = 0;
90 
91  virtual BusinessObject* createBusinessObject( CreateInput* pCreateInput ) = 0;
92 
93  virtual int createBusinessObjects( std::vector< Teamcenter::BulkInput* >* inputs, Teamcenter::BulkData* bd ) = 0;
94 
95  virtual OperationInput* createInputObject( const std::string& strBOName, const std::string& strOperationInputName ) = 0;
96 
97  //create a Shadow BusinessObject
98  virtual BusinessObject* createShadowBusinessObject( CreateInput* pCreateInput ) = 0;
99 
100  //property related registration
101  virtual int initializePropertyFnRegister( const std::string& boName, BusinessObjectPropFnRegister propFnRegister ) = 0;
102 
103 
104  // load library
105  virtual void registerLoadedLibrary( const std::string& libName ) = 0;
106 
107  //license registry handling
108  virtual int registerFeatureKey( const std::string& BOname, FeatureKeyCheck* authorFeatureKey, FeatureKeyCheck* consumerFeatureKey = NULL ) = 0;
109  virtual int getAuthorFeatureKey( BusinessObjectRegEntry* regEntry, FeatureKeyCheck** featureKey, bool& didCheckedLic, int& checkLicResult ) const = 0;
110  virtual int getConsumerFeatureKey( BusinessObjectRegEntry* regEntry, FeatureKeyCheck** featureKey, bool& didCheckedLic, int& checkLicResult ) const = 0;
111  virtual int updateAuthorFeatureKeyStatus( BusinessObjectRegEntry* regEntry, int checkLicResult ) = 0;
112  virtual int updateConsumerFeatureKeyStatus( BusinessObjectRegEntry* regEntry, int checkLicResult ) = 0;
113  virtual int checkAuthorLicense( const std::string& BOname, int& checkLicResult ) = 0;
114  virtual int checkConsumerLicense( const std::string& BOname, int& checkLicResult ) = 0;
115 
116  // delete a BusinessObject
117  virtual void deleteObject( RootObject* obj ) = 0;
118 
119 
124  virtual void loadBusinessObjectExtenderLibrary(const std::string& nameSpace,
125  const std::string& boName
126  ) = 0;
127 
131  virtual void initializeExtenderBO( tag_t typeTag, int operationIdInteger ) = 0;
132 
133 protected:
134  // constructor
136  // destructor
137  virtual ~BusinessObjectRegistry();
138 };
139 
140 
141 namespace Teamcenter
142 {
144  {
146  };
148  {
150  };
152  {
154  };
156  {
158  };
160  {
162  };
164  {
166  };
168  {
170  };
172  {
174  };
176  {
178  };
180  {
182  };
184  {
186  };
188  {
190  };
191 }
192 
193 
194 #include <metaframework/libmetaframework_undef.h>
195 #endif //BUSINESSOBJECTREGISTRY__HXX