//----------------------------------------------------------------------------- // Purpose: Begins a depth-first search of the map heirarchy. // Input : pos - An iterator // Output : CMapClass //----------------------------------------------------------------------------- CMapClass *CMapClass::GetFirstDescendent(EnumChildrenPos_t &pos) { pos.nDepth = 0; pos.Stack[0].pParent = this; pos.Stack[0].pos = Children.GetHeadPosition(); if (pos.Stack[0].pos != NULL) { return(GetNextDescendent(pos)); } return(NULL); }
//----------------------------------------------------------------------------- // Purpose: Begins a depth-first search of the map heirarchy. // Input : pos - An iterator // Output : CMapClass //----------------------------------------------------------------------------- CMapClass *CMapClass::GetFirstDescendent(EnumChildrenPos_t &pos) { pos.nDepth = 0; pos.Stack[0].pParent = this; if ( m_Children.Count() ) { pos.Stack[0].pos = 0; return(GetNextDescendent(pos)); } else { pos.Stack[0].pos = -1; return NULL; } }