From 11f49f85c4157673b2fc9fc54430d2b70edd99e3 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Thu, 23 Jan 2020 21:25:25 +0100 Subject: [PATCH] try to migrate AMF --- code/AMF/AMFImporter.cpp | 7 +++---- code/AMF/AMFImporter.hpp | 10 +++++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/code/AMF/AMFImporter.cpp b/code/AMF/AMFImporter.cpp index 3d75125e9..16754e40d 100644 --- a/code/AMF/AMFImporter.cpp +++ b/code/AMF/AMFImporter.cpp @@ -156,12 +156,11 @@ void AMFImporter::Throw_CloseNotFound(const std::string& pNode) { throw DeadlyImportError("Close tag for node <" + pNode + "> not found. Seems file is corrupt."); } -void AMFImporter::Throw_IncorrectAttr(const std::string& pAttrName) { - throw DeadlyImportError("Node <" + std::string(mReader->getNodeName()) + "> has incorrect attribute \"" + pAttrName + "\"."); +void AMFImporter::Throw_IncorrectAttr(const std::string &nodeName, const std::string &pAttrName) { + throw DeadlyImportError("Node <" + nodeName + "> has incorrect attribute \"" + pAttrName + "\"."); } -void AMFImporter::Throw_IncorrectAttrValue(const std::string& pAttrName) -{ +void AMFImporter::Throw_IncorrectAttrValue(const std::string &nodeName, const std::string &pAttrName) { throw DeadlyImportError("Attribute \"" + pAttrName + "\" in node <" + std::string(mReader->getNodeName()) + "> has incorrect value."); } diff --git a/code/AMF/AMFImporter.hpp b/code/AMF/AMFImporter.hpp index 92dda5c94..f4a543658 100644 --- a/code/AMF/AMFImporter.hpp +++ b/code/AMF/AMFImporter.hpp @@ -256,12 +256,12 @@ private: /// Call that function when attribute name is incorrect and exception must be raised. /// \param [in] pAttrName - attribute name. /// \throw DeadlyImportError. - void Throw_IncorrectAttr(const std::string& pAttrName); + void Throw_IncorrectAttr(const std::string &nodeName, const std::string& pAttrName); /// Call that function when attribute value is incorrect and exception must be raised. /// \param [in] pAttrName - attribute name. /// \throw DeadlyImportError. - void Throw_IncorrectAttrValue(const std::string& pAttrName); + void Throw_IncorrectAttrValue(const std::string &nodeName, const std::string &pAttrName); /// Call that function when some type of nodes are defined twice or more when must be used only once and exception must be raised. /// E.g.: @@ -285,10 +285,10 @@ private: /// Check if current node name is equal to pNodeName. /// \param [in] pNodeName - name for checking. /// return true if current node name is equal to pNodeName, else - false. - bool XML_CheckNode_NameEqual(const std::string& pNodeName){ + //bool XML_CheckNode_NameEqual(const std::string& pNodeName){ // return mReader->getNodeName() == pNodeName; - mReader->mDoc. - } + //mReader->mDoc. + //} /// Skip unsupported node and report about that. Depend on node name can be skipped begin tag of node all whole node. /// \param [in] pParentNodeName - parent node name. Used for reporting.