Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

SketchPool Class Template Reference

#include <SketchPool.h>

Inheritance diagram for SketchPool:

List of all members.


Detailed Description

template<typename T>
class DualCoding::SketchPool< T >

Manages a pool of SketchData<T> instances.

Definition at line 21 of file SketchPool.h.


Public Member Functions

 SketchPool (SketchSpace *_space, const std::string &_name, int poolsize=0)
 Constructor.
 ~SketchPool ()
 Destructor.
void deleteElements ()
 Delete all sketches in the pool; commplain if refcount nonzero. Used by destructor and by SketchSpace::resize().
void clear ()
 Make all sketches non-viewable, hence reclaimable when refcount drops to zero.
SketchData< T > * getFreeElement (void)
SketchData< T > * findSketchData (const std::string &name)
std::string getSketchListForGUI ()
 Returns a list of the valid SketchData's in this pool.
SketchDataRootretrieveSketch (int id)
 Returns a copy of the sketch with specified ID, null if no such Sketch.
void dumpPool () const

Public Attributes

std::vector< SketchData< T > * > elements
 this is made public so VisualRoutinesBehavior can access

Private Types

typedef std::vector
< SketchData< T >
* >::const_iterator 
CI

Private Member Functions

 SketchPool (const SketchPool &)
SketchPooloperator= (const SketchPool &)
 never call this

Member Typedef Documentation

typedef std::vector<SketchData<T>*>::const_iterator CI [private]

Definition at line 52 of file SketchPool.h.


Constructor & Destructor Documentation

SketchPool ( SketchSpace _space,
const std::string &  _name,
int  poolsize = 0 
) [inline]

Constructor.

Definition at line 61 of file SketchPool.h.

~SketchPool (  )  [inline]

Destructor.

Definition at line 71 of file SketchPool.h.

SketchPool ( const SketchPool< T > &   )  [private]


Member Function Documentation

void deleteElements (  )  [inline]

Delete all sketches in the pool; commplain if refcount nonzero. Used by destructor and by SketchSpace::resize().

Definition at line 76 of file SketchPool.h.

Referenced by SketchSpace::resize(), and SketchPool::~SketchPool().

void clear (  )  [inline]

Make all sketches non-viewable, hence reclaimable when refcount drops to zero.

Definition at line 87 of file SketchPool.h.

Referenced by SketchSpace::clear().

SketchData< T > * getFreeElement ( void   )  [inline]

Definition at line 106 of file SketchPool.h.

Referenced by Sketch::Sketch().

SketchData< T > * findSketchData ( const std::string &  name  )  [inline]

Definition at line 120 of file SketchPool.h.

std::string getSketchListForGUI (  )  [inline]

Returns a list of the valid SketchData's in this pool.

Definition at line 129 of file SketchPool.h.

Referenced by SketchSpace::getSketchListForGUI().

SketchDataRoot * retrieveSketch ( int  id  )  [inline]

Returns a copy of the sketch with specified ID, null if no such Sketch.

Definition at line 152 of file SketchPool.h.

Referenced by SketchSpace::retrieveSketch().

void dumpPool (  )  const [inline]

Definition at line 161 of file SketchPool.h.

Referenced by SketchSpace::dumpSpace().

SketchPool& operator= ( const SketchPool< T > &   )  [private]

never call this


Member Data Documentation


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

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