<commit_before>#pragma once
#ifndef PPTX_SLIDES_SLIDE_SHAPETREE_INCLUDE_H_
#define PPTX_SLIDES_SLIDE_SHAPETREE_INCLUDE_H_

#include "./../WrapperWritingElement.h"
#include "./../Logic/NvGrpSpPr.h"
#include "./../Logic/GrpSpPr.h"
#include "SpTreeElem.h"
#include "ShapeProperties.h"
#include "ShapeTextProperties.h"

namespace PPTX
{
	namespace Logic
	{

		class SpTree : public WrapperWritingElement
		{
		public:
			PPTX_LOGIC_BASE(SpTree)

			SpTree& operator=(const SpTree& oSrc)
			{
				parentFile		= oSrc.parentFile;
				parentElement	= oSrc.parentElement;

				nvGrpSpPr	= oSrc.nvGrpSpPr;
				grpSpPr		= oSrc.grpSpPr;

				for (int i=0; i < oSrc.SpTreeElems.size(); i++)
					SpTreeElems.push_back(oSrc.SpTreeElems[i]);

				m_name = oSrc.m_name;

				return *this;
			}

		public:
			virtual void fromXML(XmlUtils::CXmlNode& node)
			{
				m_name = node.GetName();
				
				nvGrpSpPr	= node.ReadNodeNoNS(_T("nvGrpSpPr"));
				grpSpPr		= node.ReadNodeNoNS(_T("grpSpPr"));

				SpTreeElems.clear();

				XmlUtils::CXmlNodes oNodes;
				if (node.GetNodes(_T("*"), oNodes))
				{
					int nCount = oNodes.GetCount();
					for (int i = 0; i < nCount; ++i)
					{
						XmlUtils::CXmlNode oNode;
						oNodes.GetAt(i, oNode);

						CString strName = XmlUtils::GetNameNoNS(oNode.GetName());

						if (_T("cNvPr") == strName)
						{
							nvGrpSpPr.cNvPr = oNode;
						}
						else if (_T("cNvGrpSpPr") == strName)
						{
							nvGrpSpPr.cNvGrpSpPr = oNode;
						}
						else
						{
							SpTreeElem elem(oNode);
							if (elem.is_init())
							{
								SpTreeElem elem1;
								SpTreeElems.push_back(elem1);
							}
						}
					}
				}

				FillParentPointersForChilds();
			}

			virtual CString toXML() const
			{<commit_msg>ошибка при чтении групп автофигур<commit_after>#pragma once
#ifndef PPTX_SLIDES_SLIDE_SHAPETREE_INCLUDE_H_
#define PPTX_SLIDES_SLIDE_SHAPETREE_INCLUDE_H_

#include "./../WrapperWritingElement.h"
#include "./../Logic/NvGrpSpPr.h"
#include "./../Logic/GrpSpPr.h"
#include "SpTreeElem.h"
#include "ShapeProperties.h"
#include "ShapeTextProperties.h"

namespace PPTX
{
	namespace Logic
	{

		class SpTree : public WrapperWritingElement
		{
		public:
			PPTX_LOGIC_BASE(SpTree)

			SpTree& operator=(const SpTree& oSrc)
			{
				parentFile		= oSrc.parentFile;
				parentElement	= oSrc.parentElement;

				nvGrpSpPr	= oSrc.nvGrpSpPr;
				grpSpPr		= oSrc.grpSpPr;

				for (int i=0; i < oSrc.SpTreeElems.size(); i++)
					SpTreeElems.push_back(oSrc.SpTreeElems[i]);

				m_name = oSrc.m_name;

				return *this;
			}

		public:
			virtual void fromXML(XmlUtils::CXmlNode& node)
			{
				m_name = node.GetName();
				
				nvGrpSpPr	= node.ReadNodeNoNS(_T("nvGrpSpPr"));
				grpSpPr		= node.ReadNodeNoNS(_T("grpSpPr"));

				SpTreeElems.clear();

				XmlUtils::CXmlNodes oNodes;
				if (node.GetNodes(_T("*"), oNodes))
				{
					int nCount = oNodes.GetCount();
					for (int i = 0; i < nCount; ++i)
					{
						XmlUtils::CXmlNode oNode;
						oNodes.GetAt(i, oNode);

						CString strName = XmlUtils::GetNameNoNS(oNode.GetName());

						if (_T("cNvPr") == strName)
						{
							nvGrpSpPr.cNvPr = oNode;
						}
						else if (_T("cNvGrpSpPr") == strName)
						{
							nvGrpSpPr.cNvGrpSpPr = oNode;
						}
						else
						{
							SpTreeElem elem(oNode);
							if (elem.is_init())
								SpTreeElems.push_back(elem);
						}
					}
				}

				FillParentPointersForChilds();
			}

			virtual CString toXML() const
			{
{'fraction_non_alphanumeric': 0.13138896910193473, 'fraction_numerical': 0.0017326017903551833, 'mean_word_length': 2.7775354416575793, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3619961', 'n_tokens_mistral': 1806, 'n_tokens_neox': 1379, 'n_words': 220}