foobar2000 SDK  2015-01-14
Data Structures | Public Member Functions | Static Public Member Functions | Protected Member Functions
playable_locationabstract

#include <playable_location.h>

+ Inheritance diagram for playable_location:

Data Structures

class  comparator
 

Public Member Functions

void copy (const playable_location &p_other)
 
virtual const char * get_path () const =0
 
virtual t_uint32 get_subsong () const =0
 
t_uint32 get_subsong_index () const
 
bool is_empty ()
 
bool is_empty () const
 
bool is_valid () const
 
bool operator!= (const playable_location &p_other) const
 
const playable_locationoperator= (const playable_location &src)
 
bool operator== (const playable_location &p_other) const
 
void reset ()
 
virtual void set_path (const char *)=0
 
virtual void set_subsong (t_uint32)=0
 
void set_subsong_index (t_uint32 v)
 

Static Public Member Functions

static int g_compare (const playable_location &p_item1, const playable_location &p_item2)
 
static bool g_equals (const playable_location &p_item1, const playable_location &p_item2)
 

Protected Member Functions

 playable_location ()
 
 ~playable_location ()
 

Detailed Description

Definition at line 10 of file playable_location.h.

Constructor & Destructor Documentation

playable_location::playable_location ( )
inlineprotected

Definition at line 46 of file playable_location.h.

46 {}
playable_location::~playable_location ( )
inlineprotected

Definition at line 47 of file playable_location.h.

47 {}

Member Function Documentation

void playable_location::copy ( const playable_location p_other)
inline

Definition at line 18 of file playable_location.h.

18  {
19  set_path(p_other.get_path());
20  set_subsong(p_other.get_subsong());
21  }
virtual t_uint32 get_subsong() const =0
virtual void set_subsong(t_uint32)=0
virtual const char * get_path() const =0
virtual void set_path(const char *)=0
int playable_location::g_compare ( const playable_location p_item1,
const playable_location p_item2 
)
static

Definition at line 3 of file playable_location.cpp.

3  {
4  int ret = metadb::path_compare(p_item1.get_path(),p_item2.get_path());
5  if (ret != 0) return ret;
6  return pfc::compare_t(p_item1.get_subsong(),p_item2.get_subsong());
7 }
virtual t_uint32 get_subsong() const =0
virtual const char * get_path() const =0
int compare_t(const hasher_md5_result &p_item1, const hasher_md5_result &p_item2)
Definition: hasher_md5.h:20
static int path_compare(const char *p1, const char *p2)
Definition: metadb.h:245
bool playable_location::g_equals ( const playable_location p_item1,
const playable_location p_item2 
)
static

Definition at line 9 of file playable_location.cpp.

9  {
10  return g_compare(p_item1, p_item2) == 0;
11 }
static int g_compare(const playable_location &p_item1, const playable_location &p_item2)
virtual const char* playable_location::get_path ( ) const
pure virtual
virtual t_uint32 playable_location::get_subsong ( ) const
pure virtual
t_uint32 playable_location::get_subsong_index ( ) const
inline

Definition at line 33 of file playable_location.h.

33 {return get_subsong();}
virtual t_uint32 get_subsong() const =0
bool playable_location::is_empty ( )
inline

Definition at line 31 of file playable_location.h.

31 {return get_path()[0]==0 && get_subsong()==0;}
virtual t_uint32 get_subsong() const =0
virtual const char * get_path() const =0
bool playable_location::is_empty ( ) const
inline

Definition at line 36 of file playable_location.h.

36 { return * get_path() == 0; }
virtual const char * get_path() const =0
bool playable_location::is_valid ( ) const
inline

Definition at line 37 of file playable_location.h.

37 { return !is_empty(); }
bool playable_location::operator!= ( const playable_location p_other) const

Definition at line 25 of file playable_location.cpp.

25  {
26  return !(*this == p_other);
27 }
const playable_location& playable_location::operator= ( const playable_location src)
inline

Definition at line 26 of file playable_location.h.

26 {copy(src);return *this;}
void copy(const playable_location &p_other)
bool playable_location::operator== ( const playable_location p_other) const

Definition at line 22 of file playable_location.cpp.

22  {
23  return metadb::path_compare(get_path(),p_other.get_path()) == 0 && get_subsong() == p_other.get_subsong();
24 }
virtual t_uint32 get_subsong() const =0
virtual const char * get_path() const =0
static int path_compare(const char *p1, const char *p2)
Definition: metadb.h:245
void playable_location::reset ( )
inline

Definition at line 32 of file playable_location.h.

32 {set_path("");set_subsong(0);}
virtual void set_subsong(t_uint32)=0
virtual void set_path(const char *)=0
virtual void playable_location::set_path ( const char *  )
pure virtual
virtual void playable_location::set_subsong ( t_uint32  )
pure virtual
void playable_location::set_subsong_index ( t_uint32  v)
inline

Definition at line 34 of file playable_location.h.

34 {set_subsong(v);}
virtual void set_subsong(t_uint32)=0

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