html::text Class Reference
[Html Document preparation]

#include <text.hh>

Inheritance diagram for html::text:

html::object

List of all members.

Public Member Functions

 text (void)
 text (const std::string &x)
 text (double x)
 text (const Time &x, const char *fmt="%M %d, %Y %02H:%02N")
virtual ~text (void)
textclone (void) const
void write (writer &out) const
void insertText (const std::string &txt)
void addText (const std::string &txt)
textoperator<< (const std::string &txt)
textoperator<< (double x)
textsetColor (const color &Color)
textsetFont (const font &Font)
textsetSize (const size &Size)


Detailed Description

The text class defines an atomic html object containing a text string and a list of text-specific attributes specific to the string. Any occurrence of an open bracket "<" is translated to "&lt;" before it is added to the text string. brief Html text object
Author:
J. Zweizig
Version:
1.1; Modified May 4, 2001

Constructor & Destructor Documentation

html::text::text ( void   ) 

Construct an empty text object. brief Default constructor.

html::text::text ( const std::string &  x  ) 

Construct a text object and set it to contain the specified string data. brief Data constructor

Parameters:
x String containing the initial text.

html::text::text ( double  x  ) 

Construct a text object from a double precision float. brief Construct numeric text.

html::text::text ( const Time &  x,
const char *  fmt = "%M %d, %Y %02H:%02N" 
)

Construct a text object from a Time. brief Construct time string text.

virtual html::text::~text ( void   )  [virtual]

Destroy a text object. brief Text destructor.


Member Function Documentation

text* html::text::clone ( void   )  const [virtual]

Create a text object identical to the existing instance and return a pointer to the result. This method overrides the default action of the html object clone virtual method. brief Clone a text object.

Returns:
pointer to an exact copy of the current text instance.

Implements html::object.

void html::text::write ( writer out  )  const [virtual]

Write the object text to the specified html writer stream. brief Write the text.

Parameters:
out Html write to which the text is written.

Reimplemented from html::object.

void html::text::insertText ( const std::string &  txt  ) 

Replace any existing text with the specified string. brief Set the text.

Parameters:
txt String containg new text.

void html::text::addText ( const std::string &  txt  ) 

Append a specified string to any existing text on the object. brief Append a text string.

Parameters:
txt String to be added to the text.

text& html::text::operator<< ( const std::string &  txt  ) 

Append a specified string to any existing text in the object. brief Append a string to the text.

Parameters:
txt String to be added to the text.
Returns:
Reference to the updated text object.

text& html::text::operator<< ( double  x  ) 

Append a numeric value to any existing text in the object. brief Append a number to the text.

Parameters:
x Number to be added to the text.
Returns:
Reference to the updated text object.

text& html::text::setColor ( const color Color  ) 

Set the color attribute of the text. brief Set the color.

Returns:
Reference to the updated text.
Parameters:
Color A color specifier.

text& html::text::setFont ( const font Font  ) 

Set the text font. brief Set the font.

Returns:
Reference to the updated text.
Parameters:
Font A text font specifier.

text& html::text::setSize ( const size Size  ) 

Set the size attribute of the text. brief Set the size.

Returns:
Reference to the updated text.
Parameters:
Size A text size specifier.


The documentation for this class was generated from the following file:
Generated on Sun Mar 8 19:21:31 2009 for dmt by  doxygen 1.5.4