I am trying to use OCAF function mechanism and have the following questions.
1.After I set an attribute at a particular label as Impacted or touched, the driver->MustExecute(log) will recognize that the relevant function has to be executed. But after the driver->Execute(log) is called if I call driver->MustExecute(log) again, it returns "true". Probably because the labels are still marked as touched/impacted. Is there a mechanism to unset the labels/attributes touched/impacted feature after execution? How does this work?
If I somehow unset these flags at the driver->Execute(log) function, another function at another node which has this label as a reference label will not identify that this label attribute is touched. However, I do not want the first_driver->MustExecute(log) to return "true" the second time also.
Note: I am setting "TFunction_Scope::Set(OcafDoc->Main());" when creating a new document in the main application and access the log book when I need it as follows.
Handle(TFunction_Scope) scope = TFunction_Scope::Set(OcafDoc->Main());
TFunction_Logbook& log = scope->GetLogbook();
2. Function iteration loop:
When I come to the function iteration loop my loop starts as follows.
int numThrds = iterator.GetMaxNbThreads(); //this gives me a zero value
However, the iterator doesn't find anything. It does not go in to the loop. I know there are function drivers attached to some of the labels because when I use the following loop it shows me the functions are attached at some labels.(the counter shows a +ve number at the end) & the log book has values set as impacted/touched.
int counter = 0;
for (TDF_ChildIterator it1(OcafDoc->Main(),Standard_True); it1.More(); it1.Next())
TDF_Label L1 = it1.Value();
Really appreciate any help & guidance.