From 19261d011387ec57d646decc945aadaf8913eeab Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期一, 10 三月 2025 09:05:54 +0800
Subject: [PATCH] Merge branch 'clh'

---
 SourceCode/Bond/Servo/CAttributeVector.cpp |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 47 insertions(+), 0 deletions(-)

diff --git a/SourceCode/Bond/Servo/CAttributeVector.cpp b/SourceCode/Bond/Servo/CAttributeVector.cpp
new file mode 100644
index 0000000..6d9213a
--- /dev/null
+++ b/SourceCode/Bond/Servo/CAttributeVector.cpp
@@ -0,0 +1,47 @@
+#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];
+	}
+}

--
Gitblit v1.9.3