Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members

iptk::RegionMap Class Reference

#include <regionMap.h>

Collaboration diagram for iptk::RegionMap:

Collaboration graph
[legend]
List of all members.

Detailed Description

Class which encapsulates a RegionMap.


Public Member Functions

 RegionMap (void)
 Default Constructor Default constructor is, as of now, effectively useless.

 RegionMap (int width, int height)
 Memory initialising constructor.

 RegionMap (const RegionMap &rm)
 Copy Constructor This initialises the new object with only a reference to the data of the old object.

 ~RegionMap ()
 Destructor.

void setRegion (int n, int m, gutk::Region *r)
 Sets the region to which the pixel at (n, m) points to.

gutk::RegiongetRegion (int n, int m)
 Returns the region to which the pixel at (n, m) points to.

gutk::Size getSize (void)
 Returns the size of the RegionMap.

void operator= (const RegionMap &rm)
 Overloaded assignment operator.


Constructor & Destructor Documentation

iptk::RegionMap::RegionMap int  width,
int  height
 

Memory initialising constructor.

Initialises the memory at construction. Internally, this memory, is a 1-d array. But this fact is hidden from the user of this class and it appears as if it were a 2-d array.

iptk::RegionMap::RegionMap const RegionMap rm  ) 
 

Copy Constructor This initialises the new object with only a reference to the data of the old object.

i.e., the old object and the new object share the same data. But the user should keep in mind that passing an empty object to a function would result in a call by value, where as passing a non-empty object would result in call by reference.

iptk::RegionMap::~RegionMap  ) 
 

Destructor.

Destroys the data if it has only one reference. Else only reference count is decremented by one and nothing else is done.


Member Function Documentation

gutk::Region* iptk::RegionMap::getRegion int  n,
int  m
 

Returns the region to which the pixel at (n, m) points to.

Returns NULL if the point (n, m) does'nt belong to the map.

void iptk::RegionMap::operator= const RegionMap rm  ) 
 

Overloaded assignment operator.

The lvalue for the operator is initialised by reference. i.e., after the assignment operation, the lvalue and the rvalue share the same space in memory.

void iptk::RegionMap::setRegion int  n,
int  m,
gutk::Region r
 

Sets the region to which the pixel at (n, m) points to.

Does nothing if the point (n, m) does'nt belong to the map.


The documentation for this class was generated from the following file:
Generated on Mon Nov 22 11:12:42 2004 for ImprolaLib by doxygen 1.3.7