a patch and a question



Hi Michael!

While dealing with CORBA_any's and Typecodes, I've found useful to add
more GET/SET macros to the BonoboArg stuff, so here's a patch which adds
a few of them. If you find it useful, I'll add for other type codes.

Also, I've got a question: what's the best way of dealing with the
following CORBA structure to be stored in a CORBA_any/BonoboArg?

	struct Timestamp {
                short year;
                unsigned short month;
                unsigned short day;
                unsigned short hour;   
                unsigned short minute;
                unsigned short second;
                unsigned long  fraction;
        };

cheers
-- 
Rodrigo Moya <rodrigo gnome-db org> - <rodrigo ximian com>
http://www.gnome-db.org/ - http://www.ximian.com/
? monikers/Bonobo_Moniker_std.oaf
? monikers/Bonobo_Moniker_std.oaf.in
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/libbonobo/ChangeLog,v
retrieving revision 1.162
diff -u -r1.162 ChangeLog
--- ChangeLog	2001/08/18 21:18:27	1.162
+++ ChangeLog	2001/08/20 00:52:06
@@ -1,3 +1,7 @@
+2001-08-19  Rodrigo Moya <rodrigo gnome-db org>
+
+	* bonobo/bonobo-arg.h: added GET/SET macros for more CORBA types
+
 2001-08-18  Michael Meeks  <michael ximian com>
 
 	* idl/Makefile.am: build the Activation_types into our
Index: bonobo/bonobo-arg.h
===================================================================
RCS file: /cvs/gnome/libbonobo/bonobo/bonobo-arg.h,v
retrieving revision 1.22
diff -u -r1.22 bonobo-arg.h
--- bonobo/bonobo-arg.h	2001/08/10 12:31:48	1.22
+++ bonobo/bonobo-arg.h	2001/08/20 00:52:07
@@ -42,10 +42,14 @@
 #define BONOBO_ARG_GET_BOOLEAN(a)   (BONOBO_ARG_GET_GENERAL (a, TC_CORBA_boolean, CORBA_boolean, NULL))
 #define BONOBO_ARG_SET_BOOLEAN(a,v) (BONOBO_ARG_SET_GENERAL (a, v, TC_CORBA_boolean, CORBA_boolean, NULL))
 
+#define BONOBO_ARG_GET_SHORT(a)     (BONOBO_ARG_GET_GENERAL (a, TC_CORBA_short, CORBA_short, NULL))
+#define BONOBO_ARG_SET_SHORT(a,v)   (BONOBO_ARG_SET_GENERAL (a, v, TC_CORBA_short, CORBA_short, NULL))
 #define BONOBO_ARG_GET_INT(a)       (BONOBO_ARG_GET_GENERAL (a, TC_CORBA_long, CORBA_long, NULL))
 #define BONOBO_ARG_SET_INT(a,v)     (BONOBO_ARG_SET_GENERAL (a, v, TC_CORBA_long, CORBA_long, NULL))
 #define BONOBO_ARG_GET_LONG(a)      (BONOBO_ARG_GET_GENERAL (a, TC_CORBA_long, CORBA_long, NULL))
 #define BONOBO_ARG_SET_LONG(a,v)    (BONOBO_ARG_SET_GENERAL (a, v, TC_CORBA_long, CORBA_long, NULL))
+#define BONOBO_ARG_GET_LONGLONG(a)  (BONOBO_ARG_GET_GENERAL (a, TC_CORBA_long_long, CORBA_long_long, NULL))
+#define BONOBO_ARG_SET_LONGLONG(a,v) (BONOBO_ARG_SET_GENERAL (a, v, TC_CORBA_long_long, CORBA_long_long, NULL))
 
 #define BONOBO_ARG_GET_FLOAT(a)     (BONOBO_ARG_GET_GENERAL (a, TC_CORBA_float, CORBA_float, NULL))
 #define BONOBO_ARG_SET_FLOAT(a,v)   (BONOBO_ARG_SET_GENERAL (a, v, TC_CORBA_float, CORBA_float, NULL))
@@ -53,6 +57,8 @@
 #define BONOBO_ARG_GET_DOUBLE(a)    (BONOBO_ARG_GET_GENERAL (a, TC_CORBA_double, CORBA_double, NULL))
 #define BONOBO_ARG_SET_DOUBLE(a,v)  (BONOBO_ARG_SET_GENERAL (a, v, TC_CORBA_double, CORBA_double, NULL))
 
+#define BONOBO_ARG_GET_CHAR(a)      (BONOBO_ARG_GET_GENERAL (a, TC_CORBA_char, CORBA_char, NULL))
+#define BONOBO_ARG_SET_CHAR(a,v)    (BONOBO_ARG_SET_GENERAL (a, v, TC_CORBA_char, CORBA_char, NULL))
 
 #ifdef __GNUC__
 #define BONOBO_ARG_GET_STRING(a)    (g_assert ((a)->_type->kind == CORBA_tk_string),\


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]