Codemesh Runtime v3 C++ API Reference  3.9.205
Static Public Member Functions | List of all members
xmog_serializable Class Reference

A utility class that provides easy access to the Java type com.codemesh.peer.SerializablePeer. More...

#include <xmog_serializable.h>

Inheritance diagram for xmog_serializable:
Inheritance graph
[legend]
Collaboration diagram for xmog_serializable:
Collaboration graph
[legend]

Static Public Member Functions

static int create (xmog_base *peer, xmog_localenv *env=NULL, xmog_flags=xmog_base::LOCAL)
 Creates a new instance of an xmog_serializable. More...
 
static char * to_string (xmog_base *peer, xmog_localenv *env=NULL)
 Returns a string containing the instance's state in text representation. More...
 
static xmog_java_classget_class ()
 Returns a pointer to the xmog_java_class that represents the Codemesh Serializable class.
 
- Static Public Member Functions inherited from xmog_peer
static int create (xmog_base *peer, const char *classNameUtf, xmog_localenv *env=NULL, xmog_flags=xmog_base::LOCAL)
 Creates a new instance of a Java type that is supposedly implementing the com.codemesh.peer.PeerType interface. More...
 
static int set_typeInfo (xmog_base *peer, const char *typeInfoUtf, xmog_localenv *env=NULL)
 Sets the typeinfo for the C++ instance that is storing data into this instance. More...
 
static int set_typeInfo (xmog_base *peer, const wchar_t *typeInfo, xmog_localenv *env=NULL)
 Sets the typeinfo for the C++ instance that is storing data into this instance. More...
 
static int set_typeInfo (xmog_base *peer, xmog_base *typeInfo, xmog_localenv *env=NULL)
 Sets the typeinfo for the C++ instance that is storing data into this instance. More...
 
static int get_typeInfo (xmog_base *peer, char *result, jint size, jint &required, xmog_localenv *env=NULL)
 Gets the typeinfo from the peer instance. More...
 
static int set_binaryData (xmog_base *peer, jbyte *pBytes, size_t len, xmog_localenv *env=NULL)
 Sets binary data into the instance. More...
 
static int get_binaryData (xmog_base *peer, jbyte **ppBytes, size_t *len, xmog_localenv *env=NULL)
 Retrieves binary data from the instance. More...
 
static int set_byte (xmog_base *peer, const char *fieldNameUtf, jbyte b, xmog_localenv *env=NULL)
 Sets a byte field into the instance. More...
 
static int get_byte (xmog_base *peer, const char *fieldNameUtf, jbyte *b, xmog_localenv *env=NULL)
 Reads a byte field from the instance. More...
 
static int set_bool (xmog_base *peer, const char *fieldNameUtf, bool b, xmog_localenv *env=NULL)
 Sets a bool field into the instance. More...
 
static int get_bool (xmog_base *peer, const char *fieldNameUtf, bool *b, xmog_localenv *env=NULL)
 Reads a bool field from the instance. More...
 
static int set_boolean (xmog_base *peer, const char *fieldNameUtf, jboolean b, xmog_localenv *env=NULL)
 Sets a boolean field into the instance. More...
 
static int get_boolean (xmog_base *peer, const char *fieldNameUtf, jboolean *b, xmog_localenv *env=NULL)
 Reads a jboolean field from the instance. More...
 
static int set_char (xmog_base *peer, const char *fieldNameUtf, jchar c, xmog_localenv *env=NULL)
 Sets a char field into the instance. More...
 
static int get_char (xmog_base *peer, const char *fieldNameUtf, jchar *ch, xmog_localenv *env=NULL)
 Reads a char field from the instance. More...
 
static int set_double (xmog_base *peer, const char *fieldNameUtf, jdouble d, xmog_localenv *env=NULL)
 Sets a double field into the instance. More...
 
static int get_double (xmog_base *peer, const char *fieldNameUtf, jdouble *d, xmog_localenv *env=NULL)
 Reads a double field from the instance. More...
 
static int set_float (xmog_base *peer, const char *fieldNameUtf, jfloat f, xmog_localenv *env=NULL)
 Sets a float field into the instance. More...
 
static int get_float (xmog_base *peer, const char *fieldNameUtf, jfloat *f, xmog_localenv *env=NULL)
 Reads a float field from the instance. More...
 
static int set_int (xmog_base *peer, const char *fieldNameUtf, jint i, xmog_localenv *env=NULL)
 Sets a int field into the instance. More...
 
static int get_int (xmog_base *peer, const char *fieldNameUtf, jint *i, xmog_localenv *env=NULL)
 Reads an int field from the instance. More...
 
static int set_long (xmog_base *peer, const char *fieldNameUtf, jlong l, xmog_localenv *env=NULL)
 Sets a long field into the instance. More...
 
static int get_long (xmog_base *peer, const char *fieldNameUtf, jlong *l, xmog_localenv *env=NULL)
 Reads a long field from the instance. More...
 
static int set_short (xmog_base *peer, const char *fieldNameUtf, jshort s, xmog_localenv *env=NULL)
 Sets a short field into the instance. More...
 
static int get_short (xmog_base *peer, const char *fieldNameUtf, jshort *s, xmog_localenv *env=NULL)
 Reads a short field from the instance. More...
 
static int set_Object (xmog_base *peer, const char *fieldNameUtf, jobject o, xmog_localenv *env=NULL)
 Sets an Object field into the instance. More...
 
static int get_Object (xmog_base *peer, const char *fieldNameUtf, jobject *o, xmog_localenv *env=NULL)
 Reads an Object field from the instance. More...
 
static int set_Object (xmog_base *peer, const char *fieldNameUtf, const char *str, xmog_localenv *env=NULL)
 Sets a String field into the instance. More...
 
static int get_String (xmog_base *peer, const char *fieldNameUtf, const char **str, size_t *len, xmog_localenv *env=NULL)
 Reads a String field from the instance. More...
 
static int get_StringUtf8 (xmog_base *peer, const char *fieldNameUtf, const char **strUtf8, size_t *len, xmog_localenv *env=NULL)
 Reads a String field from the instance. More...
 
static int set_Object (xmog_base *peer, const char *fieldNameUtf, const wchar_t *str, xmog_localenv *env=NULL)
 Sets a String field into the instance. More...
 
static char * to_string (xmog_base *peer, xmog_localenv *env=NULL)
 Returns a string containing the instance's state in text representation. More...
 
static xmog_java_classget_class ()
 Returns a pointer to the xmog_java_class that represents the com.codemesh.peer.PeerType interface. More...
 
static xmog_java_classget_class (const char *classNameUtf, xmog_localenv *env=NULL)
 Returns a pointer to the class of the given name. More...
 
static int register_unmarshaller (const char *javaClassNameUtf, const char *cppClassIdentifier, XMOG_PEER_UNMARSHAL_METHOD pUnmarshal)
 Registers a peer unmarshaller for the tuple of <Java peer classname, C++ class identifier>. More...
 

Detailed Description

A utility class that provides easy access to the Java type com.codemesh.peer.SerializablePeer.

Member Function Documentation

◆ create()

static int xmog_serializable::create ( xmog_base peer,
xmog_localenv env = NULL,
xmog_flags  = xmog_base::LOCAL 
)
static

Creates a new instance of an xmog_serializable.

Parameters
peerthe instance into which the peer instance is created.
envthe local call environment. May be NULL.
flagsconstruction flags.

◆ to_string()

static char* xmog_serializable::to_string ( xmog_base peer,
xmog_localenv env = NULL 
)
static

Returns a string containing the instance's state in text representation.

The returned string is dynamically allocated and needs to be freed by the caller.

Parameters
peerthe peer instance.
envthe local call environment. May be NULL.

The documentation for this class was generated from the following file:

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