Hi,
On Fri, 2008-04-04 at 00:01 +0800, Gerrit Voss wrote:
> Hi,
>
> anybody using the 2.x svn/trunk seriously right now ?
>
>
> We intent to start pushing the refptr stuff and it might
> be a slightly bumpy ride.
took a while but the bumpiest part should be over, so I will
call the current head an Interface Alpha and would like to call
for some comments.
The major changes (besides some cleanups) where mostly described
by Carsten already. So here just a short summary:
- The fields handle all the refcounting and linking (e.g. parent/child)
- If there are no constraints on the fields, like custom access
or NULL checks forced by the container, fields can be written
directly.
- Create functions return transit ptrs which behave much like
std autoptrs in that they loose ownership if the show up on
the right hand side.
- There are 4 types of refcounted fields
XFRecXXPtr -> recorded (create changelist entry) RefCounts
XFRecXXPtr -> unrecorded (no changelist entry) RefCounts
XFWeakXXPtr -> weak (no changelist entry) RefCounts
XFUncountedXXPtr -> no refcounts at all
plus specialised child / parent field types that can handle the
linking
- There also are the corresponding ref ptrs, mainly for the
app to use:
XXTransitPtr -> autoptr like, used as return type by create functions
XXRecPtr -> recorded (create changelist entry) RefCounts
XXUnrecPtr -> unrecorded (no changelist entry) RefCounts
XXWeakPtr -> weak (no changelist entry) RefCounts
XXMTRecPtr -> recorded (create changelist entry) RefCounts, plus
automatic to aspect conversion, much like the old
FCPtr.
There are two alias typedefs:
XXRefPtr for XXRecPtr
XXMTRefPtr for XXMTRecPtr
For storage, applications should use either XXRefPtr or XXMTRefPtr
depending on if they want to do the aspect conversion at there
convenience or let the system do it.
Please note, in order to traverse for example a tree in a given aspect
only the root node has to be converted. Once inside an aspect all the
linkage will be correct for this aspect (this is done behind the scenes
by the mt sync).
Later on, the application might want to optimise the changelist not
to include temporary refcounts for things that end up inside OpenSG
structures anyway. For these cases the application might want to switch
to XXUnrecRefPtrs. But if unsure stick to the XXRefPtrs first and
optimize later.
- 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.
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 ??
kind regards,
gerrit
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.
-------------------------------------------------------------------------
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