|
|
|
<HTML>
|
|
|
|
<HEAD>
|
|
|
|
<TITLE> DwMechanism Man Page </TITLE>
|
|
|
|
</HEAD>
|
|
|
|
<BODY BGCOLOR="#FFFFFF">
|
|
|
|
<H2>
|
|
|
|
<FONT COLOR="navy"> NAME </FONT>
|
|
|
|
</H2>
|
|
|
|
<P>
|
|
|
|
DwMechanism -- Class representing a MIME content-transfer-encoding field-body
|
|
|
|
<H2>
|
|
|
|
<FONT COLOR="navy"> SYNOPSIS </FONT>
|
|
|
|
</H2>
|
|
|
|
<PRE>class DW_EXPORT DwMechanism : public <A HREF="fieldbdy.html">DwFieldBody</A> {
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
<A HREF="mechansm.html#DwMechanism">DwMechanism</A>();
|
|
|
|
<A HREF="mechansm.html#DwMechanism">DwMechanism</A>(const DwMechanism& aCte);
|
|
|
|
<A HREF="mechansm.html#DwMechanism">DwMechanism</A>(const DwString& aStr, DwMessageComponent* aParent=0);
|
|
|
|
virtual ~DwMechanism();
|
|
|
|
const DwMechanism& <A HREF="mechansm.html#op_eq">operator =</A> (const DwMechanism& aCte);
|
|
|
|
virtual void <A HREF="mechansm.html#Parse">Parse</A>();
|
|
|
|
virtual void <A HREF="mechansm.html#Assemble">Assemble</A>();
|
|
|
|
virtual DwMessageComponent* <A HREF="mechansm.html#Clone">Clone</A>() const;
|
|
|
|
int <A HREF="mechansm.html#AsEnum">AsEnum</A>() const;
|
|
|
|
void <A HREF="mechansm.html#FromEnum">FromEnum</A>(int aCte);
|
|
|
|
static DwMechanism*
|
|
|
|
<A HREF="mechansm.html#NewMechanism">NewMechanism</A>(const DwString& aStr, DwMessageComponent* aParent);
|
|
|
|
static DwMechanism*
|
|
|
|
(*<A HREF="mechansm.html#sNewMechanism">sNewMechanism</A>)(const DwString&, DwMessageComponent*);
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
virtual void <A HREF="mechansm.html#PrintDebugInfo">PrintDebugInfo</A>(ostream& aStrm, int aDepth=0) const;
|
|
|
|
virtual void <A HREF="mechansm.html#CheckInvariants">CheckInvariants</A>() const;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
void _PrintDebugInfo(ostream& aStrm) const;
|
|
|
|
};
|
|
|
|
</PRE>
|
|
|
|
<H2>
|
|
|
|
<FONT COLOR="navy"> DESCRIPTION </FONT>
|
|
|
|
</H2>
|
|
|
|
<P>
|
|
|
|
<B><TT>DwMechanism</TT></B> represents a field body for the
|
|
|
|
Content-Transfer-Encoding header field as described in RFC-2045.
|
|
|
|
<B><TT>DwMechanism</TT></B> provides convenience functions that allow you
|
|
|
|
to set or get the content-transfer-encoding attribute as an enumerated value.
|
|
|
|
<H2>
|
|
|
|
<FONT COLOR="navy"> Public Member Functions </FONT>
|
|
|
|
</H2>
|
|
|
|
<P>
|
|
|
|
<FONT COLOR="teal"><B> <A NAME="DwMechanism">DwMechanism</A>() <BR>
|
|
|
|
DwMechanism(const DwMechanism& aCte) <BR>
|
|
|
|
DwMechanism(const DwString& aStr, DwMessageComponent* aParent=0)
|
|
|
|
</B></FONT>
|
|
|
|
<P>
|
|
|
|
The first constructor is the default constructor, which sets the
|
|
|
|
<B><TT>DwMechanism</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 from <B><TT>aCte</TT></B>. The parent of the new
|
|
|
|
<B><TT>DwMechanism</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>DwMechanism</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>
|
|
|
|
<FONT COLOR="teal"><B> const DwMechanism& <A NAME="op_eq">operator =</A>
|
|
|
|
(const DwMechanism& aCte) </B></FONT>
|
|
|
|
<P>
|
|
|
|
This is the assignment operator, which performs a deep copy of
|
|
|
|
<B><TT>aCte</TT></B>. The parent node of the <B><TT>DwMechanism</TT></B>
|
|
|
|
object is not changed.
|
|
|
|
<P>
|
|
|
|
<FONT COLOR="teal"><B> virtual void <A NAME="Parse">Parse</A>() </B></FONT>
|
|
|
|
<P>
|
|
|
|
This virtual function, inherited from <B><TT>DwMessageComponent</TT></B>,
|
|
|
|
executes the parse method for <B><TT>DwMechanism</TT></B> objects. It should
|
|
|
|
be called immediately after the string representation is modified and before
|
|
|
|
any of the object's attributes are retrieved.
|
|
|
|
<P>
|
|
|
|
This function clears the is-modified flag.
|
|
|
|
<P>
|
|
|
|
<FONT COLOR="teal"><B> virtual void <A NAME="Assemble">Assemble</A>()
|
|
|
|
</B></FONT>
|
|
|
|
<P>
|
|
|
|
This virtual function, inherited from <B><TT>DwMessageComponent</TT></B>,
|
|
|
|
executes the assemble method for <B><TT>DwMechanism</TT></B> objects. It
|
|
|
|
should be called whenever one of the object's attributes is changed in order
|
|
|
|
to assemble the string representation. It will be called automatically for
|
|
|
|
this object by the parent object's <B><TT>Assemble()</TT></B> member function
|
|
|
|
if the is-modified flag is set.
|
|
|
|
<P>
|
|
|
|
This function clears the is-modified flag.
|
|
|
|
<P>
|
|
|
|
<FONT COLOR="teal"><B> virtual DwMessageComponent*
|
|
|
|
<A NAME="Clone">Clone</A>() const </B></FONT>
|
|
|
|
<P>
|
|
|
|
This virtual function, inherited from <B><TT>DwMessageComponent</TT></B>,
|
|
|
|
creates a new <B><TT>DwMechanism</TT></B> object on the free store that has
|
|
|
|
the same value as this <B><TT>DwMechanism</TT></B> object. The basic idea
|
|
|
|
is that of a virtual copy constructor.
|
|
|
|
<P>
|
|
|
|
<FONT COLOR="teal"><B> int <A NAME="AsEnum">AsEnum</A>() const </B></FONT>
|
|
|
|
<P>
|
|
|
|
Returns the content transfer encoding as an enumerated value. Enumerated
|
|
|
|
values are defined for all standard content transfer encodings in the file
|
|
|
|
enum.h. If the content transfer encoding is non-standard
|
|
|
|
<B><TT>DwMime::kCteUnknown</TT></B> is returned. The inherited member function
|
|
|
|
<B><TT>DwMessageComponent::AsString()</TT></B> may be used to get the content
|
|
|
|
transfer encoding, standard or non-standard, as a string.
|
|
|
|
<P>
|
|
|
|
<FONT COLOR="teal"><B> void <A NAME="FromEnum">FromEnum</A>(int aCte)
|
|
|
|
</B></FONT>
|
|
|
|
<P>
|
|
|
|
Sets the content transfer encoding from an enumerated value. Enumerated values
|
|
|
|
are defined for all standard content transfer encodings in the file enum.h.
|
|
|
|
You may set the content transfer encoding to any string value, standard or
|
|
|
|
non-standard, by using the inherited member function
|
|
|
|
<B><TT>DwMessageComponent::FromString()</TT></B>.
|
|
|
|
<P>
|
|
|
|
<FONT COLOR="teal"><B> static DwMechanism*
|
|
|
|
<A NAME="NewMechanism">NewMechanism</A>(const DwString& aStr,
|
|
|
|
DwMessageComponent* aParent) </B></FONT>
|
|
|
|
<P>
|
|
|
|
Creates a new <B><TT>DwMechanism</TT></B> object on the free store. If the
|
|
|
|
static data member <B><TT>sNewMechanism</TT></B> is <B><TT>NULL</TT></B>,
|
|
|
|
this member function will create a new <B><TT>DwMechanism</TT></B> and return
|
|
|
|
it. Otherwise, <B><TT>NewMechanism()</TT></B> will call the user-supplied
|
|
|
|
function pointed to by <B><TT>sNewMechanism</TT></B>, which is assumed to
|
|
|
|
return an object from a class derived from <B><TT>DwMechanism</TT></B>, and
|
|
|
|
return that object.
|
|
|
|
<P>
|
|
|
|
<FONT COLOR="teal"><B> virtual void
|
|
|
|
<A NAME="PrintDebugInfo">PrintDebugInfo</A>(ostream& 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"> Public Data Members </FONT>
|
|
|
|
</H2>
|
|
|
|
<P>
|
|
|
|
<FONT COLOR="teal"><B> static DwMechanism*
|
|
|
|
(*<A NAME="sNewMechanism">sNewMechanism</A>)(const DwString&,
|
|
|
|
DwMessageComponent*) </B></FONT>
|
|
|
|
<P>
|
|
|
|
If <B><TT>sNewMechanism</TT></B> is not <B><TT>NULL</TT></B>, it is assumed
|
|
|
|
to point to a user-supplied function that returns an object from a class
|
|
|
|
derived from <B><TT>DwMechanism</TT></B>.
|
|
|
|
<P>
|
|
|
|
</BODY></HTML>
|