IMP logo

IMP::VectorOfRefCounted< RC, Policy > Class Template Reference


Detailed Description

template<class RC, class Policy = IMP::RefCounted::Policy>
class IMP::VectorOfRefCounted< RC, Policy >

A vector-like container for reference counted objects.

The interface of this class is like that of std::vector.

Documentation for std::vector can be found as part of the SGI stl documentation, among other places (http://www.sgi.com/tech/stl/Vector.html).

The first template argument should, in general, be a pointer to the type of object. The second tells the container how to do ref counting and should probably be left with its default value.

When used within Python, IMP::VectorOfRefCounted acts like a Python list.

Inheritance diagram for IMP::VectorOfRefCounted< RC, Policy >:

Inheritance graph
[legend]

Public Types

typedef RC const_reference
typedef RC & reference
typedef RC value_type

Public Member Functions

RC back () const
iterator begin ()
const_iterator begin () const
void clear ()
bool empty () const
iterator end ()
const_iterator end () const
void erase (iterator b, iterator e)
void erase (iterator it)
RC front () const
RC get (unsigned int i) const
void insert (iterator loc, RC p)
template<class It >
void insert (iterator loc, It b, It e)
 operator const std::vector< RC > & () const
const VectorOfRefCounted< RC,
Policy > 
operator= (const VectorOfRefCounted< RC, Policy > &o)
RC operator[] (unsigned int i) const
RC & operator[] (unsigned int i)
void pop_back ()
void push_back (RC p)
void remove (RC r)
template<class F >
void remove_if (const F &f)
void reserve (unsigned int i)
void resize (unsigned int i)
void set (unsigned int i, RC p)
void show (std::ostream &out=std::cout) const
unsigned int size () const
template<class Less >
void sort (const Less &f)
 f should take two Particle*
 VectorOfRefCounted (unsigned int i)
 VectorOfRefCounted (unsigned int n, RC rc)
 VectorOfRefCounted (RC rc)
 VectorOfRefCounted (const VectorOfRefCounted< RC, Policy > &o)
template<class It >
 VectorOfRefCounted (It b, It e)
 VectorOfRefCounted (const std::vector< RC > &o)

Member Function Documentation

template<class RC, class Policy = IMP::RefCounted::Policy>
RC& IMP::VectorOfRefCounted< RC, Policy >::operator[] ( unsigned int  i  ) 

Change a value in the vector (and refcount appropriately).


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

Generated on Mon Mar 8 23:08:46 2010 for IMP by doxygen 1.5.8