Codemesh Runtime v3 C++ API Reference  3.9.205
xmog_base.h
1 //
2 // Copyright (c) 1999-2020 by Codemesh, Inc.. ALL RIGHTS RESERVED.
3 //
4 
5 
6 #ifndef xmog_base_inc
7 #define xmog_base_inc
8 
9 
10 #include "xmog.h"
11 #include "xmog_atomic_pointer.h"
12 
13 
14 class xmog_localenv;
15 class xmog_java_array;
16 class xmog_java_class;
17 class xmog_java_dynamic;
18 class xmog_java_ref;
19 
20 
29 struct XMOG_DECLSPEC xmog_base
30 {
36  xmog_base();
37 
50  xmog_base( xmog_java_array * _ref, jint _index );
51 
67  xmog_base( xmog_java_ref * _ref, xmog_java_dynamic * _dynamic, xmog_flags _flags );
68 
84  xmog_base( xmog_java_class * _clazz, xmog_java_dynamic * _dynamic, xmog_flags _flags );
85 
104  XMOG_EXPLICIT xmog_base( xmog_base * _delegate, bool _owns_delegate = true );
105 
115  xmog_base( jobject _local, xmog_flags _flags );
116 
120  virtual ~xmog_base();
121 
132  virtual void copy_jobject_( xmog_base * _rhs, xmog_localenv * env = NULL );
133 
142  virtual jobject get_owning_jobject_( xmog_localenv * env = NULL );
143 
152  virtual jobject get_jobject_( xmog_localenv * env = NULL ) const;
153 
162  virtual jobject get_released_local_jobject_( xmog_localenv * env = NULL ) const;
163 
167  virtual bool is_null_( xmog_localenv * env = NULL ) const;
168 
172  virtual bool is_same_( const xmog_base & _rhs, xmog_localenv * env = NULL ) const;
173 
182  virtual jobject duplicate_jobject_( xmog_localenv * env = NULL ) const;
183 
193  virtual void set_jobject_( xmog_base * _rhs, xmog_localenv * env = NULL );
194 
205  virtual void transfer_jobject_( xmog_base * _rhs, xmog_localenv * env = NULL );
206 
213  virtual xmog_base * xmog_to_( xmog_flags flags, xmog_localenv * env = NULL );
214 
228  virtual xmog_base * xmog_fill_with_standalone_for_( xmog_base * _rhs, xmog_localenv * env = NULL );
229 
245  virtual xmog_java_class * xmog_get_java_peer( xmog_localenv * env = NULL );
246 
271  virtual int xmog_create_java_peer( xmog_java_class * clazz, xmog_localenv * env = NULL, xmog_flags flags = xmog_base::GLOBAL );
272 
289  virtual int xmog_to_java_peer( xmog_localenv * env = NULL );
290 
303  virtual void xmog_lazy_write( xmog_localenv * env = NULL );
304 
310  virtual void xmog_invalidate( xmog_localenv * env = NULL );
311 
318  void release_standalone( xmog_localenv * env = NULL );
319 
323  void release_delegate();
324 
337  XMOG_JOBJECT_HOLDER owner_;
338 
339 
353  union
354  {
360 
364  jint index_;
365  };
366 
370  xmog_flags flags_;
371 
383  enum flags
384  {
385  STAND_ALONE = 1,
386  ARRAY_ELEMENT = 2,
387  DYNAMIC = 4,
388  DELEGATE = 8,
389 
390  LOCAL = 16,
391  WEAK_GLOBAL = 32,
392  GLOBAL = 64,
393  REMOTE = 128,
394 
395  CACHING = 256,
396  CACHE_INVALID = 512,
397  CACHE_DIRTY = 1024,
398  CACHE_LAZY_WRITE = 2048,
399 
400  OWNS_DELEGATE = 4096,
401 
402  STRING_DIRTY = 8192,
403  STRING_PTR = 16384,
404  STRING_WPTR = 32768,
405 
406  INDIRECT = 65536,
407  NONVIRT = 131072,
408 
409  SUPPRESS_LOGGING = 262144,
410 
411  CATEGORY = 15,
412  TYPE = 240,
413  CACHE = 3840
414  };
415 };
416 
417 
418 #if !defined (XMOG_LACKS_INLINE_FUNCTIONS)
419 # include "xmog_base.inl"
420 #else
421 # include "xmog_java_ref.h"
422 # include "xmog_java_array.h"
423 # include "xmog_java_class.h"
424 # include "xmog_java_dynamic.h"
425 # include "xmog_exception.h"
426 # include "xmog_error_handler.h"
427 # include "xmog_jvm_loader.h"
428 # include "xmog_localenv.h"
429 #endif
430 
431 
432 #endif /* xmog_base_inc */
xmog_base::flags
flags
The possible flag values.
Definition: xmog_base.h:383
xmog_base::flags_
xmog_flags flags_
The flags governing the type and other housekeeping information.
Definition: xmog_base.h:370
xmog_java_dynamic
The baseclass for types that dynamically derive the value of Java proxy items.
Definition: xmog_java_dynamic.h:28
xmog_base::owner_
XMOG_JOBJECT_HOLDER owner_
The owner or identity of the object.
Definition: xmog_base.h:337
xmog_base::dynamic_
xmog_java_dynamic * dynamic_
A pointer to an object that can access indirectly specified information.
Definition: xmog_base.h:359
xmog_base
The baseclass for all proxy types in the framework.
Definition: xmog_base.h:29
xmog_localenv
A class representing per-thread information for the integration runtime.
Definition: xmog_localenv.h:32
xmog_java_ref
The wrapper base type representing C++ proxy instances for Java objects.
Definition: xmog_java_ref.h:19
xmog_java_array
The baseclass for all Java proxy array types.
Definition: xmog_java_array.h:456
xmog_java_class
A C++ wrapper for Java types.
Definition: xmog_java_class.h:31
xmog_base::index_
jint index_
The index of an array element.
Definition: xmog_base.h:364

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