From: Marek V. <mvo...@ce...> - 2004-02-25 12:04:56
|
Hele Stepane, co teda tohle? Je zrejme, ze stavajici system nefunguje, protoze vsechny typy pointeru musi byt v podstromu stejne. Pro me neni problem pri incializaci vsude pridat |= REPFLAGS_MIGRATE, kde je potreba (prace na 5 min). Muselo by se to ale upravit v dokumentaci a v IDL prekladaci vubec na ptr_repflags nesahat. -- Markoid > > Porad tomu na urovni IDL neduveruju. Myslis neco jako: > > if( property->contains_strong_pointer() && property->ptr_repflags == > NONE ) > > propert->ptr_repflags = strongptr_repflags; > > Je to urcite spravne? contains_strong_pointer() znamena, ze nekde uvnitr > te > > property je strong pointer, ale muzou tam byt i jine pointery. > > Zrejme pokud tedka udelam neco jako PArray< PPair< PPointer<Object>, > PWeakPointer<Object> >, tak to bude zjevne blbe, protoze ptr_repflags > nastavim pro to vnejsi pole a az se do pole vlozi ten PPair, tak se na nem > zavola initialize_from_owner( ...ptr_repflags ), ktere se bude propagovat > jak do toho PPointeru tak PWeakPointeru. Takze na urovni IDL tohle resit > nelze jinak nez vyzadovat, ze vsechny pointery v podstrome budou mit stejne > ptr_repflags. Pokud by to tak bylo, pak se pri analyze vytvori syntetizovany > atribut "has strong pointer" a ten se propaguje do prvni property, kde lze > nastavit. > > > Rozhodne pokud by tam neco bylo, pak to hodi i warning s tim, ze bys to > radeji > > mel nastavit rucne. > > > > [btw. na urovni pointeru to jde udelat v pohode. Zverejnit > strongptr_repflags > > je trivi, a stejne bys klidne mohl pouzit MIGRATE,0 natvrdo a nikomu by to > > nevadilo] > > Ano, to by slo a resilo by to ten pripad PArray<PPair<>>, kdy by se treba > definitoricky reklo, ze ptr_repflags specifikovane v IDL nejsou presne > repflags, ale skutecne ptr_repflags, ktere se pouziji budou podle > ptr_repflags |= ptr_repfalgs_podle_IDL | ( is_strong() ? REPFLAGS_MIGRATE : > 0 ); Pak by IDL nikdy REPFLAGS_MIGRTE nenastavovalo samo, ani pro plain > strong pointery. > > -- Markoid > > |