[Dynamite] Is this working now then?
Ewan Birney
birney@ebi.ac.uk
Mon, 6 Mar 2000 04:04:33 +0000 (GMT)
> On Sat, 4 Mar 2000, Ewan Birney wrote:
>
> > Cool. pf_namespace_Object_method (?)
>
> Um, yeah, it should probably be the same as the "vf_" syntax for virtual
> functions, whatever that was.
>
> We need Wiki ;-)
>
;)
> > > > ns_Object_debug_dump(FILE*); provides a debugging info for teh object
> > > > (????)
> > >
> > > This shouldn't be a standard, but most objects will end up having it
> > > anyway.
> > >
> >
> >
> > I think this should be standard. This is from attempting to debug
> > something through a Perl layer - you end wanting to be able to call
> > inside Perl a debug function, and be guarenteed to do it on every
> > object.
>
> Ok yes I'm convinced. I usually code debugging output anyway but have
> never made it a formal requirement before.
wait until you do one of these "through the interface" debugs. Yuk.
>
> I guess an object can always print a useless placeholder message like
> "[I am an ArseAdapter object]" if the coder can't be bothered.
>
> Random thought: perhaps the debug dump should return a string, rather than
> writing to a file pointer? In C++, I use stream buffers for this kind of
> thing (i.e. a string that effectively looks like a file to the caller) so
> it is easy to mix & match. Can we think of something equivalent? What is
> the IDL mapping for C's FILE*, anyway?
Annoying part of CORBA spec -
FILE's are not directly supported so you have to roll your own which
look like
interface MyReadFile {
string get_next_line; // undefined length. Yuk.
};
interface MyWriteFile {
void write_line(in string);
};
This drives everyone nuts and people roll their own all over the shop
(look at the Gnome bonoboo spec for an example of this. If we go for
file support inside our stuff - this is what we should use).
Re: string or FILE -
I settled on FILE because then you can have one dump easily chain
to the _dumps on its sub-object and everthing work well. Of course
strings are nicer for the smaller objects, files for the larger
ones.