Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals

RobotFlow::ImageCell Class Reference

#include <Cell.h>

Inheritance diagram for RobotFlow::ImageCell:

Inheritance graph
Collaboration diagram for RobotFlow::ImageCell:

Collaboration graph

Detailed Description


A cell is a sequence of connected pixels of the same value (same line).

Dominic Letourneau
{verbatim} Creation : 21/02/2001 Last Modification:
2005/03/29 15:20:47

Public Member Functions

 ImageCell ()
 ImageCell (int x1, int y1, int x2, int y2, int color)
 ImageCell (const ImageCell &cpy)
bool operator== (const ImageCell &eq)
ImageCelloperator= (const ImageCell &c)
void set_values (int x1, int y1, int x2, int y2)
void get_values (int &x1, int &y1, int &x2, int &y2)
double center_x ()
double center_y ()
int size ()
int get_color ()
void set_color (int color)
void printOn (std::ostream &out=std::cout) const
void readFrom (std::istream &in)
void ref ()
void unref ()
int unique ()
virtual void destroy ()
virtual void serialize (std::ostream &out) const
virtual void unserialize (std::istream &in)
virtual void doesNotUnderstand (std::string method)
virtual bool isNil () const
virtual void prettyPrint (std::ostream &out=std::cout) const
virtual ObjectRef clone ()
virtual std::string className () const

Static Public Member Functions

static ObjectRef newObject (const std::string &objType)
static int addObjectType (const std::string &objType, _ObjectFactory *factory)
static std::map< std::string,
_ObjectFactory * > & 
ObjectFactoryDictionary ()
static TypeMap< _ObjectFactory * > & TypeidDictionary ()

Data Fields

CPoint m_left
 The upper left corner.
CPoint m_right
 The lower right corner.
int m_color
 The color of the cell.

Protected Attributes

AtomicCounter ref_count


friend std::ostream & operator<< (std::ostream &out, const Object &obj)

Constructor & Destructor Documentation

RobotFlow::ImageCell::ImageCell  ) 

Ctor with no args default left/right (x,y) = (0,0)

RobotFlow::ImageCell::ImageCell int  x1,
int  y1,
int  x2,
int  y2,
int  color

Ctor with left/right coordinates

RobotFlow::ImageCell::ImageCell const ImageCell cpy  ) 

Copy Ctor

cpy the ImageCell to copy

Member Function Documentation

double RobotFlow::ImageCell::center_x  ) 

Gets the center of the ImageCell (x)

double the x center of the ImageCell

double RobotFlow::ImageCell::center_y  ) 

Gets the center of the ImageCell (y)

double the y center of the ImageCell

int RobotFlow::ImageCell::get_color  ) 

Gets the color of the ImageCell

int the color number

void RobotFlow::ImageCell::get_values int &  x1,
int &  y1,
int &  x2,
int &  y2

Gets the value of the left and right coordinates

x1 ulx
y1 uly
x2 lrx
y2 lry

ImageCell & RobotFlow::ImageCell::operator= const ImageCell c  ) 

Operator = between two ImageCell

c The ImageCell to equals
The ImageCell instance as rvalue

bool RobotFlow::ImageCell::operator== const ImageCell eq  ) 

Operator == between two ImageCell

eq The ImageCell to compare to
bool if the ImageCell are identical

void RobotFlow::ImageCell::printOn std::ostream &  out = std::cout  )  const [virtual]

Implements FD::Object.

void RobotFlow::ImageCell::readFrom std::istream &  in  )  [virtual]

Reimplemented from FD::Object.

void RobotFlow::ImageCell::set_color int  color  ) 

Sets the color of the ImageCell

color The color of the cell

void RobotFlow::ImageCell::set_values int  x1,
int  y1,
int  x2,
int  y2

Sets the value of the left and right coordinates

x1 ulx
y1 uly
x2 lrx
y2 lry

int RobotFlow::ImageCell::size  ) 

Gets the size of the ImageCell (x length)

int the size (x length)

Field Documentation

int RobotFlow::ImageCell::m_color

CPoint RobotFlow::ImageCell::m_left

CPoint RobotFlow::ImageCell::m_right

The documentation for this class was generated from the following files:
Generated on Wed Oct 5 14:36:33 2005 for RobotFlow by  doxygen 1.4.4