Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

SketchPool< T > Class Template Reference

Manages a pool of SketchData<T> instances. More...

#include <SketchPool.h>

Inheritance diagram for SketchPool< T >:

Detailed Description

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

Manages a pool of SketchData<T> instances.

Definition at line 20 of file SketchPool.h.

List of all members.

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 (bool clearRetained)
 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 51 of file SketchPool.h.


Constructor & Destructor Documentation

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

Constructor.

Definition at line 60 of file SketchPool.h.

~SketchPool (  ) 

Destructor.

Definition at line 70 of file SketchPool.h.

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

Member Function Documentation

void clear ( bool  clearRetained  ) 

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

Definition at line 86 of file SketchPool.h.

Referenced by SketchSpace::clear().

void deleteElements (  ) 

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

Definition at line 75 of file SketchPool.h.

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

void dumpPool (  )  const

Definition at line 164 of file SketchPool.h.

Referenced by SketchSpace::dumpSpace().

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

Definition at line 123 of file SketchPool.h.

SketchData< T > * getFreeElement ( void   ) 

Definition at line 108 of file SketchPool.h.

Referenced by Sketch< T >::Sketch().

std::string getSketchListForGUI (  ) 

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

Definition at line 132 of file SketchPool.h.

Referenced by SketchSpace::getSketchListForGUI().

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

never call this

SketchDataRoot * retrieveSketch ( int  id  ) 

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

Definition at line 155 of file SketchPool.h.

Referenced by SketchSpace::retrieveSketch().


Member Data Documentation


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

DualCoding 5.1CVS
Generated Mon May 9 04:56:31 2016 by Doxygen 1.6.3