class GridEnvironment: public Environment

This class represents a <GRID>-environment

Inheritance:

GridEnvironment - Environment


Public Methods

[more] GridEnvironment(int write_one_by_one)
Generates a new <GRID>-environment with the given parameters
[more] ~GridEnvironment()
Destructor
[more]void read(ifstream *input)
This method generates a <GRID>-environment out of the given input filestream
[more]void write(ofstream *output, int number_of_images)
This method writes the given number of images to the given output filestream
[more]int shouldBeWrittenOneByOne()
This method indicates, if the images should be written one-by-one

Private Fields

[more]int columns_
The number of columns the grid will have.
[more]int rows_
The number of rows the grid will have.
[more]int write_one_by_one_
1, if the images should be written one-by-one, else 0.


Inherited from Environment:

Public Methods

oint getNumberOfElements()

Protected Fields

o elements_


Documentation

This class represents a <GRID>-environment. Currently, the grid can only contain images (ImageElements) stored in an Element-vector (derived from Environment). Note : I'm not sure, if the grid should be able to hold any sub-environments like the class HBoxEnvironment. If not, the name of this class should be changed to "ImageGridEnvironment".
o GridEnvironment(int write_one_by_one)
Generates a new <GRID>-environment with the given parameters.
Parameters:
write_one_by_one - Should the images be written one-by-one ?

o ~GridEnvironment()
Destructor

ovoid read(ifstream *input)
This method generates a <GRID>-environment out of the given input filestream. The first line after "<GRID>" contains the number of columns and rows of the grid. The input filestream will be read until a </GRID>-tag is reached.
Parameters:
input - The input filestream, from where the images are extracted

ovoid write(ofstream *output, int number_of_images)
This method writes the given number of images to the given output filestream.
Parameters:
output - The output filestream
number_of_images - The number of images that will be written. If -1, all images will be written.

oint shouldBeWrittenOneByOne()
This method indicates, if the images should be written one-by-one.
Returns:
1, if the images should be written one-by-one, else 0.

oint columns_
The number of columns the grid will have.

oint rows_
The number of rows the grid will have.

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


This class has no child classes.

Alphabetic index Hierarchy of classes



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