THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/12/2010 at 02:52, xxxxxxxx wrote:
Hi both !
Thanks for helping.
c4dJack :
Here is my GetVirtualObject() dirty check for now.
BaseObject *cd=NULL,*orig=op->GetDown();
op->NewDependenceList();
Bool dirty = op->CheckCache(hh) || op->IsDirty(DIRTY_DATA)||op->IsDirty(DIRTY_CACHE);
for (cd=orig; cd; cd=cd->GetNext())
{
op->AddDependence(hh,cd);
}
if (!dirty) dirty = !op->CompareDependenceList();
op->TouchDependenceList();
if (!dirty) return op->GetCache(hh);
if (dirty)
{
Main code
}
kuroyume
ok it seems like it is what i need but I can't get it work. Do you mean :
If there are no children, pass nothing back (or whatever is default) :
if (!op->GetDown()) {default code};
If there are and nothing is being changed, pass the hierarchy as is (typically the result of GetAndCheckHierarchyClone() for instance).
if (op->GetDown())
{
op->NewDependenceList();
Bool dirty = op->CheckCache(hh) || op->IsDirty(DIRTY_DATA)||op->IsDirty(DIRTY_CACHE);
for (cd=orig; cd; cd=cd->GetNext())
{
op->AddDependence(hh,cd);
}
if (!dirty) dirty = !op->CompareDependenceList();
op->TouchDependenceList();
if (!dirty) return op->GetAndCheckHierarchyClone();
?
Thanks
Mike