#include <regionMap.h>
Collaboration diagram for iptk::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::Region * | getRegion (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. |
|
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. |
|
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. |
|
Destructor. Destroys the data if it has only one reference. Else only reference count is decremented by one and nothing else is done. |
|
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. |
|
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. |
|
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. |