Mombu the Programming Forum

Go Back   Mombu the Programming Forum > Programming > typedef sequence with user defined objects
User Name
Password
REGISTER NOW! Mark Forums Read




Reply Bookmark and Share
1 4th April 17:07
developmm
External User
 
Posts: 1
Default typedef sequence with user defined objects



Hi i'm quite new to corba.
I need to implement Add.idl, but i can't find something similar on the
net, or some closer examples.
The idea is to implement the interface Add to store an array of
results (the sum of a and b). The client sends a and b to the server
and the server sends back an Add object that contains the resulting
sum (this is a must, this is how it should be done, i know i could do
this easier, also found examples here: http://java.sun.com/developer/techni...eleases/corba/
).
Could anyone give some links to achieve this, or code, or try to do
this together on this thread?

Here is my idl:

//Add.idl
module ArithApp {

interface Add;
typedef sequence <Add> AddJob;

const unsigned short SIZE=10;
typedef long array[SIZE];

interface Add
{
AddJob addArrays(in array a, in array b);
};
};

Thanks for your time.
  Reply With Quote


 


2 4th April 17:08
mark woyna
External User
 
Posts: 1
Default typedef sequence with user defined objects



The 'Add' interface does not contain any attributes, so there's no way
it can carry a result back to the caller. It's role appears to be a
service-type object, since it contains only operations. Why don't you
change the return type to a long?

Also, I don't believe the 2nd typedef is syntactically correct. It
should be:

typedef long[SIZE] longArray;

interface Add {
long addArrays(in longArray a, in longArray b);
};

Mark
  Reply With Quote


 


Reply


Thread Tools
Display Modes


Some other forums that might be of your interest : Development, Ada, Apple script, Assembler, Awk, Beos, Basic, C, C++, C#, C# .net, .net, .net frameworks, Asp .net, Clarion, Clipper, Clos, Clu, Cobol, Coldfusion, Delphi, Dylan, Eiffel, Forth, Fortran, Haskell, Hermes, Icon, Idl, Java, Java script, Jscript .net, Jcl, Linoleum, Lisp, Lotus, Limbo, Logo, Ml, Mumps, Oberon, Postscript, Pop, Pl1, Prolog, Python, Ruby, Pascal, Perl, Php, Rebol, Rexx, Sed, Sather, Scheme, Smalltalk, Tcl, Vhdl, Vrml, Visual basic, Visual basic .net, Yorick, Mysql, Omnis, Postgresql, Xbase, Access, Oracle, Adabas, Berkeley, Btrieve, Filemaker, Gupta, Db2, Informix, Ingres, Mssql server, Object, Olap, Paradox, Rdb, Revelation, Sybase, Theory, Dbase, Html, Java script, Css, Flash, Photoshop, Corel script, Xml, Tech, Beos, Gem, Hp48, Hpux, Linux, Mac, Ms-dos, Os2, Palm, Solaris, Ti99, Windows, Xenix, Aos, Chorus, Geos, Inferno, Lantastic, Lynx, Mach, Minix, Netware, Os9, Parix, Plan9, Psos, Qnx, Xinu, Sco, Unix, Aix, Aux, 386bsd, Bsdi, Freebsd, Netbsd, Openbsd, Ultrix, Amd, Intel, Aptiva, Buz, Deals, Homebuilt, Overclocking, Programming, Extra forums


Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666