dataformbase.cpp

00001 /*
00002   Copyright (c) 2005-2006 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   DataFormBase::~DataFormBase()
00025   {
00026   }
00027 
00028   bool DataFormBase::hasField( const std::string& field )
00029   {
00030     FieldList::const_iterator it = m_fields.begin();
00031     for( ; it != m_fields.end(); ++it )
00032     {
00033       if( (*it).name() == field )
00034         return true;
00035     }
00036 
00037     return false;
00038   }
00039 
00040   DataFormField DataFormBase::field( const std::string& field )
00041   {
00042     FieldList::const_iterator it = m_fields.begin();
00043     for( ; it != m_fields.end(); ++it )
00044     {
00045       if( (*it).name() == field )
00046         return (*it);
00047     }
00048 
00049     return DataFormField();
00050   }
00051 
00052 }

Generated on Sun Sep 24 21:57:31 2006 for gloox by  doxygen 1.4.7