Teamcenter C++ API Reference  2312
OperationDispatcherRegistry.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: OperationDispatcher.hxx
9  Module : extensionframework
10 
11  This operation dispatcher register for BO operation.
12 
13 ====================================================================================================
14  Date Name Description of Change
15 $HISTORY$
16 ==================================================================================================*/
17 #ifndef OPERATIONDISPATCHERREGISTRY_HXX
18 #define OPERATIONDISPATCHERREGISTRY_HXX
19 
20 #include <unidefs.h>
21 
22 #include <string>
23 #include <map>
24 
25 #include <common/tc_deprecation_macros.h>
26 #include <metaframework/Object.hxx>
28 #include <extensionframework/libextensionframework_exports.h>
29 
30 namespace Teamcenter
31 {
32  class OperationDispatcherRegistry;
33 }
34 
36 {
41 
44 {
52 
53 class EXTENSIONFRAMEWORK_API Teamcenter::OperationDispatcherRegistry : public Teamcenter::Object
54 {
55 public:
56  typedef OperationDispatcher* (*OperationDispatcherConstructor)();
57 
67  typedef std::vector< std::pair< OperationDispatcherConstructor, std::string > > OperationDispatcherMapValue;
68  typedef std::map< std::string, OperationDispatcherMapValue > OperationDispatcherMap;
69  typedef std::map< int, std::vector<int> > SetBasedToObjectBasedOpIntMap;
70  typedef std::map< int, std::vector<int> > ObjectBasedToSetBasedOpIntMap;
72  void initializeRegister(const std::string& opId, OperationDispatcherConstructor ctr);
73  void registerBusinessObjOperationDispatcherCtor( const std::string& opId, const std::string& typeName, OperationDispatcherConstructor ctr );
74  int createOperationDispatcher( const std::string& opId, OperationDispatcher*& opDispatcher );
75  int createBusinessObjOperationDispatcher( const std::string& opId, const std::string& typeName, OperationDispatcher*& opDispatcher );
76  void registerTypeOperation(int opInt, tag_t typeTag);
77  std::vector<tag_t>* getStopTraverseTypes( int opInt );
78 
80  TC_DEPRECATED_NO_REPLACEMENT("11.2.4","getObjectBasedOpIntForSetBasedOpInt")
81  void getObjectBasedOpIntForSetBasedOpInt( int setBasedOpInt, std::vector<int>& objBasedOpInt );
82 
83  void getEquivalentObjectBasedOrSetBasedOpInt( int inputOpInt, std::vector<int>& equivalentOpInt, EXTENSIONFRAMEWORK_operation_int_type_t& opIntType );
84 
86  void dumpFunction();
87 
91  static void isFallbackEnabledOperation( const int inputOpInt,
92  bool& isFallBackEnabled,
94  );
95 
96 
97 protected:
99  ~OperationDispatcherRegistry();
100 private:
101  OperationDispatcherMap m_operarionDispatchCtorMap;
103  static OperationDispatcherRegistry* m_instance;
104  std::map< int, std::vector< tag_t >* > m_typeOperations;
105  static SetBasedToObjectBasedOpIntMap s_SetBasedToObjectBasedOpIntMap;
106  static ObjectBasedToSetBasedOpIntMap s_ObjectBasedToSetBasedOpIntMap;
107  void initializeSetBasedToObjectBaseOperationMap();
108  void initializeObjectBasedToSetBaseOperationMap();
109 
111  static void initializeFallbackEnabledOperationMap();
112 };
113 #include <extensionframework/libextensionframework_undef.h>
114 #endif //OPERATIONDISPATCHERREGISTRY_HXX