# PHTML Class Reference

This class describes a HyperText markup Language string as used by the World Wide Web and the `PURL` and `PHTTP` class. More...

`#include <html.h>`

Inheritance diagram for PHTML:

List of all members.

## Public Types

| InHTML
| InHead
| InBody
| InTitle
| InHeading
| InDivision
| InPreFormat
| InAnchor
| InNote
| InAddress
| InBlockQuote
| InCredit
| InBold
| InItalic
| InTeleType
| InUnderline
| InStrikeThrough
| InBig
| InSmall
| InSubscript
| InSuperscript
| InEmphasis
| InCite
| InStrong
| InCode
| InSample
| InKeyboard
| InVariable
| InDefinition
| InQuote
| InAuthor
| InPerson
| InAcronym
| InAbbrev
| InInsertedText
| InDeletedText
| InList
| InListHeading
| InDefinitionTerm
| InTable
| InForm
| InSelect
| InTextArea
| NumElementsInSet
| NoBorder
| Border
| Enabled
| Disabled
| NotSelected
| Selected
| UnChecked
| Checked

enum

ElementInSet {
InHTML, InHead, InBody, InTitle,
InHeading, InDivision, InPreFormat, InAnchor,
InNote, InAddress, InBlockQuote, InCredit,
InBold, InItalic, InTeleType, InUnderline,
InStrikeThrough, InBig, InSmall, InSubscript,
InSuperscript, InEmphasis, InCite, InStrong,
InCode, InSample, InKeyboard, InVariable,
InDefinition, InQuote, InAuthor, InPerson,
InAcronym, InAbbrev, InInsertedText, InDeletedText,
InList, InListHeading, InDefinitionTerm, InTable,
InForm, InSelect, InTextArea, NumElementsInSet
}

enum | BorderCodes { NoBorder, Border }
enum | DisableCodes { Enabled, Disabled }
enum | SelectionCodes { NotSelected, Selected }
enum | CheckedCodes { UnChecked, Checked }

## Public Member Functions

| PHTML (ElementInSet initialState=NumElementsInSet)
| Construct a new HTML object.
| PHTML (const char *cstr)
| PHTML (const PString &str)
| ~PHTML ()
PHTML & | operator= (const PHTML &html)
| Restart the HTML string output using the specified value as the new title.
PHTML & | operator= (const PString &str)
| Assign the string to the current object.
PHTML & | operator= (const char *cstr)
| Assign the C string to the string stream.
PHTML & | operator= (char ch)
| Assign the character to the current object.
PBoolean | Is (ElementInSet elmt) const
void | Set (ElementInSet elmt)
void | Clr (ElementInSet elmt)
void | Toggle (ElementInSet elmt)

## Protected Member Functions

virtual void | AssignContents (const PContainer &c)
| Copy the container contents.

## Classes

class | Abbrev
class | Acronym
class | Address
class | Author
class | Banner
class | Big
class | BlockQuote
class | Body
class | Bold
class | BreakLine
class | BulletList
class | CheckBox
class | Cite
class | Code
class | Credit
class | Definition
class | DefinitionItem
class | DefinitionList
class | DefinitionTerm
class | DeletedText
class | Division
class | Element
class | Emphasis
class | FieldElement
class | Form
class | FormField
class | Head
class | Heading
class | HiddenField
class | HotLink
class | HRule
class | HTML
class | Image
class | ImageElement
class | InputField
class | InputFile
class | InputImage
class | InputNumber
class | InputPassword
class | InputRange
class | InputScribble
class | InputText
class | InsertedText
class | Italic
class | Keyboard
class | ListHeading
class | ListItem
class | Note
class | Option
class | OrderedList
class | Paragraph
class | Person
class | PreFormat
class | Quote
class | RadioButton
class | ResetButton
class | Sample
class | Select
class | SetTab
class | SimpleList
class | Small
class | StrikeThrough
class | Strong
class | SubmitButton
class | Subscript
class | Superscript
class | Tab
class | TableData
class | TableEnd
class | TableHeader
class | TableRow
class | TableStart
class | Target
class | TeleType
class | TextArea
class | Title
class | Underline
class | Variable

## Detailed Description

This class describes a HyperText markup Language string as used by the World Wide Web and the `PURL` and `PHTTP` class.

All of the standard stream I/O operators, manipulators etc will operate on the PString class.

## Member Enumeration Documentation

enum PHTML::BorderCodes

Enumerator:

  NoBorder |
  Border |

enum PHTML::CheckedCodes

Enumerator:

  UnChecked |
  Checked |

enum PHTML::DisableCodes

Enumerator:

  Enabled |
  Disabled |

enum PHTML::ElementInSet

Enumerator:

  InHTML |
  InHead |
  InBody |
  InTitle |
  InHeading |
  InDivision |
  InPreFormat |
  InAnchor |
  InNote |
  InAddress |
  InBlockQuote |
  InCredit |
  InBold |
  InItalic |
  InTeleType |
  InUnderline |
  InStrikeThrough |
  InBig |
  InSmall |
  InSubscript |
  InSuperscript |
  InEmphasis |
  InCite |
  InStrong |
  InCode |
  InSample |
  InKeyboard |
  InVariable |
  InDefinition |
  InQuote |
  InAuthor |
  InPerson |
  InAcronym |
  InAbbrev |
  InInsertedText |
  InDeletedText |
  InList |
  InListHeading |
  InDefinitionTerm |
  InTable |
  InForm |
  InSelect |
  InTextArea |
  NumElementsInSet |

enum PHTML::SelectionCodes

Enumerator:

  NotSelected |
  Selected |

## Constructor & Destructor Documentation

PHTML::PHTML | ( | ElementInSet | initialState = `NumElementsInSet` | ) |

Construct a new HTML object.

If a title is specified in the constructor then the HEAD, TITLE and BODY elements are output and the string is used in a H1 element.

PHTML::PHTML | ( | const char * | cstr | ) |

Parameters:

  cstr | C string representation of the title string.

PHTML::PHTML | ( | const PString & | str | ) |

Parameters:

  str | String representation of the title string.

PHTML::~PHTML | ( |  | ) |

## Member Function Documentation

virtual void PHTML::AssignContents | ( | const PContainer & | c | ) | `[protected, virtual]`

Copy the container contents.

This copies the contents from one reference to another.

No duplication of contents occurs, for instance if the container is an array, the pointer to the array memory is copied, not the array memory block itself.

This function will get called by the base assignment operator.

Reimplemented from PStringStream.

void PHTML::Clr | ( | ElementInSet | elmt | ) |

PBoolean PHTML::Is | ( | ElementInSet | elmt | ) | const

PHTML& PHTML::operator= | ( | char | ch | ) | `[inline]`

Assign the character to the current object.

The current instance then becomes a unique reference to a copy of the character parameter. eg:

              myStr = 'A';

Returns:
  reference to the current PString object.

Parameters:

  ch | String for title in restating HTML.

Reimplemented from PStringStream.

PHTML& PHTML::operator= | ( | const char * | cstr | ) | `[inline]`

Assign the C string to the string stream.

The current instance then becomes a unique reference to a copy of the `cstr` parameter. The `cstr` parameter is typically a literal string, eg:

              myStr = "fred";

This will reset the read pointer for input to the beginning of the string. Also, any data output to the string up until the asasignement will be lost.

Returns:
  reference to the current PStringStream object.

Parameters:

  cstr | String for title in restating HTML.

Reimplemented from PStringStream.

PHTML& PHTML::operator= | ( | const PString & | str | ) | `[inline]`

Assign the string to the current object.

The current instance then becomes another reference to the same string in the `str` parameter.

This will reset the read pointer for input to the beginning of the string. Also, any data output to the string up until the asasignement will be lost.

Returns:
  reference to the current PStringStream object.

Parameters:

  str | String for title in restating HTML.

Reimplemented from PStringStream.

PHTML& PHTML::operator= | ( | const PHTML & | html | ) | `[inline]`

Restart the HTML string output using the specified value as the new title.

If `title` is empty then no HEAD or TITLE elements are placed into the HTML.

Parameters:

  html | HTML stream to make a copy of.

void PHTML::Set | ( | ElementInSet | elmt | ) |

void PHTML::Toggle | ( | ElementInSet | elmt | ) |

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

- html.h