| 126 | } |
| 127 | |
| 128 | void DialogDeclBrowser::AddDeclTypeToTree( declType_t type, const char *root, CPathTreeCtrl &tree ) { |
| 129 | int i; |
| 130 | idList<const idDecl*> decls; |
| 131 | idPathTreeStack stack; |
| 132 | idStr rootStr, declName; |
| 133 | |
| 134 | decls.SetNum( declManager->GetNumDecls( type ) ); |
| 135 | for ( i = 0; i < decls.Num(); i++ ) { |
| 136 | decls[i] = declManager->DeclByIndex( type, i, false ); |
| 137 | } |
| 138 | decls.Sort( idListDeclSortCompare ); |
| 139 | |
| 140 | rootStr = root; |
| 141 | rootStr += "/"; |
| 142 | |
| 143 | stack.PushRoot( NULL ); |
| 144 | |
| 145 | for ( i = 0; i < decls.Num(); i++) { |
| 146 | declName = rootStr + decls[i]->GetName(); |
| 147 | |
| 148 | declName.BackSlashesToSlashes(); |
| 149 | declName.Strip(' '); |
| 150 | |
| 151 | tree.AddPathToTree( declName, GetIdFromTypeAndIndex( type, decls[i]->Index() ), stack ); |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | /* |
| 156 | ================ |
nothing calls this directly
no test coverage detected