#include "stdafx.h"
|
#include "CAttributeVector.h"
|
|
|
namespace SERVO {
|
CAttributeVector::CAttributeVector()
|
{
|
|
}
|
|
CAttributeVector::~CAttributeVector()
|
{
|
for (auto item : m_attributes) {
|
delete item;
|
}
|
m_attributes.clear();
|
}
|
|
void CAttributeVector::addAttribute(CAttribute* pAttribute)
|
{
|
m_attributes.push_back(pAttribute);
|
}
|
|
unsigned int CAttributeVector::size()
|
{
|
return m_attributes.size();
|
}
|
|
void CAttributeVector::clear()
|
{
|
for (auto item : m_attributes) {
|
delete item;
|
}
|
m_attributes.clear();
|
}
|
|
bool CAttributeVector::empty()
|
{
|
return m_attributes.empty();
|
}
|
|
CAttribute* CAttributeVector::getAttribute(unsigned int index)
|
{
|
ASSERT(index < m_attributes.size());
|
return m_attributes[index];
|
}
|
}
|