foobar2000 SDK  2015-08-03
Public Member Functions | Protected Member Functions
chapter_listabstract

#include <chapterizer.h>

+ Inheritance diagram for chapter_list:

Public Member Functions

void copy (const chapter_list &p_source)
 
virtual t_size get_chapter_count () const =0
 
virtual const file_infoget_info (t_size p_chapter) const =0
 
virtual double get_pregap () const =0
 
const chapter_listoperator= (const chapter_list &p_source)
 
virtual void set_chapter_count (t_size p_count)=0
 
virtual void set_info (t_size p_chapter, const file_info &p_info)=0
 
virtual void set_pregap (double val)=0
 

Protected Member Functions

 chapter_list ()
 
 ~chapter_list ()
 

Detailed Description

Interface for object storing list of chapters.

Definition at line 2 of file chapterizer.h.

Constructor & Destructor Documentation

chapter_list::chapter_list ( )
inlineprotected

Definition at line 27 of file chapterizer.h.

27 {}
chapter_list::~chapter_list ( )
inlineprotected

Definition at line 28 of file chapterizer.h.

28 {}

Member Function Documentation

void chapter_list::copy ( const chapter_list p_source)

Copies contents of specified chapter_list object to this object.

Definition at line 3 of file chapterizer.cpp.

4 {
5  t_size n, count = p_source.get_chapter_count();
6  set_chapter_count(count);
7  for(n=0;n<count;n++) set_info(n,p_source.get_info(n));
8  set_pregap(p_source.get_pregap());
9 }
virtual const file_info & get_info(t_size p_chapter) const =0
Queries description of specified chapter.
virtual void set_info(t_size p_chapter, const file_info &p_info)=0
Modifies description of specified chapter.
size_t t_size
Definition: int_types.h:48
virtual void set_chapter_count(t_size p_count)=0
Sets number of chapters.
virtual t_size get_chapter_count() const =0
Returns number of chapters.
virtual double get_pregap() const =0
virtual void set_pregap(double val)=0
virtual t_size chapter_list::get_chapter_count ( ) const
pure virtual

Returns number of chapters.

Implemented in chapter_list_impl_t< file_info_ >.

virtual const file_info& chapter_list::get_info ( t_size  p_chapter) const
pure virtual

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.

Implemented in chapter_list_impl_t< file_info_ >.

virtual double chapter_list::get_pregap ( ) const
pure virtual
const chapter_list& chapter_list::operator= ( const chapter_list p_source)
inline

Definition at line 24 of file chapterizer.h.

24 {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
virtual void chapter_list::set_chapter_count ( t_size  p_count)
pure virtual

Sets number of chapters.

Implemented in chapter_list_impl_t< file_info_ >.

virtual void chapter_list::set_info ( t_size  p_chapter,
const file_info p_info 
)
pure virtual

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.

Implemented in chapter_list_impl_t< file_info_ >.

virtual void chapter_list::set_pregap ( double  val)
pure virtual

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