dataformbase.cpp

00001 /*
00002   Copyright (c) 2005 by Jakob Schroeter <js@camaya.net>
00003   This file is part of the gloox library. http://camaya.net/gloox
00004 
00005   This software is distributed under a license. The full license
00006   agreement can be found in the file LICENSE in this distribution.
00007   This software may not be copied, modified, sold or distributed
00008   other than expressed in the named license agreement.
00009 
00010   This software is distributed without any warranty.
00011 */
00012 
00013 
00014 #include "dataformbase.h"
00015 
00016 
00017 namespace gloox
00018 {
00019 
00020   DataFormBase::DataFormBase()
00021   {
00022   }
00023 
00024   bool DataFormBase::hasField( const std::string& field )
00025   {
00026     FieldList::const_iterator it = m_fields.begin();
00027     for( ; it != m_fields.end(); ++it )
00028     {
00029       if( (*it).name() == field )
00030         return true;
00031     }
00032 
00033     return false;
00034   }
00035 
00036   DataFormField DataFormBase::field( const std::string& field )
00037   {
00038     FieldList::const_iterator it = m_fields.begin();
00039     for( ; it != m_fields.end(); ++it )
00040     {
00041       if( (*it).name() == field )
00042         return (*it);
00043     }
00044 
00045     return DataFormField();
00046   }
00047 
00048 }

Generated on Mon Jan 16 16:19:54 2006 for gloox by  doxygen 1.4.6