Square

Concrete subclass of DataFormatter that formats Grid into square Area s.

[ verification_docs | Source | Implementation | Keywords | Summary | Ancestors | All Members | Descendants ]

Quick Index

DESCRIPTION
AUTHOR

Class Summary

class Square : public virtual DataFormatter

{

public:
Square( const int& side, const int& leftOffset , const int& topOffset ) ;
Square( const Square& s ) ;
Square& operator=(const Square& s);
void formatData(const Grid & g, vector<Area> & a) ;
protected:
map< int, map<int,bool> > _areaBad;
void _checkAreaBad(const Grid& g);
private:
int _side;
int _leftOffset;
int _topOffset;
}; // Square


DESCRIPTION

Concrete subclass of DataFormatter that formats Grid into square Area s.


AUTHOR

Mike Smoot


Square( const int& side, const int& leftOffset , const int& topOffset ) ;

Constructor.

		Square( const int& side, 
			    const int& leftOffset = 0, 
			    const int& topOffset = 0)
			;

Function is currently defined inline.


Square( const Square& s ) ;

Copy constructor.

		Square( const Square& s )
			;

Function is currently defined inline.


Square& operator=(const Square& s);

Operator =

		Square& operator=(const Square& s);

void formatData(const Grid & g, vector<Area> & a) ;

Formats data in squares.

		virtual void formatData(const Grid & g, vector<Area> & a) ;

int _side;

Length of a side.

		int _side;

int _leftOffset;

The number of Grid points offset from the left side of the Grid.

		int _leftOffset;

int _topOffset;

The number of Grid points offset from the top of the Grid.

		int _topOffset;

map< int, map<int,bool> > _areaBad;

A map of a map or booleans. The ints are used as indices. The first time a grid is checked, the map will be created and then used each subsequent time. The reason it is a map and not a vector is that the ints won't necessarily (or even usually) be sequential.

		map< int, map<int,bool> > _areaBad;

void _checkAreaBad(const Grid& g);

A function that checks _areaBad to see if the the current area has already been checked to see whether it contains enough valid points to be used. This is used to speed things up so we don't redo slow work over and over.

		void _checkAreaBad(const Grid& g);

All Members

public:
DataFormatter& operator=(const DataFormatter& rhs);
string getFormatType() const ;
void formatData(const Grid& g, vector<Area>& areas) ;
Square& operator=(const Square& s);
void formatData(const Grid & g, vector<Area> & a) ;
protected:
map< int, map<int,bool> > _areaBad;
void _checkAreaBad(const Grid& g);

Ancestors

Inheritance chain for Square:


Descendants


Generated from source by the Cocoon utilities on Wed Aug 30 12:53:41 2000 .

Report problems to jkotula@stratasys.com