-void
-resetTemplate( Template tmpl ) {
- SFSDataIO out;
- GListCell *cell;
-
- SFSIteratorStart( &tmpl->variables );
-
- while( SFSIterate( &tmpl->variables, &out ) ) {
- VariableValue varval = *(VariableValue*) out.data;
-
- if ( varval->type >= valueInt )
- varval->flags &= ~TND_DEFINED;
- else if ( varval->type == LoopNode ) {
- TemplateNode node = (TemplateNode) varval;
-
- GListForeach( cell, node->nodeData.loop.listVarValues ) {
- varval = (VariableValue) GLCELL_DATA(cell);
-
- if ( varval->type == valuePointer )
- varval->value.ptrValue = NULL;
- }
-
- GListForeach( cell, node->nodeData.loop.listInstance ) {
- LoopInstance instance = GLCELL_DATA(cell);
-
- GListFree(instance->rowValues );
- }
- GListTruncate( node->nodeData.loop.listInstance, 0 );
- }
- }
-}
-