/*************************************************************************** * * * begin : 15 Jan 2004 * * copyright : (C) 2003 by Samokhvalov Anton :) * * * ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "Index.h" Index::Index() { } Index::~Index() throw () { } void Index::add( const std::string& key, TopicLeaf* leaf ) { d_map[ key ] = leaf; } TopicLeaf* Index::find( const std::string& key ) { std::map< std::string, TopicLeaf* >::const_iterator it = d_map.find( key ); if ( it != d_map.end() ) { return it->second; } return 0; }