Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

ShapeRoot Class Reference

#include <ShapeRoot.h>

Inheritance diagram for ShapeRoot:

List of all members.


Detailed Description

Parent class for all Shape<xxxData> objects.

Shape<T> points to data objects of type T within a ShapeSpace, e.g., Shape<LineData> points to a LineData object.

Creating a Shape registers the data object in the ShapeSpace and sets the refcount to 1. Copying a shape increments the refcount, and deleting a shape decrements it. If refcount goes to zero we delete the data object. If the user calls deleteShape on a Shape, we remove the shape from the ShapeSpace but don't actually delete it until the reference count goes to zero.

Definition at line 26 of file ShapeRoot.h.


Public Member Functions

 ShapeRoot (void)
 ShapeRoot (BaseData *p)
 The usual constructor.
 ShapeRoot (const ShapeRoot &other)
 Copy constructor: shallow copy.
virtual ~ShapeRoot (void)
void deleteShape (void)
void sanity_check (void) const
bool isValid () const
void setInvalid ()
virtual BaseDataoperator-> (void)
virtual BaseDataoperator-> (void) const
int getId () const
virtual BaseDatagetData () const
ShapeSpacegetSpace () const
ShapeRootoperator= (const ShapeRoot &)
virtual bool operator== (const ShapeRoot &other) const
 Shape comparison. Invalid shapes are considered equal.
virtual bool operator!= (const ShapeRoot &other) const
 Shape comparison. Invalid shapes are considered equal.

Protected Member Functions

ShapeRootaddShape (BaseData *p)

Protected Attributes

int id
BaseDatadata

Friends

class ShapeSpace
std::ostream & operator<< (std::ostream &os, const ShapeRoot &r)

Constructor & Destructor Documentation

ShapeRoot ( void   )  [inline]

Construct a dummy ShapeRoot, e.g., so we can assign into it, or return it as an indicator of an invalid or failure result.

Definition at line 37 of file ShapeRoot.h.

ShapeRoot ( BaseData p  ) 

The usual constructor.

Definition at line 15 of file ShapeRoot.cc.

ShapeRoot ( const ShapeRoot other  ) 

Copy constructor: shallow copy.

Definition at line 19 of file ShapeRoot.cc.

~ShapeRoot ( void   )  [virtual]

Definition at line 35 of file ShapeRoot.cc.


Member Function Documentation

void deleteShape ( void   ) 

Definition at line 40 of file ShapeRoot.cc.

void sanity_check ( void   )  const

Definition at line 45 of file ShapeRoot.cc.

Referenced by ShapeRoot::getData(), ShapeRoot::getSpace(), and ShapeRoot::operator->().

void setInvalid (  )  [inline]

Definition at line 55 of file ShapeRoot.h.

BaseData * operator-> ( void   )  [virtual]

Definition at line 55 of file ShapeRoot.cc.

BaseData * operator-> ( void   )  const [virtual]

Definition at line 60 of file ShapeRoot.cc.

int getId (  )  const [inline]

Definition at line 64 of file ShapeRoot.h.

Referenced by PathPlanner::addLandmark(), and DualCoding::operator<<().

BaseData & getData (  )  const [virtual]

Definition at line 65 of file ShapeRoot.cc.

Referenced by BaseData::increaseConfidence().

ShapeSpace & getSpace (  )  const

Definition at line 70 of file ShapeRoot.cc.

bool operator== ( const ShapeRoot other  )  const [virtual]

Shape comparison. Invalid shapes are considered equal.

Definition at line 75 of file ShapeRoot.cc.

Referenced by ShapeRoot::operator!=().

virtual bool operator!= ( const ShapeRoot other  )  const [inline, virtual]

Shape comparison. Invalid shapes are considered equal.

Definition at line 72 of file ShapeRoot.h.

ShapeRoot & operator= ( const ShapeRoot src  ) 

Definition at line 25 of file ShapeRoot.cc.

ShapeRoot& addShape ( BaseData p  )  [inline, protected]

Definition at line 80 of file ShapeRoot.h.


Friends And Related Function Documentation

friend class ShapeSpace [friend]

Definition at line 31 of file ShapeRoot.h.

std::ostream& operator<< ( std::ostream &  os,
const ShapeRoot r 
) [friend]

Definition at line 85 of file ShapeRoot.cc.


Member Data Documentation


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

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