hplaylist.cpp

来自「Voice on phone using TAPI」· C++ 代码 · 共 70 行

CPP
70
字号
// HPlayList.cpp: implementation of the CHPlayList class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "HPlayList.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CHPlayList::CHPlayList()
{
	m_index=0;
}

CHPlayList::~CHPlayList()
{

}

void CHPlayList::Add(CString adr)
{
	if (adr=="") return;
	
	m_list.Add(adr);
}

CString CHPlayList::GetNext()
{
	if (m_index>=(UINT)m_list.GetSize())
		return "END_OF_LIST";
	return m_list.GetAt(m_index++);
}

UINT CHPlayList::GetCurrentIndex()
{
	return m_index;
}

CString CHPlayList::GetPrevious()
{
	if (m_index<=0)
		return "";
	return m_list.GetAt(m_index-1);
}

CString CHPlayList::GetLast()
{
	return m_list.GetAt(m_list.GetSize()-1);
}

UINT CHPlayList::GetCount()
{
	return m_list.GetSize();
}

void CHPlayList::Reset()
{
	m_list.RemoveAll();
	m_index=0;
//	m_list.FreeExtra();
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?