KDevelop API Documentation

codemodel_treeparser.cpp

Go to the documentation of this file.
00001 /* This file is part of KDevelop
00002     Copyright (C) 2003 Roberto Raggi <roberto@kdevelop.org>
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License as published by the Free Software Foundation; either
00007     version 2 of the License, or (at your option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public License
00015     along with this library; see the file COPYING.LIB.  If not, write to
00016     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00017     Boston, MA 02111-1307, USA.
00018 */
00019 
00020 #include "codemodel.h"
00021 #include "codemodel_treeparser.h"
00022 
00023 CodeModelTreeParser::CodeModelTreeParser( )
00024 {
00025 }
00026 
00027 CodeModelTreeParser::~CodeModelTreeParser( )
00028 {
00029 }
00030 
00031 void CodeModelTreeParser::parseCode( const CodeModel * model )
00032 {
00033     const FileList fileList = model->fileList();
00034     for( FileList::ConstIterator it=fileList.begin(); it!=fileList.end(); ++it )
00035      parseFile( *it );
00036 }
00037 
00038 void CodeModelTreeParser::parseFile( const FileModel * file )
00039 {
00040     const NamespaceList namespaceList = file->namespaceList();
00041     const ClassList classList = file->classList();
00042     const FunctionList functionList = file->functionList();
00043     const FunctionDefinitionList functionDefinitionList = file->functionDefinitionList();
00044     const VariableList variableList = file->variableList();
00045     
00046     for( NamespaceList::ConstIterator it=namespaceList.begin(); it!=namespaceList.end(); ++it )
00047      parseNamespace( *it );
00048     for( ClassList::ConstIterator it=classList.begin(); it!=classList.end(); ++it )
00049      parseClass( *it );
00050     for( FunctionList::ConstIterator it=functionList.begin(); it!=functionList.end(); ++it )
00051      parseFunction( *it );
00052     for( FunctionDefinitionList::ConstIterator it=functionDefinitionList.begin(); it!=functionDefinitionList.end(); ++it )
00053      parseFunctionDefinition( *it );
00054     for( VariableList::ConstIterator it=variableList.begin(); it!=variableList.end(); ++it )
00055      parseVariable( *it );
00056 }
00057 
00058 void CodeModelTreeParser::parseNamespace( const NamespaceModel * ns )
00059 {
00060     const NamespaceList namespaceList = ns->namespaceList();
00061     const ClassList classList = ns->classList();
00062     const FunctionList functionList = ns->functionList();
00063     const FunctionDefinitionList functionDefinitionList = ns->functionDefinitionList();
00064     const VariableList variableList = ns->variableList();
00065     
00066     for( NamespaceList::ConstIterator it=namespaceList.begin(); it!=namespaceList.end(); ++it )
00067      parseNamespace( *it );
00068     for( ClassList::ConstIterator it=classList.begin(); it!=classList.end(); ++it )
00069      parseClass( *it );
00070     for( FunctionList::ConstIterator it=functionList.begin(); it!=functionList.end(); ++it )
00071      parseFunction( *it );
00072     for( FunctionDefinitionList::ConstIterator it=functionDefinitionList.begin(); it!=functionDefinitionList.end(); ++it )
00073      parseFunctionDefinition( *it );
00074     for( VariableList::ConstIterator it=variableList.begin(); it!=variableList.end(); ++it )
00075      parseVariable( *it );
00076 }
00077 
00078 void CodeModelTreeParser::parseClass( const ClassModel * klass )
00079 {
00080     const ClassList classList = klass->classList();
00081     const FunctionList functionList = klass->functionList();
00082     const FunctionDefinitionList functionDefinitionList = klass->functionDefinitionList();
00083     const VariableList variableList = klass->variableList();
00084     
00085     for( ClassList::ConstIterator it=classList.begin(); it!=classList.end(); ++it )
00086      parseClass( *it );
00087     for( FunctionList::ConstIterator it=functionList.begin(); it!=functionList.end(); ++it )
00088      parseFunction( *it );
00089     for( FunctionDefinitionList::ConstIterator it=functionDefinitionList.begin(); it!=functionDefinitionList.end(); ++it )
00090      parseFunctionDefinition( *it );
00091     for( VariableList::ConstIterator it=variableList.begin(); it!=variableList.end(); ++it )
00092      parseVariable( *it );
00093 }
00094 
00095 void CodeModelTreeParser::parseFunction( const FunctionModel * /*fun*/ )
00096 {
00097 }
00098 
00099 void CodeModelTreeParser::parseFunctionDefinition( const FunctionDefinitionModel * /*fun*/ )
00100 {
00101 }
00102 
00103 void CodeModelTreeParser::parseVariable( const VariableModel * /*var*/ )
00104 {
00105 }
00106 
00107 
00108 
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:03:52 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003