diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 460c52653ab0dcca6f19a4f492ed2c5e4e963ab0 (patch) | |
tree | 67208f7c145782a7e90b123b982ca78d88cc2c87 /mimelib/doc/fieldbdy.html | |
download | tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.tar.gz tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'mimelib/doc/fieldbdy.html')
-rw-r--r-- | mimelib/doc/fieldbdy.html | 144 |
1 files changed, 144 insertions, 0 deletions
diff --git a/mimelib/doc/fieldbdy.html b/mimelib/doc/fieldbdy.html new file mode 100644 index 000000000..856fd5330 --- /dev/null +++ b/mimelib/doc/fieldbdy.html @@ -0,0 +1,144 @@ +<HTML> +<HEAD> + <TITLE> DwFieldBody Man Page </TITLE> +</HEAD> +<BODY BGCOLOR="#FFFFFF"> +<H2> + <FONT COLOR="navy"> NAME </FONT> +</H2> +<P> +DwFieldBody -- Class representing a MIME header field body +<H2> + <FONT COLOR="navy"> SYNOPSIS </FONT> +</H2> +<PRE>class DW_EXPORT DwFieldBody : public <A HREF="msgcmp.html">DwMessageComponent</A> { + + friend class DwField; + +public: + + <A HREF="fieldbdy.html#DwFieldBody">DwFieldBody</A>(); + <A HREF="fieldbdy.html#DwFieldBody">DwFieldBody</A>(const DwFieldBody& aFieldBody); + <A HREF="fieldbdy.html#DwFieldBody">DwFieldBody</A>(const DwString& aStr, DwMessageComponent* aParent=0); + virtual ~DwFieldBody(); + const DwFieldBody& <A HREF="fieldbdy.html#op_eq">operator =</A> (const DwFieldBody& aFieldBody); + void <A HREF="fieldbdy.html#SetOffset">SetOffset</A>(int aOffset); + void <A HREF="fieldbdy.html#SetFolding">SetFolding</A>(DwBool aTrueOrFalse); + DwBool <A HREF="fieldbdy.html#IsFolding">IsFolding</A>() const; + +protected: + + int mLineOffset; + DwBool mDoFolding; + +public: + + virtual void <A HREF="fieldbdy.html#PrintDebugInfo">PrintDebugInfo</A>(ostream& aStrm, int aDepth=0) const; + virtual void <A HREF="fieldbdy.html#CheckInvariants">CheckInvariants</A>() const; + +protected: + + void _PrintDebugInfo(ostream& aStrm) const; +}; +</PRE> +<H2> + <FONT COLOR="navy"> DESCRIPTION </FONT> +</H2> +<P> +<B><TT>DwFieldBody</TT></B> represents the field-body element in the BNF +grammar specified by RFC-822. It is an abstract base class that defines the +interface common to all structured field bodies. +<P> +In the tree (broken-down) representation of a message, a +<B><TT>DwFieldBody</TT></B> object may be either a leaf node, having a parent +but no child nodes, or an intermediate node, having a parent and one or more +child nodes. The parent node is the +<B><TT><A HREF="field.html">DwField</A></TT></B> object that contains it. +Child nodes, if present, depend on the particular subclass of +<B><TT>DwFieldBody</TT></B> that is instantiated. A +<B><TT>DwAddressList</TT></B> object, for example, has +<B><TT>DwAddress</TT></B> objects as its child nodes. +<P> +Since <B><TT>DwFieldBody</TT></B> is an abstract base class, you cannot create +instances of it directly. Normally, objects of classes derived from +<B><TT>DwFieldBody</TT></B> are obtained by calling convenience member functions +in the class <B><TT><A HREF="headers.html">DwHeaders</A></TT></B>. +<P> +Some MIME parsers are broken in that they do not handle the folding of some +fields properly. <B><TT>DwFieldBody</TT></B> folds its string representation +by default. You can disable folding, however, by calling the +<B><TT>SetFolding()</TT></B> member function. To determine if folding is +enabled, call <B><TT>IsFolding()</TT></B>. +<H2> + <FONT COLOR="navy"> Public Member Functions </FONT> +</H2> +<P> +<FONT COLOR="teal"><B> <A NAME="DwFieldBody">DwFieldBody</A>() <BR> +DwFieldBody(const DwFieldBody& aFieldBody) <BR> +DwFieldBody(const DwString& aStr, DwMessageComponent* aParent=0) +</B></FONT> +<P> +The first constructor is the default constructor, which sets the +<B><TT>DwFieldBody</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 performs a deep copy +of <B><TT>aFieldBody</TT></B>. The parent of the new +<B><TT>DwFieldBody</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>DwFieldBody</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 DwFieldBody& <A NAME="op_eq">operator =</A> +(const DwFieldBody& aFieldBody) </B></FONT> +<P> +This is the assignment operator, which performs a deep copy of +<B><TT>aFieldBody</TT></B>. The parent node of the +<B><TT>DwFieldBody</TT></B> object is not changed. +<P> +<FONT COLOR="teal"><B> void <A NAME="SetOffset">SetOffset</A>(int aOffset) +</B></FONT> +<P> +Sets the offset to <B><TT>aOffset</TT></B>. The offset is used when folding +lines. It indicates how much the first line should be offset to account for +the field name, colon, and initial white space. +<P> +<FONT COLOR="teal"><B> void <A NAME="SetFolding">SetFolding</A>(DwBool +aTrueOrFalse) </B></FONT> +<P> +Enables (<B><TT>aTrueOrFalse = DwTrue</TT></B>) or disables +(<B><TT>aTrueOrFalse = DwFalse</TT></B>) the folding of fields. The default +is to fold fields. Unfortunately, some parsers are broke and do not handle +folded lines properly. This function allows a kludge to deal with these broken +parsers. +<P> +<FONT COLOR="teal"><B> DwBool <A NAME="IsFolding">IsFolding</A>() const +</B></FONT> +<P> +Returns a boolean indicating if folding of fields is enabled. +<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. +<P> +</BODY></HTML> |