2010-06-07 02:23:58 +00:00
|
|
|
#include "stdafx.h"
|
2008-09-18 03:15:49 +00:00
|
|
|
#include "Settings Page.h"
|
|
|
|
|
|
|
|
CConfigSettingSection::CConfigSettingSection( LPCSTR PageTitle ) :
|
|
|
|
m_PageTitle(PageTitle)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
CConfigSettingSection::~CConfigSettingSection ()
|
|
|
|
{
|
2010-09-22 21:43:42 +00:00
|
|
|
for (size_t i = 0; i < m_Pages.size(); i++)
|
2008-09-18 03:15:49 +00:00
|
|
|
{
|
2012-10-04 12:01:08 +00:00
|
|
|
CSettingsPage * Page = m_Pages[i];
|
|
|
|
delete Page;
|
2008-09-18 03:15:49 +00:00
|
|
|
}
|
|
|
|
m_Pages.clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CConfigSettingSection::AddPage(CSettingsPage * Page )
|
|
|
|
{
|
|
|
|
m_Pages.push_back(Page);
|
|
|
|
}
|
|
|
|
|
|
|
|
CSettingsPage * CConfigSettingSection::GetPage ( int PageNo )
|
|
|
|
{
|
2010-09-22 21:43:42 +00:00
|
|
|
if (PageNo < 0 || PageNo >= (int)m_Pages.size())
|
2008-09-18 03:15:49 +00:00
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
return m_Pages[PageNo];
|
|
|
|
}
|