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/param.html

190 lines
7.8 KiB

<HTML>
<HEAD>
<TITLE> DwParameter Man Page </TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H2>
<FONT COLOR="navy"> NAME </FONT>
</H2>
<P>
DwParameter -- Class representing a MIME field body parameter
<H2>
<FONT COLOR="navy"> SYNOPSIS </FONT>
</H2>
<PRE>class DW_EXPORT DwParameter : public <A HREF="msgcmp.html">DwMessageComponent</A> {
friend class DwMediaType;
public:
<A HREF="param.html#DwParameter">DwParameter</A>();
<A HREF="param.html#DwParameter">DwParameter</A>(const DwParameter&amp; aParam);
<A HREF="param.html#DwParameter">DwParameter</A>(const DwString&amp; aStr, DwMessageComponent* aParent=0);
virtual ~DwParameter();
const DwParameter&amp; <A HREF="param.html#op_eq">operator =</A> (const DwParameter&amp; aParam);
virtual void <A HREF="param.html#Parse">Parse</A>();
virtual void <A HREF="param.html#Assemble">Assemble</A>();
virtual DwMessageComponent* <A HREF="param.html#Clone">Clone</A>() const;
const DwString&amp; <A HREF="param.html#Attribute">Attribute</A>() const;
void <A HREF="param.html#SetAttribute">SetAttribute</A>(const DwString&amp; aAttribute);
const DwString&amp; <A HREF="param.html#Value">Value</A>() const;
void <A HREF="param.html#SetValue">SetValue</A>(const DwString&amp; aValue);
DwParameter* <A HREF="param.html#Next">Next</A>() const ;
void <A HREF="param.html#SetNext">SetNext</A>(DwParameter* aParam);
static DwParameter* <A HREF="param.html#NewParameter">NewParameter</A>(const DwString&amp; aStr,
DwMessageComponent* aParent);
static DwParameter* (*<A HREF="param.html#sNewParameter">sNewParameter</A>)(const DwString&amp;, DwMessageComponent*);
public:
virtual void <A HREF="param.html#PrintDebugInfo">PrintDebugInfo</A>(ostream&amp; aStrm, int aDepth=0) const;
virtual void <A HREF="param.html#CheckInvariants">CheckInvariants</A>() const;
protected:
void _PrintDebugInfo(ostream&amp; aStrm) const;
};
</PRE>
<H2>
<FONT COLOR="navy"> DESCRIPTION </FONT>
</H2>
<P>
<B><TT>DwParameter</TT></B> represents the <I>parameter</I> component of
the Content-Type header field as described in RFC-2045. A parameter consists
of an attribute/value pair. <B><TT>DwParameter</TT></B> has member functions
for getting or setting a parameter's attribute and value.
<P>
A <B><TT>DwParameter</TT></B> object may be included in a list of
<B><TT>DwParameter</TT></B> objects. You can get the next
<B><TT>DwParameter</TT></B> object in the list by calling the member function
<B><TT>Next()</TT></B>.
<H2>
<FONT COLOR="navy"> Public Member Functions </FONT>
</H2>
<P>
<FONT COLOR="teal"><B> <A NAME="DwParameter">DwParameter</A>() <BR>
DwParameter(const DwParameter&amp; aParam) <BR>
DwParameter(const DwString&amp; aStr, DwMessageComponent* aParent=0)
</B></FONT>
<P>
The first constructor is the default constructor, which sets the
<B><TT>DwParameter</TT></B> object's string representation to the empty string
and sets its tqparent to NULL.
<P>
The second constructor is the copy constructor, which copies the string
representation, attribute, and value from <B><TT>aParam</TT></B>. The tqparent
of the new <B><TT>DwParameter</TT></B> object is set to NULL.
<P>
The third constructor copies <B><TT>aStr</TT></B> to the
<B><TT>DwParameter</TT></B> object's string representation and sets
<B><TT>aParent</TT></B> as its tqparent. 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 NULL,
<B><TT>aParent</TT></B> should point to an object of a class derived from
<B><TT>DwMediaType</TT></B>.
<P>
<FONT COLOR="teal"><B> const DwParameter&amp; <A NAME="op_eq">operator =</A>
(const DwParameter&amp; aParam) </B></FONT>
<P>
This is the assignment operator.
<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>DwParameter</TT></B> objects. It should
be called immediately after the string representation is modified and before
the parts of the broken-down representation are accessed.
<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>DwParameter</TT></B> objects. It
should be called whenever one of the object's attributes is changed in order
to assemble the string representation from its broken-down representation.
It will be called automatically for this object by the tqparent object's
<B><TT>Assemble()</TT></B> member function if the is-modified flag is set.
<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>DwParameter</TT></B> on the free store that has the
same value as this <B><TT>DwParameter</TT></B> object. The basic idea is
that of a ``virtual copy constructor.''
<P>
<FONT COLOR="teal"><B> const DwString&amp;
<A NAME="Attribute">Attribute</A>() const </B></FONT>
<P>
Returns the attribute contained by this parameter.
<P>
<FONT COLOR="teal"><B> void <A NAME="SetAttribute">SetAttribute</A>(const
DwString&amp; aAttribute) </B></FONT>
<P>
Sets the attribute contained by this parameter.
<P>
<FONT COLOR="teal"><B> const DwString&amp; <A NAME="Value">Value</A>() const
</B></FONT>
<P>
Returns the value contained by this parameter.
<P>
<FONT COLOR="teal"><B> void <A NAME="SetValue">SetValue</A>(const DwString&amp;
aValue) </B></FONT>
<P>
Sets the value contained by this parameter.
<P>
<FONT COLOR="teal"><B> DwParameter* <A NAME="Next">Next</A>() const
</B></FONT>
<P>
Returns the next <B><TT>DwParameter</TT></B> object in the list.
<P>
<FONT COLOR="teal"><B> void <A NAME="SetNext">SetNext</A>(DwParameter* aParam)
</B></FONT>
<P>
Returns the next <B><TT>DwParameter</TT></B> object in the list. Since
<B><TT>DwMediaType</TT></B> has member functions for adding
<B><TT>DwParameter</TT></B> objects to its list, you should avoid using this
function.
<P>
<FONT COLOR="teal"><B> static DwParameter*
<A NAME="NewParameter">NewParameter</A>(const DwString&amp; aStr,
DwMessageComponent* aParent) </B></FONT>
<P>
Creates a new <B><TT>DwParameter</TT></B> object on the free store. If the
static data member <B><TT>sNewParameter</TT></B> is NULL, this member function
will create a new <B><TT>DwParameter</TT></B> and return it. Otherwise,
<B><TT>NewParameter()</TT></B> will call the user-supplied function pointed
to by <B><TT>sNewParameter</TT></B>, which is assumed to return an object
from a class derived from <B><TT>DwParameter</TT></B>, and return that object.
<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"> Public Data Members </FONT>
</H2>
<P>
<FONT COLOR="teal"><B> static DwParameter*
(*<A NAME="sNewParameter">sNewParameter</A>)(const DwString&amp;,
DwMessageComponent*) </B></FONT>
<P>
If <B><TT>sNewParameter</TT></B> is not NULL, it is assumed to point to a
user-supplied function that returns an object from a class derived from
<B><TT>DwParameter</TT></B>.
</BODY></HTML>