void Counters::Recalculate(FramesDocument* doc) { if (need_recalculate) { need_recalculate = FALSE; for (Counter* counter = (Counter*) counter_list.First(); counter; counter = (Counter*) counter->Suc()) counter->Recalculate(doc); } }
void Counters::RemoveElement(HTML_Element* element) { if (counter_list.First()) for (Counter* counter = (Counter*) counter_list.First(); counter; counter = (Counter*) counter->Suc()) if (counter->RemoveElement(element)) need_recalculate = TRUE; }
Counter* Counters::GetCounter(const uni_char* name, unsigned int name_length) { for (Counter* counter = (Counter*) counter_list.First(); counter; counter = (Counter*) counter->Suc()) if (name_length == counter->GetNameLength() && uni_strncmp(counter->GetName(), name, name_length) == 0) return counter; return NULL; }