On 2/7/07, Gerrit Voss <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> On Wed, 2007-02-07 at 12:38 +0100, Carsten Neumann wrote:
> >       Hi Gerrit,
> >
>
> > yes, it does. Actually it looks strange either way, but I think I just
> > understood the idea. The dynamically added fields are supposed to be at
> > index 0,1,... of the vector _dynFieldsV and the code assumed that
> > _localType.addDescription returns an index >= Inherited::NextFieldId so
> > the "-" was used to shift that index. But _localType does not know about
> >  the inherited fields and thus returns indices starting from 0 (or maybe
> > 1 -- didn't check that part).
>
> that is the main problem. _localtype should know about all the fields
> and than the - makes sense (as it did in 1.8).

It appears that this is not working because the ReflexiveContainerType
copy constructor is not copying the description map and vector. Later
when calling _localType.initialize() nothing gets done because the
type's _bInitialized flag is copied in the TypeBase copy constructor.

ReflexiveContainerType::ReflexiveContainerType(
    ...
    _mDescMap      (                      ),
    _vDescVec      (                      ),
    _descInsertFunc(source._descInsertFunc)

TypeBase::TypeBase(const TypeBase &source) :
    ...
    _bInitialized(source._bInitialized)


If I add the following to the DynFieldAttachment constructor things
get a little better. At least the indexing makes a little more sense.

template <class AttachmentDescT> inline
DynFieldAttachment<AttachmentDescT>::DynFieldAttachment(void) :
     Inherited (           ),
    _localType (Self::_type),
    _dynFieldsV(           )
{
    _localType.initialize();
    // XXX: This needs to be done so we know about our parent fields.
    _localType.initParentFields();
    _localType.initFields();
}

I don't know if this helps, or is even close to the correct way of
doing this. But I am just trying things at this point.

Thanks,
Aron

> I should be able to fix this later today. But the whole thing will not
> work with aspects and the cluster part right now. So the added fields
> will stay local. This it, I guess, why it was not finished.
>
>
> > So maybe the real problem is that the DynamicAttachment needs two type
> > objects (one per type like any other fc and the per instance one) where
> > the per instance one "extends" the per type one. What would we the best
> > way to achieve that ?
>
> it needs the two type objects but this is only a minor part of the
> problem.
>
> regards,
>   gerrit

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to