Usenet.com

www.Usenet.com

Group Index

Comp Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

Re: valuetype generators



[EMAIL PROTECTED] (dan kuwachi) wrote in message news:<[EMAIL PROTECTED]>...
> Here is a sample...:
> 
> module Bank {
>      valuetype EmployeePK{
>         public string ssn;
>     };
> };
> 
> 
> This is the impl in java you need to generate:
> public class EmployeePKImpl
> {
>   EmployeePKImpl();
> }
> 
> 
> 
> 
> This is the default factory file you have to edit:
> 
> public class EmployeePKDefaultFactory implements
> org.omg.CORBA.portable.ValueFactory {
>   public java.io.Serializable read_value
> (org.omg.CORBA_2_3.portable.InputStream is) {
> 
> 
>     // INSTANTIATE IMPLEMENTATION CLASS ON THE LINE BELOW:
>     java.io.Serializable val = new EmployeePKImpl; <-- changed this
> line
> 
>     //throw new org.omg.CORBA.NO_IMPLEMENT(); <-- commented this line
>     return is.read_value(val);   <-- uncommented this line
>   }
>  
> }
> 
> thanks,
> -dan
> 

  IMHO, it is work for simple perl script. Parsing techniques is
overkill there.

something in style

$*=~/\/\/is.read_value(val);/is_read_value(val)/;
$*=~/throw new org.omg.CORBA.NO_IMPLEMENT();/\/\/throw new
org.omg.CORBA.NO_IMPLEMENT();/;

.. 
    


> 
> M Khomo <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> > dan kuwachi wrote:
> > > hi everyone,
> > > 
> > > Is there any tool out there that generates the impl and the
> > > defaultFactory file for Java, C++, and Ada?  For example, as I am sure
> > > you know, if you run an idl compiler against an idl file for Java, it
> > > will generate the defaultfactory file.  The only problem, is that you
> > > have to comment, and uncomment certain lines so the default factory
> > > file does not throw exceptions.
> > 
> > You have a sample of these to show?
> > 
> >   Also, the user has to manually
> > > generate the impl file.
> > 
> > ditto ?
> > 
> > > If there were only one or two valuetypes, it wouldn't kill a developer
> > > to do it by hand.  However, we have hundreds of valuetypes and need
> > > some way of automating the process.  We are thinking of either doing
> > > it by hand, or looking for some tool available on the web.
> > 
> > A third possibility would be to use javacc to satisfy each of the above.
> > If you're strictly seeking tools, and javacc does not strike you as one, 
> > then sorry; can't help there.
> > 
> > > If anyone has any suggestions on this mb, it would be greatly
> > > appreciated.
>  
> > > 
> > > Thanks,
> > > -dan



<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com



Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.