foobar2000 SDK  2015-08-03
Public Types | Public Member Functions | Private Attributes
chapter_list_impl_t< file_info_ >

#include <chapterizer.h>

+ Inheritance diagram for chapter_list_impl_t< file_info_ >:

Public Types

typedef chapter_list_impl_t< file_info_ > t_self
 

Public Member Functions

 chapter_list_impl_t ()
 
 chapter_list_impl_t (const chapter_list &p_source)
 
t_size get_chapter_count () const
 
const file_infoget_info (t_size p_chapter) const
 
file_info_ & get_info_ (t_size p_chapter)
 
double get_pregap () const
 
const t_selfoperator= (const chapter_list &p_source)
 
void set_chapter_count (t_size p_count)
 
void set_info (t_size p_chapter, const file_info &p_info)
 
void set_pregap (double val)
 
- Public Member Functions inherited from chapter_list
void copy (const chapter_list &p_source)
 
const chapter_listoperator= (const chapter_list &p_source)
 

Private Attributes

pfc::array_t< file_info_ > m_infos
 
double m_pregap
 

Additional Inherited Members

- Protected Member Functions inherited from chapter_list
 chapter_list ()
 
 ~chapter_list ()
 

Detailed Description

template<typename file_info_ = file_info_impl>
class chapter_list_impl_t< file_info_ >

Implements chapter_list.

Definition at line 33 of file chapterizer.h.

Member Typedef Documentation

template<typename file_info_ = file_info_impl>
typedef chapter_list_impl_t<file_info_> chapter_list_impl_t< file_info_ >::t_self

Definition at line 36 of file chapterizer.h.

Constructor & Destructor Documentation

template<typename file_info_ = file_info_impl>
chapter_list_impl_t< file_info_ >::chapter_list_impl_t ( )
inline

Definition at line 35 of file chapterizer.h.

35 : m_pregap() {}
template<typename file_info_ = file_info_impl>
chapter_list_impl_t< file_info_ >::chapter_list_impl_t ( const chapter_list p_source)
inline

Definition at line 37 of file chapterizer.h.

37 : m_pregap() {copy(p_source);}
void copy(const chapter_list &p_source)
Copies contents of specified chapter_list object to this object.
Definition: chapterizer.cpp:3

Member Function Documentation

template<typename file_info_ = file_info_impl>
t_size chapter_list_impl_t< file_info_ >::get_chapter_count ( ) const
inlinevirtual

Returns number of chapters.

Implements chapter_list.

Definition at line 41 of file chapterizer.h.

41 {return m_infos.get_size();}
pfc::array_t< file_info_ > m_infos
Definition: chapterizer.h:51
t_size get_size() const
Definition: array.h:130
template<typename file_info_ = file_info_impl>
const file_info& chapter_list_impl_t< file_info_ >::get_info ( t_size  p_chapter) const
inlinevirtual

Queries description of specified chapter.

Parameters
p_chapterIndex of chapter to query, greater or equal zero and less than get_chapter_count() value. If p_chapter value is out of valid range, results are undefined (e.g. crash).
Returns
reference to file_info object describing specified chapter (length part of file_info indicates distance between beginning of this chapter and next chapter mark). Returned reference value for temporary use only, becomes invalid after any non-const operation on the chapter_list object.

Implements chapter_list.

Definition at line 42 of file chapterizer.h.

42 {return m_infos[p_chapter];}
pfc::array_t< file_info_ > m_infos
Definition: chapterizer.h:51
template<typename file_info_ = file_info_impl>
file_info_& chapter_list_impl_t< file_info_ >::get_info_ ( t_size  p_chapter)
inline

Definition at line 46 of file chapterizer.h.

46 {return m_infos[p_chapter];}
pfc::array_t< file_info_ > m_infos
Definition: chapterizer.h:51
template<typename file_info_ = file_info_impl>
double chapter_list_impl_t< file_info_ >::get_pregap ( ) const
inlinevirtual

Implements chapter_list.

Definition at line 48 of file chapterizer.h.

48 {return m_pregap;}
template<typename file_info_ = file_info_impl>
const t_self& chapter_list_impl_t< file_info_ >::operator= ( const chapter_list p_source)
inline

Definition at line 39 of file chapterizer.h.

39 {copy(p_source); return *this;}
void copy(const chapter_list &p_source)
Copies contents of specified chapter_list object to this object.
Definition: chapterizer.cpp:3
template<typename file_info_ = file_info_impl>
void chapter_list_impl_t< file_info_ >::set_chapter_count ( t_size  p_count)
inlinevirtual

Sets number of chapters.

Implements chapter_list.

Definition at line 44 of file chapterizer.h.

44 {m_infos.set_size(p_count);}
pfc::array_t< file_info_ > m_infos
Definition: chapterizer.h:51
void set_size(t_size p_size)
Definition: array.h:104
template<typename file_info_ = file_info_impl>
void chapter_list_impl_t< file_info_ >::set_info ( t_size  p_chapter,
const file_info p_info 
)
inlinevirtual

Modifies description of specified chapter.

Parameters
p_chapter_indexIndex of chapter to modify, greater or equal zero and less than get_chapter_count() value. If p_chapter value is out of valid range, results are undefined (e.g. crash).
p_infoNew chapter description. Note that length part of file_info is used to calculate chapter marks.

Implements chapter_list.

Definition at line 45 of file chapterizer.h.

45 {m_infos[p_chapter] = p_info;}
pfc::array_t< file_info_ > m_infos
Definition: chapterizer.h:51
template<typename file_info_ = file_info_impl>
void chapter_list_impl_t< file_info_ >::set_pregap ( double  val)
inlinevirtual

Implements chapter_list.

Definition at line 49 of file chapterizer.h.

49 {PFC_ASSERT(val >= 0); m_pregap = val;}

Field Documentation

template<typename file_info_ = file_info_impl>
pfc::array_t<file_info_> chapter_list_impl_t< file_info_ >::m_infos
private

Definition at line 51 of file chapterizer.h.

template<typename file_info_ = file_info_impl>
double chapter_list_impl_t< file_info_ >::m_pregap
private

Definition at line 52 of file chapterizer.h.


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