HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TsKeyFrameMap Class Reference

An ordered sequence of keyframes with STL-compliant API for finding, inserting, and erasing keyframes while maintaining order. More...

#include <keyFrameMap.h>

Public Types

typedef std::vector
< TsKeyFrame >::iterator 
iterator
 
typedef std::vector
< TsKeyFrame >::const_iterator 
const_iterator
 
typedef std::vector
< TsKeyFrame >
::reverse_iterator 
reverse_iterator
 
typedef std::vector
< TsKeyFrame >
::const_reverse_iterator 
const_reverse_iterator
 

Public Member Functions

TS_API TsKeyFrameMap ()
 
TS_API TsKeyFrameMap (TsKeyFrameMap const &other)
 
TS_API TsKeyFrameMapoperator= (TsKeyFrameMap const &other)
 
TS_API iterator begin ()
 
TS_API const_iterator begin () const
 
TS_API iterator end ()
 
TS_API const_iterator end () const
 
TS_API reverse_iterator rbegin ()
 
TS_API const_reverse_iterator rbegin () const
 
TS_API reverse_iterator rend ()
 
TS_API const_reverse_iterator rend () const
 
TS_API size_t size () const
 
TS_API size_t max_size () const
 
TS_API bool empty () const
 
TS_API void reserve (size_t size)
 
TS_API void clear ()
 
TS_API void swap (TsKeyFrameMap &other)
 
TS_API void swap (std::vector< TsKeyFrame > &other)
 
TS_API void erase (iterator first, iterator last)
 
TS_API void erase (iterator i)
 
TS_API bool operator== (const TsKeyFrameMap &other) const
 
TS_API bool operator!= (const TsKeyFrameMap &other) const
 
TS_API iterator lower_bound (TsTime t)
 
TS_API const_iterator lower_bound (TsTime t) const
 
TS_API iterator upper_bound (TsTime t)
 
TS_API const_iterator upper_bound (TsTime t) const
 
TS_API iterator find (const TsTime &t)
 
TS_API const_iterator find (const TsTime &t) const
 
TS_API iterator insert (TsKeyFrame const &value)
 
template<class Iter >
void insert (Iter const &first, Iter const &last)
 
TS_API void erase (TsTime const &t)
 
TS_API TsKeyFrameoperator[] (const TsTime &t)
 

Detailed Description

An ordered sequence of keyframes with STL-compliant API for finding, inserting, and erasing keyframes while maintaining order.

We use this instead of a map or set of keyframes because it allows the keyframes to be stored with fewer heap allocation and better data locality.

For the sake of efficiency, this class makes two assumptions: The keyframes are always ordered There is never more than one key frame at a given time.

The client (TsSpline) is responsible for maintaining these preconditions.

Definition at line 50 of file keyFrameMap.h.

Member Typedef Documentation

Definition at line 54 of file keyFrameMap.h.

Definition at line 56 of file keyFrameMap.h.

Definition at line 53 of file keyFrameMap.h.

Definition at line 55 of file keyFrameMap.h.

Constructor & Destructor Documentation

TS_API TsKeyFrameMap::TsKeyFrameMap ( )
inline

Definition at line 59 of file keyFrameMap.h.

TS_API TsKeyFrameMap::TsKeyFrameMap ( TsKeyFrameMap const &  other)
inline

Definition at line 63 of file keyFrameMap.h.

Member Function Documentation

TS_API iterator TsKeyFrameMap::begin ( void  )
inline

Definition at line 74 of file keyFrameMap.h.

TS_API const_iterator TsKeyFrameMap::begin ( void  ) const
inline

Definition at line 79 of file keyFrameMap.h.

TS_API void TsKeyFrameMap::clear ( void  )
inline

Definition at line 134 of file keyFrameMap.h.

TS_API bool TsKeyFrameMap::empty ( void  ) const
inline

Definition at line 124 of file keyFrameMap.h.

TS_API iterator TsKeyFrameMap::end ( void  )
inline

Definition at line 84 of file keyFrameMap.h.

TS_API const_iterator TsKeyFrameMap::end ( void  ) const
inline

Definition at line 89 of file keyFrameMap.h.

TS_API void TsKeyFrameMap::erase ( iterator  first,
iterator  last 
)
inline

Definition at line 149 of file keyFrameMap.h.

TS_API void TsKeyFrameMap::erase ( iterator  i)
inline

Definition at line 154 of file keyFrameMap.h.

TS_API void TsKeyFrameMap::erase ( TsTime const &  t)
inline

Definition at line 218 of file keyFrameMap.h.

TS_API iterator TsKeyFrameMap::find ( const TsTime t)
inline

Definition at line 181 of file keyFrameMap.h.

TS_API const_iterator TsKeyFrameMap::find ( const TsTime t) const
inline

Definition at line 190 of file keyFrameMap.h.

TS_API iterator TsKeyFrameMap::insert ( TsKeyFrame const &  value)
inline

Definition at line 199 of file keyFrameMap.h.

template<class Iter >
void TsKeyFrameMap::insert ( Iter const &  first,
Iter const &  last 
)
inline

Definition at line 211 of file keyFrameMap.h.

TS_API iterator TsKeyFrameMap::lower_bound ( TsTime  t)
TS_API const_iterator TsKeyFrameMap::lower_bound ( TsTime  t) const
TS_API size_t TsKeyFrameMap::max_size ( void  ) const
inline

Definition at line 119 of file keyFrameMap.h.

TS_API bool TsKeyFrameMap::operator!= ( const TsKeyFrameMap other) const
inline

Definition at line 164 of file keyFrameMap.h.

TS_API TsKeyFrameMap& TsKeyFrameMap::operator= ( TsKeyFrameMap const &  other)
inline

Definition at line 68 of file keyFrameMap.h.

TS_API bool TsKeyFrameMap::operator== ( const TsKeyFrameMap other) const
inline

Definition at line 159 of file keyFrameMap.h.

TS_API TsKeyFrame& TsKeyFrameMap::operator[] ( const TsTime t)
inline

Definition at line 226 of file keyFrameMap.h.

TS_API reverse_iterator TsKeyFrameMap::rbegin ( )
inline

Definition at line 94 of file keyFrameMap.h.

TS_API const_reverse_iterator TsKeyFrameMap::rbegin ( ) const
inline

Definition at line 99 of file keyFrameMap.h.

TS_API reverse_iterator TsKeyFrameMap::rend ( )
inline

Definition at line 104 of file keyFrameMap.h.

TS_API const_reverse_iterator TsKeyFrameMap::rend ( ) const
inline

Definition at line 109 of file keyFrameMap.h.

TS_API void TsKeyFrameMap::reserve ( size_t  size)
inline

Definition at line 129 of file keyFrameMap.h.

TS_API size_t TsKeyFrameMap::size ( void  ) const
inline

Definition at line 114 of file keyFrameMap.h.

TS_API void TsKeyFrameMap::swap ( TsKeyFrameMap other)
inline

Definition at line 139 of file keyFrameMap.h.

TS_API void TsKeyFrameMap::swap ( std::vector< TsKeyFrame > &  other)
inline

Definition at line 144 of file keyFrameMap.h.

TS_API iterator TsKeyFrameMap::upper_bound ( TsTime  t)
TS_API const_iterator TsKeyFrameMap::upper_bound ( TsTime  t) const

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