Main Page   Class Hierarchy   Alphabetical List   Compound List   Examples  
Public Types | Public Member Functions | Static Public Attributes | Friends | List of all members
Field Struct Reference

Field class as defined by RFC822. More...

#include <field.h>

Public Types

typedef mimetic::istring istring
 

Public Member Functions

 Field (const std::string &)
 
 Field (const std::string &, const std::string &)
 
 Field (const Field &)
 
Fieldoperator= (const Field &)
 
void name (const std::string &)
 
const istring & name () const
 
void value (const std::string &)
 
std::string value () const
 
std::ostream & write (std::ostream &, unsigned int fold=0) const
 

Static Public Attributes

static const Field null
 

Friends

class Rfc822Header
 
std::ostream & operator<< (std::ostream &, const Field &)
 

Detailed Description

Field class as defined by RFC822.

Field class is a C++ representation of RFC822 header field. Use this class when you need to create or parse messages' header fields. Note that field name is case insensitive.

Parsing:

Rfc822::Field f1("X-My-Field: some text(with a trailing comment)");
cout << f.name() << endl;
cout << f.value() << endl;
cout << f.value(true) << endl; // canonicalize (see RFC822)

Building:

Rfc822::Field f;
f.name("X-Unknown");
f.value("some text(with a trailing comment)");
cout << f;
See Also
RFC822

The documentation for this struct was generated from the following file: