Location

This class defines the concepts of a Location in a coordinate system where the (0,0) position is in the upper left-hand corner. The x-axis extends in a positive direction to the right and the y-axis extends in a positive direction towards the bottom of the screen.

[ Index | Source | Summary | Member Functions ]

Quick Index


Class Summary

class Location
{

public:
Location(int x, int y);
Location();
int Xcoord();
int Ycoord();
Location Xmove(int amount);
Location Ymove(int amount);
}; // Location

Back to the top of Location


Location(int x, int y);

Construct a Location object with the specified x and y coordinates.

	Location(int x, int y);	

Back to the top of Location


Location();

Construct a Location object at a default location.

        Location();	

Back to the top of Location


int Xcoord();

Return the current x coordinate of the Location object.

     int Xcoord();   

Back to the top of Location


int Ycoord();

Return the current y coordinate of the Location object.

     int Ycoord();  

Back to the top of Location


Location Xmove(int amount);

Create and return a new Location object that differs from the existing Location object by the specified amount in the x coordinate. The amount may be positive or negative. The method does not change the existing Location object.

     Location Xmove(int amount);        

Back to the top of Location


Location Ymove(int amount);

Create and return a new Location object that differs from the existing Location object by the specified amount in the y coordinate. The amount may be positive or negative. The method does not change the existing Location object.

     Location Ymove(int amount);        

Back to the top of Location


Member Functions

public:
int Xcoord();
int Ycoord();
Location Xmove(int amount);
Location Ymove(int amount);

Back to the top of Location


Generated from source by the Cocoon utilities on Thu Apr 02 12:40:05 1998 .

Report problems to jkotula@unimax.com