NL3D::CPSAttrib< T > Class Template Reference

This class is intended to store an attribute list in a located or in a located bindable such as speed, color and so on. More...

#include <ps_attrib.h>

List of all members.

Public Types

Useful typedefs



typedef CPSVector< T >::V TContType
 Container used by this class to store its datas.
typedef T value_type
 The type used by the container. Its is the type used to instanciate this template.
typedef TContType::iterator iterator
 an iterator on the datas
typedef TContType::const_iterator const_iterator
 a const iterator on the datas

Public Member Functions

Object



 CPSAttrib ()
 ctor
void serial (NLMISC::IStream &f) throw (NLMISC::EStream)
 Serialization method.
void swap (CPSAttrib< T > &other)
Size of the container



void resize (uint32 nbInstances)
 Resize the attributes tab.
uint32 getSize (void) const
 return the number of instance in the container
uint32 getMaxSize (void) const
 return the max number of instance in the container
Element access.



const Toperator[] (uint32 index) const
 get a const reference on an attribute instance
Toperator[] (uint32 index)
 get a reference on an attribute instance
const Tback () const
Tback ()
Iterator / enumeration



iterator begin (void)
 Get an iterator at the beginning of the container.
iterator end (void)
 Get an iterator at the end of the container.
const_iterator begin (void) const
 Get a const_iterator at the beginning of the container.
const_iterator end (void) const
 Get a const_iterator at the end of the container.
Add / remove methods



sint32 insert (const T &t=T())
 create a new object in the tab.
void remove (uint32 index)
 remove an object from the tab
void clear (void)
 clear the container

Protected Attributes

TContType _Tab
uint32 _MaxSize

Detailed Description

template<typename T>
class NL3D::CPSAttrib< T >

This class is intended to store an attribute list in a located or in a located bindable such as speed, color and so on.

It is important to remember that a located holds all instance of object of one type (force, emitter, particles or both...).

Author:
Nicolas Vizerie
Nevrax France
Date:
2001

Definition at line 262 of file ps_attrib.h.


Member Typedef Documentation

template<typename T>
typedef TContType::const_iterator NL3D::CPSAttrib< T >::const_iterator

a const iterator on the datas

Definition at line 292 of file ps_attrib.h.

template<typename T>
typedef TContType::iterator NL3D::CPSAttrib< T >::iterator

an iterator on the datas

Definition at line 290 of file ps_attrib.h.

template<typename T>
typedef CPSVector<T>::V NL3D::CPSAttrib< T >::TContType

Container used by this class to store its datas.

The container type is likely to change depending on memory requirement.

Definition at line 284 of file ps_attrib.h.

template<typename T>
typedef T NL3D::CPSAttrib< T >::value_type

The type used by the container. Its is the type used to instanciate this template.

Definition at line 287 of file ps_attrib.h.


Constructor & Destructor Documentation

template<typename T >
NL3D::CPSAttrib< T >::CPSAttrib (  )  [inline]

ctor

Definition at line 398 of file ps_attrib.h.

References NL3D::CPSAttrib< T >::_MaxSize, and NL3D::DefaultMaxLocatedInstance.


Member Function Documentation

template<typename T>
T& NL3D::CPSAttrib< T >::back (  )  [inline]

Definition at line 339 of file ps_attrib.h.

template<typename T>
const T& NL3D::CPSAttrib< T >::back (  )  const [inline]

Definition at line 333 of file ps_attrib.h.

template<typename T>
const_iterator NL3D::CPSAttrib< T >::begin ( void   )  const [inline]

Get a const_iterator at the beginning of the container.

Definition at line 360 of file ps_attrib.h.

template<typename T>
iterator NL3D::CPSAttrib< T >::begin ( void   )  [inline]

Get an iterator at the beginning of the container.

Definition at line 354 of file ps_attrib.h.

Referenced by NL3D::CPSLocated::allocateParametricInfos(), NL3D::CPSLocated::computeBBox(), NL3D::CPSZoneRectangle::computeCollisions(), NL3D::CPSZoneCylinder::computeCollisions(), NL3D::CPSZoneDisc::computeCollisions(), NL3D::CPSZoneSphere::computeCollisions(), NL3D::CPSZonePlane::computeCollisions(), NL3D::CPSBrownianForce::computeForces(), NL3D::CPSMagneticForce::computeForces(), NL3D::CPSCylindricVortex::computeForces(), NL3D::CPSSpring::computeForces(), NL3D::CPSCentralGravity::computeForces(), NL3D::CPSGravity::computeForces(), NL3D::CPSDirectionnalForce::computeForces(), NL3D::CIsotropicForceT< T >::computeForces(), NL3D::CPSShockWave::draw(), NL3D::CPSConstraintMesh::draw(), NL3D::CPSFanLight::draw(), NL3D::CPSFaceLookAt::draw(), NL3D::CPSDot::draw(), NL3D::FillQuadCoordsLocalTime(), NL3D::CPSBrownianForce::integrate(), NL3D::CPSGravity::integrate(), NL3D::CPSPlaneBasisFollowSpeed::make(), NL3D::CPSAttribMakerT< NLMISC::CRGBA, CPSValueGradientFuncRGBA >::make(), NL3D::CPSPlaneBasisFollowSpeed::make4(), NL3D::CPSAttribMakerT< NLMISC::CRGBA, CPSValueGradientFuncRGBA >::make4(), NL3D::CPSPlaneBasisFollowSpeed::makeN(), NL3D::CPSAttribMakerT< NLMISC::CRGBA, CPSValueGradientFuncRGBA >::makeN(), NL3D::CPSLocated::performParametricMotion(), NL3D::CPSEmitter::processRegularEmission(), NL3D::CPSEmitter::processRegularEmissionConsistent(), NL3D::CPSEmitter::processRegularEmissionConsistentWithNoLOD(), NL3D::CPSEmitter::processRegularEmissionWithNoLOD(), NL3D::CPSRibbonBase::resetFromOwner(), NL3D::CPSZoneCylinder::show(), NL3D::CPSZoneDisc::show(), NL3D::CPSZoneSphere::show(), NL3D::CPSZonePlane::show(), NL3D::CPSGravity::show(), NL3D::CPSSphericalEmitter::showTool(), NL3D::CPSSound::step(), NL3D::CPSLight::step(), NL3D::CPSFace::step(), NL3D::CPSSound::stopSound(), NL3D::CPSRibbonBase::updateGlobals(), NL3D::CPSLocated::updateLife(), NL3D::CPSMesh::updatePos(), and NL3D::CPSMesh::~CPSMesh().

template<typename T>
void NL3D::CPSAttrib< T >::clear ( void   )  [inline]

clear the container

Definition at line 378 of file ps_attrib.h.

Referenced by NL3D::CPSLocated::serial().

template<typename T>
const_iterator NL3D::CPSAttrib< T >::end ( void   )  const [inline]

Get a const_iterator at the end of the container.

Definition at line 363 of file ps_attrib.h.

template<typename T>
iterator NL3D::CPSAttrib< T >::end ( void   )  [inline]
template<typename T>
uint32 NL3D::CPSAttrib< T >::getMaxSize ( void   )  const [inline]
template<typename T>
uint32 NL3D::CPSAttrib< T >::getSize ( void   )  const [inline]
template<typename T>
sint32 NL3D::CPSAttrib< T >::insert ( const T t = T()  )  [inline]
template<typename T>
T& NL3D::CPSAttrib< T >::operator[] ( uint32  index  )  [inline]

get a reference on an attribute instance

Definition at line 324 of file ps_attrib.h.

template<typename T>
const T& NL3D::CPSAttrib< T >::operator[] ( uint32  index  )  const [inline]

get a const reference on an attribute instance

Definition at line 315 of file ps_attrib.h.

template<typename T >
void NL3D::CPSAttrib< T >::remove ( uint32  index  )  [inline]
template<typename T >
void NL3D::CPSAttrib< T >::resize ( uint32  nbInstances  )  [inline]
template<typename T >
void NL3D::CPSAttrib< T >::serial ( NLMISC::IStream f  )  throw (NLMISC::EStream) [inline]

Serialization method.

Definition at line 439 of file ps_attrib.h.

References NLMISC::IStream::isReading(), nlassert, NLMISC::IStream::serial(), and NLMISC::IStream::serialVersion().

template<typename T>
void NL3D::CPSAttrib< T >::swap ( CPSAttrib< T > &  other  )  [inline]

Member Data Documentation

template<typename T>
uint32 NL3D::CPSAttrib< T >::_MaxSize [protected]
template<typename T>
TContType NL3D::CPSAttrib< T >::_Tab [protected]

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

Generated on Thu Jan 7 08:30:07 2010 for NeL by  doxygen 1.6.1