Hi,

On Wed, 2008-05-07 at 13:06 -0500, Carsten Neumann wrote:
>       Hi Gerrit,
> 
> Gerrit Voss wrote:

> > - Old XXPtr typedefs and NullFC are gone
> > 
> >   Mainly because I want to reuse them to get the 1.x compat stuff right.
> >   NullFC for example has the problem that it is used as OSG::NullFC by
> >   1.x app code and this does not work well with the 2.x 
> >   #define NullFC NULL.
> 
> so the right way to test this is to compare with NULL, yes ?

Yes. I wasn't happy with NullFC as it should have been NullFCPtr
all along. As we switched back to more conventional structures,
e.g. std c ptr and some RefPtrs I don't see the need for a special NULL
thing.

> And what is the preferred way to refer to SomeContainer * ? 
> SomeContainer * or SomeContainerCPtr or SomeContainer::ObjCPtr ?

I would go for SomeContainer * as soon as you do SomeContainerCPtr
you have to add at lease ConstSomeContainerCPtr. And SomeContainer *
make it extra clear that there is no magic behind this ptr.

The remaining ObjCPtr are left because they are used as template
parameters and the template refers to ObjCPtr. I might take them
out at some point in time but was more focused on the XXPtr and NullFC
stuff right now.

> >   Similar the old Ptr typedef would be C ptrs now and keeping them this
> >   way will interfere with the RefCounting as during porting the compiler
> >   complains only about the initial XXPtr = XX::create() assignments.
> >   
> > Hope I did not miss any major point, so any comments ??
> 
> - the ability to get either a reference or a pointer to field is gone, 
> the {get|edit}{SF|MF}<FieldName>() accessors always return pointers 
> (this is not new) and the {get|edit}<FieldName> accessors are gone. Just 
> mentioning it, as it requires (basically) mechanical changes in 
> potentionally many spots.

Ah ok, I took them out because they are basically a duplication of the 
getXFBar *, editXFBar * functions. 

I haven't hat time to fix up the 1.x compat stuff, so some of the old
reference returning function will come back if 1.x compat is enabled.

Mainly it's the 2.x interface for now, but I have my 1.x test case lined
up so I will look at this soon. But I have to finish something else
first.

> > PS: There are still some open issues, e.g. completion of the generic
> >     interface, DynFieldAttachment stuff but these usually are not the
> >     central interface pieces.
> > 
> >     But I'm running already really late on other things I have to 
> >     finish, so I want to put this out and collect some feedback while
> >     doing other stuff.
> 
> Later I'll commit two patches (also attached), one to add a missing 
> c'tor to RefCountPtr<> and remove one redundant one; the other one fixes 
> the unittests (expect maybe 
> Source/System/NodeCores/Drawables/Geometry/Base/WS/OSGGeometryTest.cpp 
> which has additional changes here and will be committed separately).

ah right, the test cases sat somewhere on my todo list.

kind regards,
 gerrit



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Opensg-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-core

Reply via email to