class ItemizeEnvironment: public Environment

This class represents an <ITEMIZE>-environment

Inheritance:

ItemizeEnvironment - Environment


Public Methods

[more] ItemizeEnvironment(int write_one_by_one, unsigned int level=0, int with_left_margin=1)
Generates a new <ITEMIZE>-environment with the given parameters
[more] ~ItemizeEnvironment()
Destructor
[more]void read(ifstream *input)
This method generates an <ITEMIZE>-environment out of the given input filestream
[more]void write(ofstream *output, int number_of_items)
This method writes the given number of items in the item-list to the given output filestream
[more]int shouldBeWrittenOneByOne()
This method indicates, if the items should be written one-by-one, or all items should be written at once
[more]int getNumberOfElements()
This method returns the number of items in the environment

Private Fields

[more]int write_one_by_one_
1, if the items should be written one-by-one, else 0
[more]int level_
Indicates the level of the itemization.
[more]int with_left_margin_
Indicates, if the HTML-output should have a margin on the left side.
[more]int number_of_items_
The number of items in this itemization.

Private Methods

[more]void writeHeader(ofstream *output)
This helper-method writes an <UL>-Header with the apropriate parameters to the given output filestream
[more]void writeItemize(ofstream *output, int number_of_items)
This helper-method writes the given number of items to the given output filestream
[more]void writeAllItems(ofstream *output, int style)
This helper-method writes all items to the given output filestream with the given style
[more]int getMaxLength()
This helper-method returns the number of characters of the longest item


Inherited from Environment:

Protected Fields

o elements_


Documentation

This class represents an <ITEMIZE>-environment. This environment contains at least one item (ItemizeElement) stored in an Element-vector (derived from Environment). Each item may have an embedded <ITEMIZE>-subenvironment.
o ItemizeEnvironment(int write_one_by_one, unsigned int level=0, int with_left_margin=1)
Generates a new <ITEMIZE>-environment with the given parameters.
Parameters:
write_one_by_one - Should the items be written one-by-one ?
level - The level of the itemization (for nested itemizations)
with_left_margin - Indicates, if the HTML-output should have a margin on the left side

o ~ItemizeEnvironment()
Destructor

ovoid read(ifstream *input)
This method generates an <ITEMIZE>-environment out of the given input filestream. The input filestream will be read until an </ITEMIZE>-Tag is reached.
Parameters:
input - The input filestream, from where the items are extracted

ovoid write(ofstream *output, int number_of_items)
This method writes the given number of items in the item-list to the given output filestream. If number_of_items is -1, the helper-method writeAllItems() is called. Else, the helper-method writeItemize() is called.
Parameters:
output - The output filestream
number_of_items - The number of items that should be written.

oint shouldBeWrittenOneByOne()
This method indicates, if the items should be written one-by-one, or all items should be written at once.
Returns:
1, if the items should be written one-by-one, else 0.

oint getNumberOfElements()
This method returns the number of items in the environment.
Returns:
The number of items

ovoid writeHeader(ofstream *output)
This helper-method writes an <UL>-Header with the apropriate parameters to the given output filestream.
Parameters:
output - The output filestream

ovoid writeItemize(ofstream *output, int number_of_items)
This helper-method writes the given number of items to the given output filestream. The first number_of_items-1 items will be written WEAK and the last item will be written NORMAL.
Parameters:
output - The output filestream
number_of_items - The number of items that should be written.

ovoid writeAllItems(ofstream *output, int style)
This helper-method writes all items to the given output filestream with the given style.
Parameters:
output - The output filestream
style - How the items should be printed (NORMAL or WEAK)

oint getMaxLength()
This helper-method returns the number of characters of the longest item.
Returns:
The length of the longest item

oint write_one_by_one_
1, if the items should be written one-by-one, else 0

oint level_
Indicates the level of the itemization.

oint with_left_margin_
Indicates, if the HTML-output should have a margin on the left side.

oint number_of_items_
The number of items in this itemization.


This class has no child classes.

Alphabetic index Hierarchy of classes



This page was generated with the help of DOC++.