Main Page Class Hierarchy Alphabetical List Compound List Examples |
00001 /*************************************************************************** 00002 copyright : (C) 2002-2005 by Stefano Barbato 00003 email : [email protected] 00004 00005 $Id: mailboxlist_8h-source.html,v 1.4 2006-03-12 12:28:31 tat Exp $ 00006 ***************************************************************************/ 00007 00008 /*************************************************************************** 00009 * * 00010 * This program is free software; you can redistribute it and/or modify * 00011 * it under the terms of the GNU General Public License as published by * 00012 * the Free Software Foundation; either version 2 of the License, or * 00013 * (at your option) any later version. * 00014 * * 00015 ***************************************************************************/ 00016 #ifndef _MIMETIC_RFC822_MAILBOXLIST_H_ 00017 #define _MIMETIC_RFC822_MAILBOXLIST_H_ 00018 #include <string> 00019 #include <vector> 00020 #include <mimetic/utils.h> 00021 #include <mimetic/rfc822/mailbox.h> 00022 00023 00024 namespace mimetic 00025 { 00026 /// List of Mailbox objects 00027 /*! 00028 MailboxList class is a container class that holds Mailbox objects 00029 00030 \code 00031 const char* str = "[email protected], friends: [email protected], " 00032 "[email protected];, [email protected]"; 00033 MailboxList aList(str); 00034 MailboxList::const_iterator bit(aList.begin()), eit(aList.end()); 00035 for(; bit != eit; ++bit) 00036 { 00037 cout << *bit; 00038 } 00039 \endcode 00040 00041 \sa <a href="../RFC/rfc822.txt">RFC822</a> 00042 */ 00043 struct MailboxList: public FieldValue, public std::vector<Mailbox> 00044 { 00045 MailboxList(); 00046 MailboxList(const char*); 00047 MailboxList(const std::string&); 00048 MailboxList(const std::string&, const std::string&); 00049 00050 std::string str() const; 00051 protected: 00052 FieldValue* clone() const; 00053 private: 00054 void set(const std::string&); 00055 istring m_name; 00056 }; 00057 00058 00059 00060 } 00061 00062 #endif