Codemesh Runtime v3 C++ API Reference  3.9.205
xmog_peer.h
1 //
2 // Copyright (c) 1999-2020 by Codemesh, Inc.. ALL RIGHTS RESERVED.
3 //
4 
5 
6 #ifndef xmog_peer_inc
7 #define xmog_peer_inc
8 
9 
10 #include "xmog_java.h"
11 
155 
218 typedef void * (XMOG_CALLING_CONVENTION *XMOG_PEER_UNMARSHAL_METHOD)(
219  xmog_base & peer,
220  xmog_java_class * peerClass,
221  const char * cppType,
222  xmog_localenv * env );
223 
224 
233 class XMOG_DECLSPEC xmog_peer
234 {
235 public:
236 
245  static int create( xmog_base * peer, const char * classNameUtf, xmog_localenv * env = NULL, xmog_flags = xmog_base::LOCAL );
246 
255  static int set_typeInfo( xmog_base * peer, const char * typeInfoUtf, xmog_localenv * env = NULL );
256 
265  static int set_typeInfo( xmog_base * peer, const wchar_t * typeInfo, xmog_localenv * env = NULL );
266 
278  static int set_typeInfo( xmog_base * peer, xmog_base * typeInfo, xmog_localenv * env = NULL );
279 
289  static int get_typeInfo( xmog_base * peer, char * result, jint size, jint & required, xmog_localenv * env = NULL );
290 
299  static int set_binaryData( xmog_base * peer, jbyte * pBytes, size_t len, xmog_localenv * env = NULL );
300 
309  static int get_binaryData( xmog_base * peer, jbyte ** ppBytes, size_t * len, xmog_localenv * env = NULL );
310 
319  static int set_byte( xmog_base * peer, const char * fieldNameUtf, jbyte b, xmog_localenv * env = NULL );
320 
329  static int get_byte( xmog_base * peer, const char * fieldNameUtf, jbyte * b, xmog_localenv * env = NULL );
330 
339  static int set_bool( xmog_base * peer, const char * fieldNameUtf, bool b, xmog_localenv * env = NULL );
340 
349  static int get_bool( xmog_base * peer, const char * fieldNameUtf, bool * b, xmog_localenv * env = NULL );
350 
359  static int set_boolean( xmog_base * peer, const char * fieldNameUtf, jboolean b, xmog_localenv * env = NULL );
360 
369  static int get_boolean( xmog_base * peer, const char * fieldNameUtf, jboolean * b, xmog_localenv * env = NULL );
370 
379  static int set_char( xmog_base * peer, const char * fieldNameUtf, jchar c, xmog_localenv * env = NULL );
380 
389  static int get_char( xmog_base * peer, const char * fieldNameUtf, jchar * ch, xmog_localenv * env = NULL );
390 
399  static int set_double( xmog_base * peer, const char * fieldNameUtf, jdouble d, xmog_localenv * env = NULL );
400 
409  static int get_double( xmog_base * peer, const char * fieldNameUtf, jdouble * d, xmog_localenv * env = NULL );
410 
419  static int set_float( xmog_base * peer, const char * fieldNameUtf, jfloat f, xmog_localenv * env = NULL );
420 
429  static int get_float( xmog_base * peer, const char * fieldNameUtf, jfloat * f, xmog_localenv * env = NULL );
430 
439  static int set_int( xmog_base * peer, const char * fieldNameUtf, jint i, xmog_localenv * env = NULL );
440 
449  static int get_int( xmog_base * peer, const char * fieldNameUtf, jint * i, xmog_localenv * env = NULL );
450 
459  static int set_long( xmog_base * peer, const char * fieldNameUtf, jlong l, xmog_localenv * env = NULL );
460 
469  static int get_long( xmog_base * peer, const char * fieldNameUtf, jlong * l, xmog_localenv * env = NULL );
470 
479  static int set_short( xmog_base * peer, const char * fieldNameUtf, jshort s, xmog_localenv * env = NULL );
480 
489  static int get_short( xmog_base * peer, const char * fieldNameUtf, jshort * s, xmog_localenv * env = NULL );
490 
499  static int set_Object( xmog_base * peer, const char * fieldNameUtf, jobject o, xmog_localenv * env = NULL );
500 
509  static int get_Object( xmog_base * peer, const char * fieldNameUtf, jobject * o, xmog_localenv * env = NULL );
510 
519  static int set_Object( xmog_base * peer, const char * fieldNameUtf, const char * str, xmog_localenv * env = NULL );
520 
530  static int get_String( xmog_base * peer, const char * fieldNameUtf, const char ** str, size_t * len, xmog_localenv * env = NULL );
531 
532 # if (XMOG_SUPPORTS_WCHAR_T==1)
533  static int get_String( xmog_base * peer, const char * fieldNameUtf, const XMOG_WCHAR ** str, size_t * len, xmog_localenv * env = NULL );
543 # endif
544 
545 # if (XMOG_REQUIRES_UNSIGNED_SHORT_OVERLOAD==1)
546  static int get_String( xmog_base * peer, const char * fieldNameUtf, const unsigned short ** str, size_t * len, xmog_localenv * env = NULL );
556 # endif
557 
567  static int get_StringUtf8( xmog_base * peer, const char * fieldNameUtf, const char ** strUtf8, size_t * len, xmog_localenv * env = NULL );
568 
577  static int set_Object( xmog_base * peer, const char * fieldNameUtf, const wchar_t * str, xmog_localenv * env = NULL );
578 
587  static char * to_string( xmog_base * peer, xmog_localenv * env = NULL );
588 
596  static xmog_java_class * get_class();
597 
606  static xmog_java_class * get_class( const char * classNameUtf, xmog_localenv * env = NULL );
607 
621  static int register_unmarshaller( const char * javaClassNameUtf,
622  const char * cppClassIdentifier,
623  XMOG_PEER_UNMARSHAL_METHOD pUnmarshal );
624 
625 };
626 
627 
628 #endif /* xmog_peer_inc */
xmog_peer
A utility class that provides access to the Java interface com.codemesh.peer.PeerType.
Definition: xmog_peer.h:233
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_PEER_UNMARSHAL_METHOD
void *(XMOG_CALLING_CONVENTION * XMOG_PEER_UNMARSHAL_METHOD)(xmog_base &peer, xmog_java_class *peerClass, const char *cppType, xmog_localenv *env)
The peer unmarshalling callback.
Definition: xmog_peer.h:218
xmog_java_class
A C++ wrapper for Java types.
Definition: xmog_java_class.h:31

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