Codemesh Runtime v3 C++ API Reference  3.9.205
xmog_class_info_mapper.h
1 //
2 // Copyright (c) 1999-2020 by Codemesh, Inc.. ALL RIGHTS RESERVED.
3 //
4 
5 #ifndef xmogClassInfoMapInc
6 #define xmogClassInfoMapInc
7 
8 
9 #include "xmog.h"
10 
11 
12 #if (XMOG_IMPLEMENTS_REMOTE_CLIENT==1)
13 
14 
15 #include "xmog_util.h"
16 #include "ace/Map_Manager.h"
17 #include "ace/Recursive_Thread_Mutex.h"
18 
19 
25 {
30  struct xmog_class_info
31  {
32  jclass id_;
33  jclass super_id_;
34  size_t num_ifcs_;
35  jclass * ifc_ids_;
36  char * name_;
37 
38  xmog_class_info() : id_( 0 ), super_id_( 0 ), num_ifcs_( 0 ), ifc_ids_( 0 ), name_( 0 ) {}
39  xmog_class_info( const xmog_class_info & rhs );
40  xmog_class_info & operator = (const xmog_class_info & );
41  ~xmog_class_info();
42  };
43 
44 
45 public:
46 
47  typedef ACE_Map_Manager<jclass,xmog_class_info,ACE_Recursive_Thread_Mutex> ClassToClassInfoMap;
48 
49 private:
50 
51  ClassToClassInfoMap toInfo_;
52 
53 public:
54 
59 
61 
62  int register_class( jclass id, jclass super_id, const char * name, size_t numIfcs, jclass * ifcs );
63 
64  int get_super( jclass sub, jclass & sup ) const;
65 
66  int get_class_name( jclass id, char * & name ) const;
67 
68  int get_num_ifcs( jclass sub, size_t & size ) const;
69 
70  int get_ifc( jclass sub, size_t index, jclass & ifc ) const;
71 
72  int is_assignable( jclass sub, jclass sup, jboolean & bAssignable ) const;
73 };
74 
75 #endif /* (XMOG_IMPLEMENTS_REMOTE_CLIENT==1) */
76 
77 
78 #endif /* xmogClassInfoMapInc */
xmog_class_info_mapper
A utility class that tracks remote object types and their relationships.
Definition: xmog_class_info_mapper.h:24
xmog_class_info_mapper::xmog_class_info_mapper
xmog_class_info_mapper()
Constructs a mapper instance.

Copyright (c) 1999-2020 by Codemesh, Inc., ALL RIGHTS RESERVED.