Main Page Class Hierarchy Alphabetical List Compound List Examples

mailboxlist.h
1/***************************************************************************
2 copyright : (C) 2002-2008 by Stefano Barbato
3 email : stefano@codesink.org
4
5 $Id: mailboxlist.h,v 1.12 2008-10-07 11:06:27 tat Exp $
6 ***************************************************************************/
7#ifndef _MIMETIC_RFC822_MAILBOXLIST_H_
8#define _MIMETIC_RFC822_MAILBOXLIST_H_
9#include <string>
10#include <vector>
11#include <mimetic/utils.h>
12#include <mimetic/rfc822/mailbox.h>
13
14
15 namespace mimetic
16{
17/// List of Mailbox objects
18/*!
19 MailboxList class is a container class that holds Mailbox objects
20
21 \code
22 const char* str = "dest@domain.com, friends: one@friends.net, "
23 "two@friends.net;, last@users.com";
24 MailboxList aList(str);
25 MailboxList::const_iterator bit(aList.begin()), eit(aList.end());
26 for(; bit != eit; ++bit)
27 {
28 cout << *bit;
29 }
30 \endcode
31
32 \sa <a href="../RFC/rfc822.txt">RFC822</a>
33 */
34 struct MailboxList: public FieldValue, public std::vector<Mailbox>
35{
36 MailboxList();
37 MailboxList(const char*);
38 MailboxList(const std::string&);
39 MailboxList(const std::string&, const std::string&);
40
41 std::string str() const;
42 protected:
43 FieldValue* clone() const;
44 private:
45 void set(const std::string&);
46 istring m_name;
47};
48
49
50
51}
52
53#endif
mimetic
Definition body.h:18