Choreonoid  1.8
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cnoid::Seq< ElementType > Class Template Reference

#include <Seq.h>

Inheritance diagram for cnoid::Seq< ElementType >:
cnoid::AbstractSeq

Public Types

typedef ElementType value_type
 

Public Member Functions

 Seq (const char *seqType, int nFrames=0.0)
 
 Seq (const SeqType &org)
 
SeqTypeoperator= (const SeqType &rhs)
 
virtual AbstractSeqoperator= (const AbstractSeq &rhs) override
 
virtual std::shared_ptr< AbstractSeqcloneSeq () const override
 
virtual ~Seq ()
 
double frameRate () const
 
virtual double getFrameRate () const override
 
virtual void setFrameRate (double frameRate) override
 
int numFrames () const
 
virtual int getNumFrames () const override
 
virtual void setNumFrames (int n, bool fillNewElements=false) override
 
void clear ()
 
bool empty () const
 
double timeLength () const
 
int frameOfTime (double time) const
 
int lastFrameOfTime (double time) const
 
double timeOfFrame (int frame) const
 
virtual double getOffsetTime () const override
 
virtual void setOffsetTime (double time) override
 
int offsetTimeFrame () const
 
void setOffsetTimeFrame (int offset)
 
ElementType & operator[] (int frameIndex)
 
const ElementType & operator[] (int frameIndex) const
 
ElementType & at (int frameIndex)
 
const ElementType & at (int frameIndex) const
 
ElementType & front ()
 
const ElementType & front () const
 
ElementType & back ()
 
const ElementType & back () const
 
int clampFrameIndex (int frameIndex, bool &out_isValidRange)
 
- Public Member Functions inherited from cnoid::AbstractSeq
virtual ~AbstractSeq ()
 
void copySeqProperties (const AbstractSeq &source)
 
const std::string & seqType () const
 
double getTimeStep () const
 
void setTimeStep (double timeStep)
 
double getTimeOfFrame (int frame) const
 
int getFrameOfTime (double time) const
 
int getOffsetTimeFrame () const
 
void setTimeLength (double length, bool clearNewElements=false)
 
double getTimeLength () const
 
const std::string & seqContentName ()
 
virtual void setSeqContentName (const std::string &name)
 
bool readSeq (const Mapping *archive, std::ostream &os=nullout())
 
bool writeSeq (YAMLWriter &writer)
 
const std::string & seqMessage () const
 deprecated. Use the os parameter of readSeq to get messages in reading More...
 

Protected Member Functions

virtual ElementType defaultValue () const
 
- Protected Member Functions inherited from cnoid::AbstractSeq
 AbstractSeq (const char *seqType)
 
 AbstractSeq (const AbstractSeq &org)
 
void setSeqType (const std::string &type)
 
virtual bool doReadSeq (const Mapping *archive, std::ostream &os)
 
virtual bool doWriteSeq (YAMLWriter &writer, std::function< void()> additionalPartCallback)
 
void clearSeqMessage ()
 deprecated. Use the os parameter of readSeq to get messages in reading More...
 
void addSeqMessage (const std::string &message)
 deprecated. Use the os parameter of readSeq to get messages in reading More...
 

Protected Attributes

std::vector< ElementType > container
 
double frameRate_
 
double offsetTime_
 

Additional Inherited Members

- Static Public Member Functions inherited from cnoid::AbstractSeq
static double defaultFrameRate ()
 

Member Typedef Documentation

◆ value_type

template<typename ElementType >
typedef ElementType cnoid::Seq< ElementType >::value_type

Constructor & Destructor Documentation

◆ Seq() [1/2]

template<typename ElementType >
cnoid::Seq< ElementType >::Seq ( const char *  seqType,
int  nFrames = 0.0 
)
inline

◆ Seq() [2/2]

template<typename ElementType >
cnoid::Seq< ElementType >::Seq ( const SeqType org)
inline

◆ ~Seq()

template<typename ElementType >
virtual cnoid::Seq< ElementType >::~Seq ( )
inlinevirtual

Member Function Documentation

◆ at() [1/2]

template<typename ElementType >
ElementType& cnoid::Seq< ElementType >::at ( int  frameIndex)
inline

◆ at() [2/2]

template<typename ElementType >
const ElementType& cnoid::Seq< ElementType >::at ( int  frameIndex) const
inline

◆ back() [1/2]

template<typename ElementType >
ElementType& cnoid::Seq< ElementType >::back ( )
inline

◆ back() [2/2]

template<typename ElementType >
const ElementType& cnoid::Seq< ElementType >::back ( ) const
inline

◆ clampFrameIndex()

template<typename ElementType >
int cnoid::Seq< ElementType >::clampFrameIndex ( int  frameIndex,
bool &  out_isValidRange 
)
inline

◆ clear()

template<typename ElementType >
void cnoid::Seq< ElementType >::clear ( )
inline

◆ cloneSeq()

template<typename ElementType >
virtual std::shared_ptr<AbstractSeq> cnoid::Seq< ElementType >::cloneSeq ( ) const
inlineoverridevirtual

Implements cnoid::AbstractSeq.

◆ defaultValue()

template<typename ElementType >
virtual ElementType cnoid::Seq< ElementType >::defaultValue ( ) const
inlineprotectedvirtual

◆ empty()

template<typename ElementType >
bool cnoid::Seq< ElementType >::empty ( ) const
inline

◆ frameOfTime()

template<typename ElementType >
int cnoid::Seq< ElementType >::frameOfTime ( double  time) const
inline

◆ frameRate()

template<typename ElementType >
double cnoid::Seq< ElementType >::frameRate ( ) const
inline

◆ front() [1/2]

template<typename ElementType >
ElementType& cnoid::Seq< ElementType >::front ( )
inline

◆ front() [2/2]

template<typename ElementType >
const ElementType& cnoid::Seq< ElementType >::front ( ) const
inline

◆ getFrameRate()

template<typename ElementType >
virtual double cnoid::Seq< ElementType >::getFrameRate ( ) const
inlineoverridevirtual

Implements cnoid::AbstractSeq.

◆ getNumFrames()

template<typename ElementType >
virtual int cnoid::Seq< ElementType >::getNumFrames ( ) const
inlineoverridevirtual

Implements cnoid::AbstractSeq.

◆ getOffsetTime()

template<typename ElementType >
virtual double cnoid::Seq< ElementType >::getOffsetTime ( ) const
inlineoverridevirtual

Implements cnoid::AbstractSeq.

◆ lastFrameOfTime()

template<typename ElementType >
int cnoid::Seq< ElementType >::lastFrameOfTime ( double  time) const
inline

◆ numFrames()

template<typename ElementType >
int cnoid::Seq< ElementType >::numFrames ( ) const
inline

◆ offsetTimeFrame()

template<typename ElementType >
int cnoid::Seq< ElementType >::offsetTimeFrame ( ) const
inline

◆ operator=() [1/2]

template<typename ElementType >
virtual AbstractSeq& cnoid::Seq< ElementType >::operator= ( const AbstractSeq< ElementType > &  rhs)
inlineoverridevirtual

Reimplemented from cnoid::AbstractSeq.

Reimplemented in cnoid::ZMPSeq.

◆ operator=() [2/2]

template<typename ElementType >
SeqType& cnoid::Seq< ElementType >::operator= ( const SeqType rhs)
inline

◆ operator[]() [1/2]

template<typename ElementType >
ElementType& cnoid::Seq< ElementType >::operator[] ( int  frameIndex)
inline

◆ operator[]() [2/2]

template<typename ElementType >
const ElementType& cnoid::Seq< ElementType >::operator[] ( int  frameIndex) const
inline

◆ setFrameRate()

template<typename ElementType >
virtual void cnoid::Seq< ElementType >::setFrameRate ( double  frameRate)
inlineoverridevirtual

Implements cnoid::AbstractSeq.

◆ setNumFrames()

template<typename ElementType >
virtual void cnoid::Seq< ElementType >::setNumFrames ( int  n,
bool  fillNewElements = false 
)
inlineoverridevirtual

Implements cnoid::AbstractSeq.

◆ setOffsetTime()

template<typename ElementType >
virtual void cnoid::Seq< ElementType >::setOffsetTime ( double  time)
inlineoverridevirtual

Implements cnoid::AbstractSeq.

◆ setOffsetTimeFrame()

template<typename ElementType >
void cnoid::Seq< ElementType >::setOffsetTimeFrame ( int  offset)
inline

◆ timeLength()

template<typename ElementType >
double cnoid::Seq< ElementType >::timeLength ( ) const
inline

◆ timeOfFrame()

template<typename ElementType >
double cnoid::Seq< ElementType >::timeOfFrame ( int  frame) const
inline

Member Data Documentation

◆ container

template<typename ElementType >
std::vector<ElementType> cnoid::Seq< ElementType >::container
protected

◆ frameRate_

template<typename ElementType >
double cnoid::Seq< ElementType >::frameRate_
protected

◆ offsetTime_

template<typename ElementType >
double cnoid::Seq< ElementType >::offsetTime_
protected

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