You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdepim/mimelib/doc/address.html

154 lines
5.7 KiB

<HTML>
<HEAD>
<TITLE> DwAddress Man Page </TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H2>
<FONT COLOR="navy"> NAME </FONT>
</H2>
<P>
DwAddress -- Abstract class representing an RFC-822 address
<H2>
<FONT COLOR="navy"> SYNOPSIS </FONT>
</H2>
<PRE>class DW_EXPORT DwAddress : public <A HREF="fieldbdy.html">DwFieldBody</A> {
friend class DwAddressList;
public:
virtual ~DwAddress();
DwBool <A HREF="address.html#IsMailbox">IsMailbox</A>() const;
DwBool <A HREF="address.html#IsGroup">IsGroup</A>() const;
inline DwBool <A HREF="address.html#IsValid">IsValid</A>() const;
DwAddress* <A HREF="address.html#Next">Next</A>() const;
void <A HREF="address.html#SetNext">SetNext</A>(DwAddress* aAddress);
protected:
<A HREF="address.html#DwAddress">DwAddress</A>();
<A HREF="address.html#DwAddress">DwAddress</A>(const DwAddress&amp; aAddr);
<A HREF="address.html#DwAddress">DwAddress</A>(const DwString&amp; aStr, DwMessageComponent* aParent=0);
const DwAddress&amp; <A HREF="address.html#op_eq">operator =</A> (const DwAddress&amp; aAddr);
int mIsValid;
public:
virtual void <A HREF="address.html#PrintDebugInfo">PrintDebugInfo</A>(ostream&amp; aStrm, int aDepth=0) const;
virtual void <A HREF="address.html#CheckInvariants">CheckInvariants</A>() const;
protected:
void _PrintDebugInfo(ostream&amp; aStrm) const;
};
</PRE>
<H2>
<FONT COLOR="navy"> DESCRIPTION </FONT>
</H2>
<P>
<B><TT>DwAddress</TT></B> represents an <I>address</I> as described in RFC-822.
You may not instantiate objects of type <B><TT>DwAddress</TT></B>, since
<B><TT>DwAddress</TT></B> is an abstract base class. Instead, you must
instantiate objects of type
<B><TT><A HREF="mailbox.html">DwMailbox</A></TT></B> or
<B><TT><A HREF="group.html">DwGroup</A></TT></B>, which are subclasses of
<B><TT>DwAddress</TT></B>.
<P>
To determine the actual type of a <B><TT>DwAddress</TT></B> object, you can
use the member functions <B><TT>IsMailbox()</TT></B> and
<B><TT>IsGroup()</TT></B>.
<P>
If the string representation assigned to a <B><TT>DwAddress</TT></B> is
improperly formed, the parse method will fail. To determine if the parse
method failed, call the member function <B><TT>IsValid()</TT></B>.
<P>
A <B><TT>DwAddress</TT></B> object can be contained in list. To get the next
<B><TT>DwAddress</TT></B> object in the list, call the member function
<B><TT>Next()</TT></B>
<H2>
<FONT COLOR="navy"> Public Member Functions </FONT>
</H2>
<P>
<FONT COLOR="teal"><B> DwBool <A NAME="IsMailbox">IsMailbox</A>() const
</B></FONT>
<P>
Returns true value if this object is a <B><TT>DwMailbox</TT></B>.
<P>
<FONT COLOR="teal"><B> DwBool <A NAME="IsGroup">IsGroup</A>() const
</B></FONT>
<P>
Returns true value if this object is a <B><TT>DwGroup</TT></B>.
<P>
<FONT COLOR="teal"><B> inline DwBool <A NAME="IsValid">IsValid</A>() const
</B></FONT>
<P>
Returns true value if the last parse was successful. Returns false if the
last parse failed (bad address) or the <B><TT>Parse()</TT></B> member function
was never called.
<P>
<FONT COLOR="teal"><B> DwAddress* <A NAME="Next">Next</A>() const </B></FONT>
<P>
Returns the next <B><TT>DwAddress</TT></B> object in the list when the object
is included in a list of addresses. The function is used when iterating a
list.
<P>
<FONT COLOR="teal"><B> void <A NAME="SetNext">SetNext</A>(DwAddress* aAddress)
</B></FONT>
<P>
Sets the next <B><TT>DwAddress</TT></B> object in the list. This member function
generally should not be used, since <B><TT>DwAddressList</TT></B> has member
functions to manage its list of <B><TT>DwAddress</TT></B> objects.
<P>
<FONT COLOR="teal"><B> virtual void
<A NAME="PrintDebugInfo">PrintDebugInfo</A>(ostream&amp; aStrm, int aDepth=0)
const </B></FONT>
<P>
This virtual function, inherited from <B><TT>DwMessageComponent</TT></B>,
prints debugging information about this object to <B><TT>aStrm</TT></B>.
It will also call <B><TT>PrintDebugInfo()</TT></B> for any of its child
components down to a level of <B><TT>aDepth</TT></B>.
<P>
This member function is available only in the debug version of the library.
<P>
<FONT COLOR="teal"><B> virtual void
<A NAME="CheckInvariants">CheckInvariants</A>() const </B></FONT>
<P>
Aborts if one of the invariants of the object fails. Use this member function
to track down bugs.
<P>
This member function is available only in the debug version of the library.
<H2>
<FONT COLOR="navy"> Protected Member Functions </FONT>
</H2>
<P>
<B><FONT COLOR="teal"> <A NAME="DwAddress">DwAddress</A>() <BR>
DwAddress(const DwAddress&amp; aAddr) <BR>
DwAddress(const DwString&amp; aStr, DwMessageComponent* aParent=0)
</FONT></B>
<P>
The first constructor is the default constructor, which sets the
<B><TT>DwAddress</TT></B> object's string representation to the empty string
and sets its parent to <B><TT>NULL</TT></B>.
<P>
The second constructor is the copy constructor, which copies the string
representation and all attributes from <B><TT>aAddress</TT></B>. The parent
of the new <B><TT>DwAddress</TT></B> object is set to
<B><TT>NULL</TT></B>.
<P>
The third constructor copies <B><TT>aStr</TT></B> to the
<B><TT>DwAddress</TT></B> object's string representation and sets
<B><TT>aParent</TT></B> as its parent. The virtual member function
<B><TT>Parse()</TT></B> should be called immediately after this constructor
in order to parse the string representation. Unless it is
<B><TT>NULL</TT></B>, <B><TT>aParent</TT></B> should point to an object of
a class derived from <B><TT>DwField</TT></B>.
<P>
<B><FONT COLOR="teal"> const DwAddress&amp; <A NAME="op_eq">operator =</A>
(const DwAddress&amp; aAddr) </FONT></B>
<P>
This is the assignment operator, which performs a deep copy of
<B><TT>aAddr</TT></B>. The parent node of the <B><TT>DwAddress</TT></B> object
is not changed.
<P>
</BODY></HTML>