Main Page   Class Hierarchy   Alphabetical List   Compound List   Examples  
fieldvalue.h
1/***************************************************************************
2 copyright : (C) 2002-2008 by Stefano Barbato
3 email : stefano@codesink.org
4
5 $Id: fieldvalue.h,v 1.13 2008-10-07 11:06:26 tat Exp $
6 ***************************************************************************/
7#ifndef _MIMETIC_RFC822_FIELDVALUE_H_
8#define _MIMETIC_RFC822_FIELDVALUE_H_
9#include <string>
10#include <mimetic/strutils.h>
11
12namespace mimetic
13{
14
15
16/// Value of an header field (base class)
18{
19 FieldValue();
20 virtual ~FieldValue();
21 virtual void set(const std::string& val) = 0;
22 virtual std::string str() const = 0;
23 virtual FieldValue* clone() const = 0;
24 friend std::ostream& operator<<(std::ostream&, const FieldValue&);
25protected:
26 friend class Rfc822Header;
27 bool typeChecked() const;
28 void typeChecked(bool);
29private:
30 bool m_typeChecked;
31};
32
33/// Unstructured field value
35{
37 StringFieldValue(const std::string&);
38 void set(const std::string&);
39 std::string str() const;
40 const std::string& ref() const;
41 std::string& ref();
42protected:
43 FieldValue* clone() const;
44private:
45 std::string m_value;
46};
47
48}
49
50#endif
51
RFC822 header class object.
Definition rfc822/header.h:34
Definition body.h:18
Value of an header field (base class)
Definition fieldvalue.h:18
Unstructured field value.
Definition fieldvalue.h:35