You.i Engine
CYITimelineBackingStore Class Reference

Detailed Description

A class containing timeline marker and track data required to create a CYITimeline.

The timeline backing store maintains all data required to create a CYITimeline. You.i Engine builds a timeline backing store for each CYIAssetViewTemplate when loading the template asset. This process of building the timeline backing store for each CYIAssetViewTemplate at load time allows a user of You.i Engine to access CYITimelines through CYISceneView APIs.

See also
CYISceneView::GetTimeline
CYISceneView::GetViewTemplate
CYIAEViewTemplate::GetTimelineSource
CYIAssetTimelineSource::GetTimelineBackingStore
CYITimelineTrack
CYIMarkerData

#include <animation/YiTimelineBackingStore.h>

Inheritance diagram for CYITimelineBackingStore:

Public Member Functions

 CYITimelineBackingStore ()
 
virtual ~CYITimelineBackingStore ()
 
CYITimelineTrackAddTrack (uint32_t nTrackID, CYITimelineTrack::ATTRIBUTE_TYPE attribute, const CYIString &targetName)
 
void AddMarker (const CYIString &name, uint32_t uStartTime, uint32_t uDuration, const std::list< CYITimelineTrack::TRACK_IDENTIFIER > &rTracksSelection, const std::map< CYIString, CYIString > &rMarkerProperties)
 
void AddMarker (CYIMarkerData::MARKER_ID eMarkerID, uint32_t uStartTime, uint32_t uDuration, const std::list< CYITimelineTrack::TRACK_IDENTIFIER > &rTracksSelection, const std::map< CYIString, CYIString > &rMarkerProperties)
 
std::unique_ptr< CYITimelineCreateTimeline (CYISceneNode *pRootNode=nullptr)
 
std::unique_ptr< CYITimelineCreateTimeline (const CYIString &markerName, CYISceneNode *pRootNode=nullptr)
 
std::unique_ptr< CYITimelineCreateTimeline (CYIMarkerData::MARKER_ID eMarkerID, CYISceneNode *pRootNode=nullptr)
 
std::unique_ptr< CYITimelineCreateTimelineFromMarkerIndex (uint32_t uMarkerIndex, CYISceneNode *pRootNode=nullptr)
 
std::unique_ptr< CYITimelineCreateTimeline (uint32_t uStartTime, uint32_t uDuration, CYISceneNode *pRootNode=nullptr)
 
void Finalize ()
 
virtual uint32_t GetTotalTime () const
 
const CYITimelineTrackGetTrack (uint32_t uTrackID) const
 
const CYITimelineTrackGetTrack (CYITimelineTrack::ATTRIBUTE_TYPE eAttribute, const CYIString &name) const
 
uint32_t GetTrackCount () const
 
uint32_t GetMarkerCount () const
 
const CYIMarkerDataGetMarkerData (const CYIString &rMarkerName) const
 
const CYIStringGetMarkerNameFromMarkerIndex (uint32_t uMarkerIndex) const
 
int32_t GetApproximateSize () const
 

Friends

class CYITimelineBackingStorePriv
 

Constructor & Destructor Documentation

CYITimelineBackingStore::CYITimelineBackingStore ( )
virtual CYITimelineBackingStore::~CYITimelineBackingStore ( )
virtual

Member Function Documentation

void CYITimelineBackingStore::AddMarker ( const CYIString name,
uint32_t  uStartTime,
uint32_t  uDuration,
const std::list< CYITimelineTrack::TRACK_IDENTIFIER > &  rTracksSelection,
const std::map< CYIString, CYIString > &  rMarkerProperties 
)

Adds a marker to the backing store given the name of the marker, the uStartTime of the marker in milliseconds and a uDuration of the marker in milliseconds. Only the tracks specified by the rTrackSelection list will be used when creating the CYITimeline for this marker, if no tracks are specified all tracks in the backing store will be included.

See also
CYIMarkerData
void CYITimelineBackingStore::AddMarker ( CYIMarkerData::MARKER_ID  eMarkerID,
uint32_t  uStartTime,
uint32_t  uDuration,
const std::list< CYITimelineTrack::TRACK_IDENTIFIER > &  rTracksSelection,
const std::map< CYIString, CYIString > &  rMarkerProperties 
)

Adds a marker to the backing store given a eMarkerID.

See also
AddMarker(const CYIString &name, uint64_t uStartTime, uint64_t uDuration, const std::list<CYITimelineTrack::TRACK_IDENTIFIER> &rTracksSelection)
CYITimelineTrack* CYITimelineBackingStore::AddTrack ( uint32_t  nTrackID,
CYITimelineTrack::ATTRIBUTE_TYPE  attribute,
const CYIString targetName 
)

Creates a CYITimelineTrack and adds the track to the backing store.

Returns a new CYITimelineTrack constructed with the provided parameters, this CYITimelineTrack is owned by the backing store. Returns nullptr if the track with nTrackID already exists in the backing store.

std::unique_ptr<CYITimeline> CYITimelineBackingStore::CreateTimeline ( CYISceneNode pRootNode = nullptr)

Returns a new timeline, the timeline will be constructed to span the full length of the backing store. pRootNode should be specified if there is a node associated with the timeline at the time of creation.

See also
CYITimeline::SetRootNode
std::unique_ptr<CYITimeline> CYITimelineBackingStore::CreateTimeline ( const CYIString markerName,
CYISceneNode pRootNode = nullptr 
)

Returns a new timeline given a markerName, the timeline will be constructed only for the provided marker. pRootNode should be specified if there is a node associated with the timeline at the time of creation. Returns nullptr if the marker is not found in the backing store.

See also
CYITimeline::SetRootNode
std::unique_ptr<CYITimeline> CYITimelineBackingStore::CreateTimeline ( CYIMarkerData::MARKER_ID  eMarkerID,
CYISceneNode pRootNode = nullptr 
)

Returns a new timeline given an eMarkerID, the timeline will be constructed only for the provided marker. pRootNode should be specified if there is a node associated with the timeline at the time of creation. Returns nullptr if the marker is not found in the backing store.

See also
CYITimeline::SetRootNode
std::unique_ptr<CYITimeline> CYITimelineBackingStore::CreateTimeline ( uint32_t  uStartTime,
uint32_t  uDuration,
CYISceneNode pRootNode = nullptr 
)

Returns a new timeline starting at uStartTime and running for uDuration of the backing store. uStartTime and uDuration should be provided in milliseconds. pRootNode should be specified if there is a node associated with the timeline at the time of creation. Returns nullptr if the marker is not found in the backing store.

See also
CYITimeline::SetRootNode
std::unique_ptr<CYITimeline> CYITimelineBackingStore::CreateTimelineFromMarkerIndex ( uint32_t  uMarkerIndex,
CYISceneNode pRootNode = nullptr 
)

Returns a new timeline given a uMarkerIndex, the timeline will be constructed only for the provided marker. pRootNode should be specified if there is a node associated with the timeline at the time of creation. Returns nullptr if the index is greater than the number of markers in the backing store.

Note
- uMarkerIndex is zero based.
void CYITimelineBackingStore::Finalize ( )

Must be called after adding tracks to the backing store to configure the tracks and update backing store totals.

See also
GetTotalTime
int32_t CYITimelineBackingStore::GetApproximateSize ( ) const

Returns the approximate size of the backing store, in bytes. This approximation includes all markers and tracks in the backing store as well as class signature sizes.

uint32_t CYITimelineBackingStore::GetMarkerCount ( ) const

Returns the total number of markers in the backing store.

const CYIMarkerData* CYITimelineBackingStore::GetMarkerData ( const CYIString rMarkerName) const

Returns the CYIMarkerData for the marker in the backing store with rMarkerName. Returns nullptr if the marker is not found in the backing store.

const CYIString& CYITimelineBackingStore::GetMarkerNameFromMarkerIndex ( uint32_t  uMarkerIndex) const

Returns the name of a marker in the backing store given the marker's uMarkerIndex. Return an empty string if the uMarkerIndex is greater than the number of markers in the backing store.

virtual uint32_t CYITimelineBackingStore::GetTotalTime ( ) const
virtual

Returns the total time of the backing store. This is equivalent to the longest track in the backing store.

const CYITimelineTrack* CYITimelineBackingStore::GetTrack ( uint32_t  uTrackID) const

Returns a track from the backing store given the track's uTrackID. Returns nullptr if the track is not found in the backing store.

const CYITimelineTrack* CYITimelineBackingStore::GetTrack ( CYITimelineTrack::ATTRIBUTE_TYPE  eAttribute,
const CYIString name 
) const

Returns a track from the backing store given the track's eAttribute and name. Returns nullptr if the track is not found in the backing store.

uint32_t CYITimelineBackingStore::GetTrackCount ( ) const

Returns the total number of tracks in the backing store.

Friends And Related Function Documentation

friend class CYITimelineBackingStorePriv
friend

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