Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

SketchDataRoot Class Reference

#include <SketchDataRoot.h>

Inheritance diagram for SketchDataRoot:

List of all members.


Detailed Description

Parent class for SketchData<T>.

Definition at line 17 of file SketchDataRoot.h.


Public Member Functions

 SketchDataRoot (SketchSpace *s)
virtual ~SketchDataRoot ()
SketchSpacegetSpace () const
 Returns the SketchSpace that owns the pool containing this SketchData object.
ShapeSpacegetDualSpace () const
 Returns the ShapeSpace associated with the SketchSpace for this Sketch.
int getId () const
int getParentId () const
int getViewableId () const
void setParentId (int const _id)
bool isViewable () const
void setViewable (bool const v)
int getRefcount () const
rgb getColor () const
void setColor (const rgb &_color)
void setColor (const std::string &colorname)
void setColor (const color_index cindex)
ColorMapType_t getColorMap () const
void setColorMap (const ColorMapType_t _map)
const std::string & getName () const
void setName (const std::string &_name)
virtual SketchType_t getType () const =0
void V (std::string const &_name="")
void N (std::string const &_name="")
void inheritFrom (const SketchDataRoot &parent)
void inheritFrom (const ShapeRoot &parent)
void inheritFrom (const BaseData &parent)
int indexX (int index)
 X coordinate encoded by sketch index.
int indexY (int index)
 Y coordinate encoded by sketch index.
int indexOf (int x, int y)
 converts (x,y) into a sketch index
virtual unsigned int saveBuffer (char buf[], unsigned int avail) const =0
const size_t getWidth () const
 Width and height of sketches in this space.
const size_t getHeight () const
 Width and height of sketches in this space.
const size_t getNumPixels () const
 Width and height of sketches in this space.

Private Member Functions

 SketchDataRoot (const SketchDataRoot &)
 never call this
SketchDataRootoperator= (const SketchDataRoot &)
 never call this

Private Attributes

SketchSpacespace
 The SketchSpace that owns the pool containing this SketchData object.
std::string name
 Name of this sketch.
int id
 Sketch-specific integer ID, for unique identification.
int parentId
 Integer ID of the "parent" Sketch, 0 if no parent; used in GUI.
int refcount
 Reference count for the sketch. When SketchPool detects this as 0, it may reuse it.
bool viewable
 True if the Sketch is currently viewable.
int refreshTag
 Last time this sketch was included in a sketch list sent to the GUI.
bool clearPending
 True if we've tried to clear this sketch but the SketchGUI was looking at it.
rgb color
ColorMapType_t colormap

Friends

class SketchPool
class Sketch
class SketchData
class SketchRoot

Constructor & Destructor Documentation

SketchDataRoot ( SketchSpace s  )  [inline]

Definition at line 58 of file SketchDataRoot.h.

virtual ~SketchDataRoot (  )  [inline, virtual]

Definition at line 64 of file SketchDataRoot.h.

SketchDataRoot ( const SketchDataRoot  )  [private]

never call this


Member Function Documentation

SketchSpace& getSpace (  )  const [inline]

Returns the SketchSpace that owns the pool containing this SketchData object.

Definition at line 67 of file SketchDataRoot.h.

Referenced by VRmixin::rleEncodeSketch().

ShapeSpace& getDualSpace ( void   )  const [inline]

Returns the ShapeSpace associated with the SketchSpace for this Sketch.

Definition at line 70 of file SketchDataRoot.h.

int getId (  )  const [inline]

Definition at line 72 of file SketchDataRoot.h.

Referenced by SketchDataRoot::getViewableId(), and DualCoding::operator<<().

int getParentId (  )  const [inline]

Definition at line 73 of file SketchDataRoot.h.

Referenced by SketchDataRoot::getViewableId().

int getViewableId (  )  const [inline]

Definition at line 74 of file SketchDataRoot.h.

Referenced by SketchDataRoot::inheritFrom(), and BaseData::inheritFrom().

void setParentId ( int const   _id  )  [inline]

Definition at line 75 of file SketchDataRoot.h.

Referenced by SketchDataRoot::inheritFrom().

bool isViewable (  )  const [inline]

Definition at line 76 of file SketchDataRoot.h.

Referenced by SketchDataRoot::getViewableId().

void setViewable ( bool const   v  )  [inline]

Definition at line 77 of file SketchDataRoot.h.

Referenced by SketchDataRoot::N(), and SketchDataRoot::V().

int getRefcount (  )  const [inline]

Definition at line 78 of file SketchDataRoot.h.

rgb getColor (  )  const [inline]

Definition at line 79 of file SketchDataRoot.h.

Referenced by SketchDataRoot::inheritFrom(), and BaseData::inheritFrom().

void setColor ( const rgb &  _color  )  [inline]

Definition at line 80 of file SketchDataRoot.h.

Referenced by SketchDataRoot::inheritFrom(), and SketchDataRoot::setColor().

void setColor ( const std::string &  colorname  ) 

Definition at line 43 of file SketchDataRoot.cc.

void setColor ( const color_index  cindex  ) 

Definition at line 47 of file SketchDataRoot.cc.

ColorMapType_t getColorMap (  )  const [inline]

Definition at line 83 of file SketchDataRoot.h.

Referenced by SketchDataRoot::inheritFrom().

void setColorMap ( const ColorMapType_t  _map  )  [inline]

Definition at line 84 of file SketchDataRoot.h.

Referenced by SketchDataRoot::inheritFrom().

const std::string& getName (  )  const [inline]

Definition at line 85 of file SketchDataRoot.h.

Referenced by DualCoding::operator<<().

void setName ( const std::string &  _name  )  [inline]

Definition at line 86 of file SketchDataRoot.h.

Referenced by SketchDataRoot::N(), and SketchDataRoot::V().

virtual SketchType_t getType (  )  const [pure virtual]

void V ( std::string const &  _name = ""  ) 

Definition at line 33 of file SketchDataRoot.cc.

void N ( std::string const &  _name = ""  ) 

Definition at line 38 of file SketchDataRoot.cc.

void inheritFrom ( const SketchDataRoot parent  ) 

Definition at line 14 of file SketchDataRoot.cc.

void inheritFrom ( const ShapeRoot parent  ) 

Definition at line 23 of file SketchDataRoot.cc.

void inheritFrom ( const BaseData parent  ) 

Definition at line 28 of file SketchDataRoot.cc.

const size_t getWidth (  )  const

Width and height of sketches in this space.

Definition at line 10 of file SketchDataRoot.cc.

Referenced by SketchDataRoot::indexOf(), SketchDataRoot::indexX(), SketchDataRoot::indexY(), SketchData::saveBuffer(), and SketchData::savePixels().

const size_t getHeight (  )  const

Width and height of sketches in this space.

Definition at line 11 of file SketchDataRoot.cc.

Referenced by SketchData::saveBuffer(), and SketchData::savePixels().

const size_t getNumPixels (  )  const

int indexX ( int  index  )  [inline]

X coordinate encoded by sketch index.

Definition at line 105 of file SketchDataRoot.h.

int indexY ( int  index  )  [inline]

Y coordinate encoded by sketch index.

Definition at line 108 of file SketchDataRoot.h.

int indexOf ( int  x,
int  y 
) [inline]

converts (x,y) into a sketch index

Definition at line 111 of file SketchDataRoot.h.

virtual unsigned int saveBuffer ( char  buf[],
unsigned int  avail 
) const [pure virtual]

SketchDataRoot& operator= ( const SketchDataRoot  )  [private]

never call this


Friends And Related Function Documentation

friend class SketchPool [friend]

Definition at line 52 of file SketchDataRoot.h.

friend class Sketch [friend]

Definition at line 53 of file SketchDataRoot.h.

friend class SketchData [friend]

Definition at line 54 of file SketchDataRoot.h.

friend class SketchRoot [friend]

Definition at line 55 of file SketchDataRoot.h.


Member Data Documentation

std::string name [private]

Name of this sketch.

Definition at line 23 of file SketchDataRoot.h.

Referenced by SketchDataRoot::getName(), and SketchDataRoot::setName().

int id [private]

Sketch-specific integer ID, for unique identification.

Definition at line 26 of file SketchDataRoot.h.

Referenced by SketchDataRoot::getId().

int parentId [private]

Integer ID of the "parent" Sketch, 0 if no parent; used in GUI.

Definition at line 29 of file SketchDataRoot.h.

Referenced by SketchDataRoot::getParentId(), and SketchDataRoot::setParentId().

int refcount [private]

Reference count for the sketch. When SketchPool detects this as 0, it may reuse it.

Definition at line 32 of file SketchDataRoot.h.

Referenced by SketchDataRoot::getRefcount().

bool viewable [private]

True if the Sketch is currently viewable.

Definition at line 35 of file SketchDataRoot.h.

Referenced by SketchDataRoot::isViewable(), and SketchDataRoot::setViewable().

int refreshTag [private]

Last time this sketch was included in a sketch list sent to the GUI.

Definition at line 38 of file SketchDataRoot.h.

bool clearPending [private]

True if we've tried to clear this sketch but the SketchGUI was looking at it.

Definition at line 41 of file SketchDataRoot.h.

rgb color [private]

Color to use for displaying this sketch. Only meaningful for Sketch<bool>, but info is preserved in case we coerce bool to int or float and then back to bool.

Definition at line 45 of file SketchDataRoot.h.

Referenced by SketchDataRoot::getColor(), and SketchDataRoot::setColor().

Which color map to use; default is to use the robot's own color table. Other tables are used for displaying grayscale images, or scaled quantities like distance or area using a continuous color scale from red to blue.

Definition at line 50 of file SketchDataRoot.h.

Referenced by SketchDataRoot::getColorMap(), SketchDataRoot::setColorMap(), and SketchData::SketchData().


The documentation for this class was generated from the following files:

DualCoding 4.0
Generated Thu Nov 22 00:54:06 2007 by Doxygen 1.5.4