Homepage Demos Overview Downloads Tutorials Reference
Credits

ShapeRoot Class Reference

#include <ShapeRoot.h>

Inheritance diagram for ShapeRoot:

Inheritance graph
[legend]
List of all members.

Detailed Description

Parent class for all Shape<T>.

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 13 of file ShapeRoot.cc.

ShapeRoot ( const ShapeRoot other  ) 

Copy constructor: shallow copy.

Definition at line 17 of file ShapeRoot.cc.

~ShapeRoot ( void   )  [virtual]

Definition at line 33 of file ShapeRoot.cc.


Member Function Documentation

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

Definition at line 80 of file ShapeRoot.h.

void deleteShape ( void   ) 

Definition at line 38 of file ShapeRoot.cc.

BaseData & getData (  )  const [virtual]

Definition at line 63 of file ShapeRoot.cc.

Referenced by BaseData::increaseConfidence().

int getId (  )  const [inline]

Definition at line 64 of file ShapeRoot.h.

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

ShapeSpace & getSpace (  )  const

Definition at line 68 of file ShapeRoot.cc.

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

Shape comparison. Invalid shapes are considered equal.

Definition at line 72 of file ShapeRoot.h.

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

Definition at line 58 of file ShapeRoot.cc.

BaseData * operator-> ( void   )  [virtual]

Definition at line 53 of file ShapeRoot.cc.

ShapeRoot & operator= ( const ShapeRoot  ) 

Definition at line 23 of file ShapeRoot.cc.

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

Shape comparison. Invalid shapes are considered equal.

Definition at line 73 of file ShapeRoot.cc.

Referenced by ShapeRoot::operator!=().

void sanity_check ( void   )  const

Definition at line 43 of file ShapeRoot.cc.

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

void setInvalid (  )  [inline]

Definition at line 55 of file ShapeRoot.h.


Friends And Related Function Documentation

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

Definition at line 83 of file ShapeRoot.cc.

friend class ShapeSpace [friend]

Definition at line 31 of file ShapeRoot.h.


Member Data Documentation


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

DualCoding 3.0beta
Generated Wed Oct 4 00:02:30 2006 by Doxygen 1.4.7