sonus::Body2D< T > Class Template Reference

#include <Body2D.h>

List of all members.

Public Member Functions

 Body2D ()
 Body2D (int length)
 ~Body2D ()
int push (T *v)
T * pop ()
T * getElementAt (int index)
void clear ()
int getIndexOf (T *v)
int getLength ()
int getSize ()


Detailed Description

template<class T>
class sonus::Body2D< T >

sonus::Body2D

A abstract body made of T objects (preferrably Vector2D or Bezier2D). Basically a container (stack-like) of objects.

filename: Body2D.h

Date:
2008/04/27 18:09
Author:
Alexander Lawrence
Version:
1.0

Constructor & Destructor Documentation

template<class T>
sonus::Body2D< T >::Body2D (  )  [inline]

Constructor A standard length of 10 is set.

template<class T>
sonus::Body2D< T >::Body2D ( int  length  )  [inline]

Constructor with given length

Parameters:
length the length of the body

template<class T>
sonus::Body2D< T >::~Body2D (  )  [inline]

Destructor


Member Function Documentation

template<class T>
int sonus::Body2D< T >::push ( T *  v  )  [inline]

Pushes one element onto the stack

Parameters:
v the element to be pushed
Returns:
the current of elements on the stack

template<class T>
T * sonus::Body2D< T >::pop (  )  [inline]

Pops one element off the stack

Returns:
the popped off element

template<class T>
T * sonus::Body2D< T >::getElementAt ( int  index  )  [inline]

Gets one element at index from stack (element is not popped off the stack). If there is no element at given index a null pointer is returned.

Parameters:
index the index of the element to be returned
Returns:
the searched element or null

template<class T>
void sonus::Body2D< T >::clear (  )  [inline]

Clears the stack.

template<class T>
int sonus::Body2D< T >::getIndexOf ( T *  v  )  [inline]

Get the index of one element.

Parameters:
v the given element
Returns:
the searched index or -1

template<class T>
int sonus::Body2D< T >::getLength (  )  [inline]

Get the length of the container

Returns:
length of the container

template<class T>
int sonus::Body2D< T >::getSize (  )  [inline]

Get the current size of the container

Returns:
size of the container


The documentation for this class was generated from the following file:
Generated on Tue Aug 26 12:26:54 2008 for sonus by  doxygen 1.5.4