From: <viv...@us...> - 2013-09-13 09:28:50
|
Revision: 2987 http://sourceforge.net/p/ogreaddons/code/2987 Author: vivetech Date: 2013-09-13 09:28:46 +0000 (Fri, 13 Sep 2013) Log Message: ----------- Ported to Ogre 1.8.1. Serializer added. Bug fixes. Modified Paths: -------------- trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPCommonParamsOfXmlNodeProcessors.cpp trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPCommonParamsOfXmlNodeProcessors.h trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPDemo.cpp trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPPrerequisites.h trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPXmlNodeProcessor.cpp trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPXmlNodeProcessor.h trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPXmlNodeProcessorTreeBuilder.cpp trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPXmlNodeProcessorTreeBuilder.h trunk/dotsceneformat/Source/Dependencies/trunk/main/HDRLib/lib/HDRLib.lib trunk/dotsceneformat/Source/Dependencies/trunk/main/HDRLib/lib/HDRLib_d.lib trunk/dotsceneformat/Source/Dependencies/trunk/main/HDRLib/src/HDRCompositor.cpp trunk/dotsceneformat/Source/Dependencies/trunk/main/Tinyxml/includes/tinyxml.h trunk/dotsceneformat/Source/Dependencies/trunk/main/Tinyxml/lib/tinyxml.lib trunk/dotsceneformat/Source/Dependencies/trunk/main/Tinyxml/lib/tinyxml_d.lib trunk/dotsceneformat/Source/Dependencies/trunk/main/Tinyxml/src/tinyxml.cpp trunk/dotsceneformat/Source/Dependencies/trunk/main/Tinyxml/src/tinyxmlerror.cpp trunk/dotsceneformat/Source/Dependencies/trunk/main/Tinyxml/src/tinyxmlparser.cpp trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/Documentation/Changelog.txt trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneInterface/Include/dotSceneInfo.h trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneInterface/Include/dotSceneInterface.h trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneInterface/Include/dotSceneNodeProcessorTreeBuilder.h trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneInterface/Include/dotScenePlatformUtils.h trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneInterface/Include/dotScenePrerequisites.h trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneInterface/Include/dotSceneProcessor.h trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneInterface/Include/dotSceneProcessorImpl.h trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneInterface/Include/dotSceneProcessorImpl_v1_0_0.h trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneInterface/Include/dotSceneStableHeaders.h trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneInterface/Include/dotSceneUtils.h trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneInterface/Include/dotSceneXmlNodeProcessors.h trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneInterface/Source/dotSceneInfo.cpp trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneInterface/Source/dotSceneNodeProcessorTreeBuilder.cpp trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneInterface/Source/dotScenePlatformUtils.cpp trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneInterface/Source/dotSceneProcessor.cpp trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneInterface/Source/dotSceneProcessorImpl_v1_0_0.cpp trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneInterface/Source/dotSceneResourceManager.cpp trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneInterface/Source/dotSceneUtils.cpp trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneInterface/Source/dotSceneXmlNodeProcessors.cpp trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneViewer/Include/ExampleApplication.h trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneViewer/Include/ExampleFrameListener.h trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneViewer/Include/dotSceneViewerApplication.h trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneViewer/Include/dotSceneViewerFrameListener.h trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneViewer/Include/dotSceneViewerMovableText.h trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneViewer/Source/dotSceneViewerApplication.cpp trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneViewer/Source/dotSceneViewerFrameListener.cpp Added Paths: ----------- trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XmlNodeProcessor.vcxproj trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XmlNodeProcessor.vcxproj.filters trunk/dotsceneformat/Source/Dependencies/trunk/main/HDRLib/HDRLib.vcxproj trunk/dotsceneformat/Source/Dependencies/trunk/main/HDRLib/HDRLib.vcxproj.filters trunk/dotsceneformat/Source/Dependencies/trunk/main/Tinyxml/tinyxml.vcxproj trunk/dotsceneformat/Source/Dependencies/trunk/main/Tinyxml/tinyxml.vcxproj.filters trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneInterface/Source/dotSceneXmlNodeSerializers.cpp trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneInterface/dotSceneInterface_VC10.sln trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneInterface/dotSceneInterface_VC10.suo trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneInterface/dotSceneInterface_VC10.vcxproj trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneInterface/dotSceneInterface_VC10.vcxproj.filters trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneOctreeSceneManager/DotSceneOctreeSceneManager.vcxproj trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneOctreeSceneManager/DotSceneOctreeSceneManager.vcxproj.filters trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneToDotSceneOctreeConverter/DotSceneToDotSceneOctreeConverter.vcxproj trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneToDotSceneOctreeConverter/DotSceneToDotSceneOctreeConverter.vcxproj.filters trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneViewer/DotSceneViewer_VC10.vcxproj trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/DotSceneViewer/DotSceneViewer_VC10.vcxproj.user trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/dotSceneFormat_VC10.sln trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/dotSceneFormat_VC10.suo trunk/dotsceneformat/Source/Graphics Engine/trunk/main/SceneFormats/DotSceneFormat/ogre_1.8.1.patch Modified: trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPCommonParamsOfXmlNodeProcessors.cpp =================================================================== --- trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPCommonParamsOfXmlNodeProcessors.cpp 2011-09-08 00:03:46 UTC (rev 2986) +++ trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPCommonParamsOfXmlNodeProcessors.cpp 2013-09-13 09:28:46 UTC (rev 2987) @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------------- -Author: Balazs Hajdics (wol...@fr...) +Author: Balazs Hajdics (wol...@fr...), James Le Cuirot Copyright (C) 2007 Balazs Hajdics @@ -23,8 +23,8 @@ /// Copyright (C) 2007 Balazs Hajdics +#include "XNPCommonParamsOfXmlNodeProcessors.h" #include "XNPPrerequisites.h" -#include "XNPCommonParamsOfXmlNodeProcessors.h" namespace XmlNodeProcessing { Modified: trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPCommonParamsOfXmlNodeProcessors.h =================================================================== --- trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPCommonParamsOfXmlNodeProcessors.h 2011-09-08 00:03:46 UTC (rev 2986) +++ trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPCommonParamsOfXmlNodeProcessors.h 2013-09-13 09:28:46 UTC (rev 2987) @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------------- -Author: Balazs Hajdics (wol...@fr...) +Author: Balazs Hajdics (wol...@fr...), James Le Cuirot Copyright (C) 2007 Balazs Hajdics Modified: trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPDemo.cpp =================================================================== --- trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPDemo.cpp 2011-09-08 00:03:46 UTC (rev 2986) +++ trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPDemo.cpp 2013-09-13 09:28:46 UTC (rev 2987) @@ -1,5 +1,6 @@ /* ----------------------------------------------------------------------------- +Author: Tibor Tihon (tib...@gm...), Balazs Hajdics (wol...@fr...), James Le Cuirot Copyright (c) 2007 Tibor Tihon This program is free software; you can redistribute it and/or modify it under @@ -200,7 +201,7 @@ void testParseBad() { - TiXmlDocument doc("testBad.xml"); + TiXmlDocument doc("test.scene"); if (!doc.LoadFile()) return; @@ -211,7 +212,7 @@ Listener* lstnr = new Listener(); proc->addParseListener(lstnr); // procComment->addParseListener(lstnr); - proc->parseElement(NULL, doc.FirstChild("ToDo")->ToElement()); + proc->parseElement(NULL, doc.FirstChild("scene")->ToElement()); delete lstnr; delete proc; } @@ -401,7 +402,7 @@ club->addNewPlayer("Dida", 198); XmlClubProcessor* proc = new XmlClubProcessor(); TiXmlDocument doc; - proc->serializeRootElement(doc, "club", club); + proc->serializeRootElement("club", doc, club); doc.SaveFile("testSerialized.xml"); delete proc; delete club; @@ -409,10 +410,10 @@ int main(int argc, char* argv[]) { - //test1(); - //test2(); - //test3(); - //test4(); +// test1(); +// test2(); +// test3(); +// test4(); testParseBad(); return 0; } \ No newline at end of file Modified: trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPPrerequisites.h =================================================================== --- trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPPrerequisites.h 2011-09-08 00:03:46 UTC (rev 2986) +++ trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPPrerequisites.h 2013-09-13 09:28:46 UTC (rev 2987) @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------------- -Author: Balazs Hajdics (wol...@fr...) +Author: Balazs Hajdics (wol...@fr...), James Le Cuirot Copyright (C) 2007 Balazs Hajdics @@ -46,7 +46,7 @@ //using namespace Common; // Temporarily, as including the whole Ogre.h would result ugly name collisions: - #include "OgreException.h" + //#include "OgreException.h" //------------------- @@ -58,6 +58,7 @@ //---------------------------------------------------------------------------- // Windows Settings + #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 // If we're not including this from a client build, specify that the stuff @@ -80,7 +81,10 @@ # endif #endif // #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 - +#ifndef WIN32 +#define _XmlNodeProcessing_BuildMode +#define _XmlNodeProcessing_BuildModePrivate +#endif typedef std::string String; typedef std::vector<String> StringVector; Modified: trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPXmlNodeProcessor.cpp =================================================================== --- trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPXmlNodeProcessor.cpp 2011-09-08 00:03:46 UTC (rev 2986) +++ trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPXmlNodeProcessor.cpp 2013-09-13 09:28:46 UTC (rev 2987) @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- Theory: Balazs Hajdics, Tibor Tihon -Author: Tibor Tihon (tib...@gm...), Balazs Hajdics (wol...@fr...) +Author: Tibor Tihon (tib...@gm...), Balazs Hajdics (wol...@fr...), James Le Cuirot, Ihor Tregubov Copyright (C) 2007 Tibor Tihon, Balazs Hajdics @@ -81,10 +81,11 @@ XmlNodeProcessorMap::iterator it = mElementProcessorMap.find(elementName); if (it == mElementProcessorMap.end()) { - EXCEPT( + return 0; + /*EXCEPT( Ogre::Exception::ERR_ITEM_NOT_FOUND, "XmlNodeProcessor element \"" + elementName + "\" does not exist.", - "XmlNodeProcessor::getElementProcessor()"); + "XmlNodeProcessor::getElementProcessor()");*/ }else return it->second; } const String& XmlNodeProcessor::getElementProcessorName(XmlNodeProcessor* processor) @@ -322,12 +323,17 @@ return mParsedNodes.size() > 0 ? mParsedNodes.top() : NULL; } - void XmlNodeProcessor::serializeChildren(const XmlNodeProcessorVectorItem& item, TiXmlElement& currentNode, void* currentData) + void XmlNodeProcessor::serializeChildren(const XmlNodeProcessorVectorItem& item, TiXmlElement& currentNode, void* pParentData) { - int counter = 0; XmlNodeProcessor* processor = item.first; if (processor == mTextProcessor) { + TiXmlText childText(""); + if( item.first->serializeText( childText, pParentData ) ) + { + currentNode.InsertEndChild(childText); + } + /* bool hasSiblingsToSerialize = processor->hasNodesToSerialize(currentData); while (hasSiblingsToSerialize) { @@ -336,21 +342,27 @@ item.first->serializeText(hasSiblingsToSerialize, childText, currentData, counter++); currentNode.InsertEndChild(childText); } + */ } else if (processor == mCommentProcessor) { - bool hasSiblingsToSerialize = processor->hasNodesToSerialize(currentData); - while (hasSiblingsToSerialize) - { - hasSiblingsToSerialize = false; + TiXmlComment childComment; + if( item.first->serializeComment( childComment, pParentData ) ) + { + currentNode.InsertEndChild(childComment); + } + /* + hasSiblingsToSerialize = false; // TiXmlComment childComment(""); // Old version uses new version of tiny xml. - TiXmlComment childComment; - item.first->serializeComment(hasSiblingsToSerialize, childComment, currentData, counter++); - currentNode.InsertEndChild(childComment); - } + TiXmlComment childComment; + item.first->serializeComment(hasSiblingsToSerialize, childComment, currentData, counter++); + currentNode.InsertEndChild(childComment); + */ } else { + item.first->serializeElement( item.second.c_str(), currentNode, pParentData ); + /* bool hasSiblingsToSerialize = processor->hasNodesToSerialize(currentData); while (hasSiblingsToSerialize) { @@ -359,39 +371,60 @@ item.first->serializeElement(hasSiblingsToSerialize, childElement, currentData, counter++); currentNode.InsertEndChild(childElement); } + */ } } - void* XmlNodeProcessor::serializeElement(bool& hasSiblingsToSerialize, TiXmlElement& currentNode, void* parentData, size_t counter) + bool XmlNodeProcessor::serializeElement( const char* strElementName, TiXmlElement& parentElement, void* pParentData ) { - for (std::set<SerializeListener*>::iterator l = mSerializeListeners.begin(); l != mSerializeListeners.end(); ++l) - if (*l != NULL) - (*l)->preElementSerialize(this, currentNode); + bool bResult = false; - void* currentData = serializeElementImpl(hasSiblingsToSerialize, currentNode, parentData, counter); + size_t counter = 0; - for (XmlNodeProcessorVector::iterator i = mNodeProcessorVector.begin(); i != mNodeProcessorVector.end(); ++i) - serializeChildren(*i, currentNode, currentData); + XmlNodeProcessor::ElementsDataList elementsDataList; + if( serializeElementBeginImpl( parentElement.Value(), pParentData, &elementsDataList ) ) + { + while( elementsDataList.size() ) + { + TiXmlElement NewElement( strElementName ); - if (mDefaultProcessor != NULL) - serializeChildren(XmlNodeProcessorVectorItem(mDefaultProcessor, ""), currentNode, currentData); + for (std::set<SerializeListener*>::iterator l = mSerializeListeners.begin(); l != mSerializeListeners.end(); ++l) + if (*l != NULL) + (*l)->preElementSerialize(this, NewElement); - serializeElementEndImpl(currentNode, currentData, parentData); + void* pElementData = elementsDataList.front(); - for (std::set<SerializeListener*>::iterator l = mSerializeListeners.begin(); l != mSerializeListeners.end(); ++l) - if (*l != NULL) - (*l)->postElementSerialize(this, currentNode); + serializeElementImpl( NewElement, parentElement, pElementData, counter++); - return currentData; + for (XmlNodeProcessorVector::iterator i = mNodeProcessorVector.begin(); i != mNodeProcessorVector.end(); ++i) + serializeChildren(*i, NewElement, pElementData); + + if (mDefaultProcessor != NULL) + serializeChildren( XmlNodeProcessorVectorItem(mDefaultProcessor, ""), NewElement, pElementData ); + + serializeElementEndImpl( NewElement, pParentData, pElementData); + + //! End listeners + for (std::set<SerializeListener*>::iterator l = mSerializeListeners.begin(); l != mSerializeListeners.end(); ++l) + if (*l != NULL) + (*l)->postElementSerialize(this, NewElement ); + + elementsDataList.pop_front(); + + parentElement.InsertEndChild( NewElement ); + } + + } + return bResult; } - void* XmlNodeProcessor::serializeComment(bool& hasSiblingsToSerialize, TiXmlComment& currentNode, void* parentData, size_t counter) + void* XmlNodeProcessor::serializeComment( TiXmlComment& currentNode, void* parentData ) { for (std::set<SerializeListener*>::iterator l = mSerializeListeners.begin(); l != mSerializeListeners.end(); ++l) if (*l != NULL) (*l)->preCommentSerialize(this, currentNode); - void* currentData = serializeCommentImpl(hasSiblingsToSerialize, currentNode, parentData, counter); + void* currentData = serializeCommentImpl( currentNode, parentData ); for (std::set<SerializeListener*>::iterator l = mSerializeListeners.begin(); l != mSerializeListeners.end(); ++l) if (*l != NULL) @@ -400,13 +433,13 @@ return currentData; } - void* XmlNodeProcessor::serializeText(bool& hasSiblingsToSerialize, TiXmlText& currentNode, void* parentData, size_t counter) + void* XmlNodeProcessor::serializeText( TiXmlText& currentNode, void* parentData ) { for (std::set<SerializeListener*>::iterator l = mSerializeListeners.begin(); l != mSerializeListeners.end(); ++l) if (*l != NULL) (*l)->preTextSerialize(this, currentNode); - void* currentData = serializeTextImpl(hasSiblingsToSerialize, currentNode, parentData, counter); + void* currentData = serializeTextImpl( currentNode, parentData ); for (std::set<SerializeListener*>::iterator l = mSerializeListeners.begin(); l != mSerializeListeners.end(); ++l) if (*l != NULL) @@ -415,14 +448,9 @@ return currentData; } - void* XmlNodeProcessor::serializeRootElement(TiXmlDocument& document, std::string elementName, void* data) + bool XmlNodeProcessor::serializeRootElement( std::string elementName, TiXmlDocument& document, void* data) { - TiXmlElement childElement(elementName.c_str()); - bool hasSiblingsToSerialize = false; - void* currentData = serializeElement(hasSiblingsToSerialize, childElement, data, 0); - document.InsertEndChild(childElement); - - return currentData; + return serializeElement( elementName.c_str(), (TiXmlElement&)document, data ); } void XmlNodeProcessor::addParseListener(ParseListener* l) Modified: trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPXmlNodeProcessor.h =================================================================== --- trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPXmlNodeProcessor.h 2011-09-08 00:03:46 UTC (rev 2986) +++ trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPXmlNodeProcessor.h 2013-09-13 09:28:46 UTC (rev 2987) @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- Theory: Balazs Hajdics, Tibor Tihon -Author: Tibor Tihon (tib...@gm...), Balazs Hajdics (wol...@fr...) +Author: Tibor Tihon (tib...@gm...), Balazs Hajdics (wol...@fr...), James Le Cuirot, Ihor Tregubov Copyright (C) 2007 Tibor Tihon, Balazs Hajdics @@ -262,127 +262,142 @@ void* getParsedNode(); - // -= Serialization =- - + //!==================================Serialization================================ protected: - void serializeChildren(const XmlNodeProcessorVectorItem& item, TiXmlElement& currentNode, void* currentData); - public: - /// \brief This function tells the parent processor whether any nodes should be - /// created for the specific processor. + /// \brief Serializes children of current node. /// - /// @returns True when a first node is created according to the type and name - /// the processor is registered to. - virtual bool hasNodesToSerialize(void* parentData) { return true; } + /// @param + /// item + /// Refrence on current element. + /// @param + /// parentElement + /// Refrence on parent element. + /// @param + /// parentData + /// Data of the parent. + /// + void serializeChildren(const XmlNodeProcessorVectorItem& item, TiXmlElement& parentElement, void* pParentData ); - /// \brief Serializes data to an XML element. It does administration tasks, calls - /// the overrideable serializeElementImpl() function, and creates one or - /// more child nodes to all the registered processors - for which - /// hasNodesToSerialize() returns true - in the order they were registered. + public: + /// \brief List of elements to serialize + /// BeginImpl function enumerates all children and fills this list. + typedef std::list<void*> ElementsDataList; + + /// \brief Serializes data to an XML element. + /// It calls the serializeElementBeginImpl() function. + /// then serializeElementImpl() function for each element + /// then serializeChildren() for children + /// and finally serializeElementEndImpl to finalize and clear /// /// @param - /// hasSiblingsToSerialize - /// Marks if another element with the same name should be created post - /// the function. + /// strElementName + /// Name of parent element /// @param - /// currentNode - /// The created XML element. + /// parentElement + /// Refrence to parent element. For reverse calls. /// @param /// parentData - /// The system can't tell what part of an object should be serialized - /// so the parent object is given to this function. - /// @param - /// counter - /// Tells how many times this function was called for the same kind of - /// element. + /// Data of the parent. /// - /// @returns Pointer to the data the function serialized. - void* serializeElement(bool& hasSiblingsToSerialize, TiXmlElement& currentNode, void* parentData, size_t counter); + bool serializeElement( const char* strElementName, TiXmlElement& parentElement, void* parentData ); protected: - /// \brief Serializes data to an XML element. It does administration tasks, calls - /// the overrideable serializeElementImpl() function, and creates one or - /// more child nodes to all the registered processors - for which - /// hasNodesToSerialize() returns true - in the order they were registered. + /// \brief Serializes data to an XML element. /// /// @param - /// hasSiblingsToSerialize - /// Marks if another element with the same name should be created post - /// the function. In every call it's false by default, you have to - /// change it to true if there are other elements with the same name to - /// be created. - /// @param /// currentNode - /// The created XML element, automatically named post the name the - /// processor was registered in the parent processor. You can give the - /// attributes in this function. + /// New TiXmlElement was created to for data. + /// /// @param - /// parentData - /// The system can't tell what part of an object should be serialized - /// so the parent object is given to this function. + /// parentNode + /// Refrence for parent TiXmlElement. + /// /// @param + /// pElementData + /// Pointer for current element data. + /// + /// @param /// counter /// Tells how many times this function was called for the same kind of /// element. /// - /// @returns It should return a pointer to the data the function serialized. - virtual void* serializeElementImpl(bool& hasSiblingsToSerialize, TiXmlElement& currentNode, void* parentData, size_t counter) { return NULL; } + virtual void serializeElementImpl( TiXmlElement& currentNode, TiXmlElement& parentNode, void* pElementData, size_t counter) {} + /// \brief Gets called back before element serializetion and forms data set for current element. + /// This enumerates all elements that are to be serialized + /// @param + /// strParentName + /// Parent name. Used to choose the source of data. + /// + /// @param + /// parentData + /// Data of the parent element. + /// @param + /// elementsData + /// List of siblings elements to be serialied. + /// If an elements data is created here, it must be deleted at serializeElementEndImpl + /// + /// @returns If there is at least one element to serialize. + virtual bool serializeElementBeginImpl( const char* strParentName, void* parentData, XmlNodeProcessor::ElementsDataList* elementsData ){ return false; } + /// \brief Gets called back post all the children XML nodes have been created for the /// element. /// /// @param /// currentNode - /// The same XML element that serializeElementImpl() got as an argument. + /// Current node reftence. For data finalization. /// @param - /// currentData + /// parentData /// Pointer to the data which was serialized for the element. /// @param - /// parentData + /// currentData /// The system can't tell what part of an object should be serialized /// so the parent object is given to this function. - virtual void serializeElementEndImpl(TiXmlElement& currentNode, void* currentData, void* parentData) {} + virtual void serializeElementEndImpl(TiXmlElement& currentNode, void* parentData, void* currentData ){} public: /// \brief Serializes data to an XML comment. /// /// @note See serializeElement() for more information. - void* serializeComment(bool& hasSiblingsToSerialize, TiXmlComment& currentNode, void* parentData, size_t counter); + void* serializeComment( TiXmlComment& currentNode, void* parentData ); protected: /// \brief Overrideable function to serialize data to an XML comment. /// /// @note See serializeElementImpl() for more information. - virtual void* serializeCommentImpl(bool& hasSiblingsToSerialize, TiXmlComment& currentNode, void* parentData, size_t counter) { return NULL; } + virtual void* serializeCommentImpl( TiXmlComment& currentNode, void* parentData ) { return NULL; } public: /// \brief Serializes data to an XML comment. /// /// @note See serializeElement() for more information. - void* serializeText(bool& hasSiblingsToSerialize, TiXmlText& currentNode, void* parentData, size_t counter); + void* serializeText( TiXmlText& currentNode, void* parentData ); protected: /// \brief Overrideable function to serialize data to an XML text. /// /// @note See serializeElementImpl() for more information. - virtual void* serializeTextImpl(bool& hasSiblingsToSerialize, TiXmlText& currentNode, void* parentData, size_t counter) { return NULL; } + virtual void* serializeTextImpl( TiXmlText& currentNode, void* parentData ) { return NULL; } public: /// \brief The entry point for serializing a document. /// /// @param - /// document - /// Pointer to the XML document. - /// @param - /// elementName + /// strRootElementName /// Name of the root element. (It's needed because it is not registered /// to any processors.) + /// /// @param + /// document + /// Newly created document for saving. + + /// @param /// data /// Pointer to the data to be serialized. /// @note This function gets the pointer to the serializeable data, not /// to its parent! - void* serializeRootElement(TiXmlDocument& document, std::string elementName, void* data); + bool serializeRootElement( std::string strRootElementName, TiXmlDocument& document, void* data); // -= Event listeners =- Modified: trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPXmlNodeProcessorTreeBuilder.cpp =================================================================== --- trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPXmlNodeProcessorTreeBuilder.cpp 2011-09-08 00:03:46 UTC (rev 2986) +++ trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPXmlNodeProcessorTreeBuilder.cpp 2013-09-13 09:28:46 UTC (rev 2987) @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- Theory: Balazs Hajdics -Author: David Vizi (tib...@gm...), Balazs Hajdics (wol...@fr...) +Author: David Vizi (tib...@gm...), Balazs Hajdics (wol...@fr...), James Le Cuirot Copyright (C) 2007 David Vizi, Balazs Hajdics @@ -58,6 +58,7 @@ mProcessors[i]->removeParseListener(pListener); } + void XmlNodeProcessorTreeBuilder::registerElementProcessor(const String& name, XmlNodeProcessor *pParent, XmlNodeProcessor *pChild) { XmlNodeProcessorTreeBuilder::ProcessorVector& namedVector = mNamesToProcessorsMap[name]; @@ -71,6 +72,29 @@ mProcessors.push_back(pChild); } +void XmlNodeProcessorTreeBuilder::unregisterElementProcessor(const String& name) +{ + XmlNodeProcessorTreeBuilder::ProcessorVector& namedVector = mNamesToProcessorsMap[name]; + for (XmlNodeProcessorTreeBuilder::ProcessorVector::iterator it = namedVector.begin(); it != namedVector.end(); it++) + { + XmlNodeProcessorTreeBuilder::ProcessorVector& parents = mChildrenToParentsMap[*it]; + for (XmlNodeProcessorTreeBuilder::ProcessorVector::iterator parentIt = parents.begin(); parentIt != parents.end(); parentIt++) + { + (*parentIt)->removeElementProcessor(name); + } + } + namedVector.clear(); +} + +void XmlNodeProcessorTreeBuilder::unregisterElementProcessors(const StringVector& tags) +{ + for (StringVector::const_iterator it = tags.begin(); it != tags.end(); it++) + { + unregisterElementProcessor(*it); + } +} + + void XmlNodeProcessorTreeBuilder::registerRootProcessor(const String& name, XmlNodeProcessor* pRoot) { mRoot = pRoot; Modified: trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPXmlNodeProcessorTreeBuilder.h =================================================================== --- trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPXmlNodeProcessorTreeBuilder.h 2011-09-08 00:03:46 UTC (rev 2986) +++ trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XNPXmlNodeProcessorTreeBuilder.h 2013-09-13 09:28:46 UTC (rev 2987) @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------------- -Author: Balazs Hajdics (wol...@fr...) +Author: Balazs Hajdics (wol...@fr...), James Le Cuirot Copyright (C) 2007 Balazs Hajdics @@ -57,7 +57,7 @@ public: - XmlNodeProcessorTreeBuilder::XmlNodeProcessorTreeBuilder(CommonParamsOfXmlNodeProcessors* commonParams): + XmlNodeProcessorTreeBuilder(CommonParamsOfXmlNodeProcessors* commonParams): mCommonParamsOfXmlNodeProcessors(commonParams), mRoot(0) { @@ -104,8 +104,12 @@ virtual void addParseListener(XmlNodeProcessor::ParseListener *pListener); virtual void removeParseListener(XmlNodeProcessor::ParseListener *pListener); + void unregisterElementProcessors(const StringVector& tags); + void unregisterElementProcessor(const String& name); + protected: void registerElementProcessor(const String& name, XmlNodeProcessor* pParent, XmlNodeProcessor* pChild); + void registerRootProcessor(const String& name, XmlNodeProcessor* pRoot); protected: Added: trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XmlNodeProcessor.vcxproj =================================================================== --- trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XmlNodeProcessor.vcxproj (rev 0) +++ trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XmlNodeProcessor.vcxproj 2013-09-13 09:28:46 UTC (rev 2987) @@ -0,0 +1,284 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug - DLL|Win32"> + <Configuration>Debug - DLL</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug - LIB|Win32"> + <Configuration>Debug - LIB</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release - DLL|Win32"> + <Configuration>Release - DLL</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release - LIB|Win32"> + <Configuration>Release - LIB</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{D8F6326C-8019-4cc3-8D66-D262A788D14F}</ProjectGuid> + <RootNamespace>XmlNodeProcessor</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - DLL|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - LIB|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <CLRSupport>false</CLRSupport> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - DLL|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - LIB|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - DLL|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - LIB|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - DLL|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - LIB|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\..\..\Bin\Release\trunk\main\Executables\Debug\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\..\..\Bin\Release\trunk\main\Executables\Release\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - LIB|Win32'">..\..\..\..\..\Bin\Release\trunk\main\Executables\Debug\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug - LIB|Win32'">$(Configuration)\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - DLL|Win32'">..\..\..\..\..\Bin\Release\trunk\main\Executables\Debug\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug - DLL|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - DLL|Win32'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release - LIB|Win32'">..\..\..\..\..\Bin\Release\trunk\main\Executables\Release\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release - LIB|Win32'">$(Configuration)\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release - DLL|Win32'">..\..\..\..\..\Bin\Release\trunk\main\Executables\Release\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release - DLL|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - DLL|Win32'">false</LinkIncremental> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug - DLL|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug - DLL|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug - DLL|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug - LIB|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug - LIB|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug - LIB|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release - DLL|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release - DLL|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release - DLL|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release - LIB|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release - LIB|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release - LIB|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\..\..\..\Dependencies\trunk\main\Tinyxml\includes;..\..\..\..\Dependencies\trunk\main\OGRE\includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;XMLNODEPROCESSING_BUILDMODE_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalDependencies>tinyxml_d.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalLibraryDirectories>..\..\..\..\Dependencies\trunk\main\Tinyxml\lib;../../../../../../Dependencies/trunk/main/Ogre/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>..\..\..\..\Dependencies\trunk\main\Tinyxml\includes;..\..\..\..\Dependencies\trunk\main\OGRE\includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;XMLNODEPROCESSING_BUILDMODE_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <RuntimeTypeInfo>false</RuntimeTypeInfo> + <PrecompiledHeader> + </PrecompiledHeader> + <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalDependencies>tinyxml.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalLibraryDirectories>..\..\..\..\Dependencies\trunk\main\Tinyxml\lib;../../../../../../Dependencies/trunk/main/Ogre/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - LIB|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\..\..\..\Dependencies\trunk\main\Tinyxml\includes;..\..\..\..\Dependencies\trunk\main\OGRE\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;XMLNODEPROCESSING_BUILDMODE_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <RuntimeTypeInfo>false</RuntimeTypeInfo> + <PrecompiledHeader> + </PrecompiledHeader> + <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Lib> + <OutputFile>$(OutDir)$(ProjectName)_d.lib</OutputFile> + </Lib> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - DLL|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\..\..\..\Dependencies\trunk\main\Tinyxml\includes;..\..\..\..\Dependencies\trunk\main\OGRE\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;XMLNODEPROCESSING_BUILDMODE_DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalDependencies>tinyxml_d.lib;OgreMain_d.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)$(ProjectName)_d.dll</OutputFile> + <AdditionalLibraryDirectories>..\..\..\..\Dependencies\trunk\main\Tinyxml\lib;../../../../../../Dependencies/trunk/main/Ogre/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - LIB|Win32'"> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>Default</InlineFunctionExpansion> + <IntrinsicFunctions>true</IntrinsicFunctions> + <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> + <OmitFramePointers>true</OmitFramePointers> + <WholeProgramOptimization>true</WholeProgramOptimization> + <AdditionalIncludeDirectories>..\..\..\..\Dependencies\trunk\main\Tinyxml\includes;..\..\..\..\Dependencies\trunk\main\OGRE\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;XMLNODEPROCESSING_BUILDMODE_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>false</MinimalRebuild> + <BasicRuntimeChecks>Default</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <RuntimeTypeInfo>false</RuntimeTypeInfo> + <PrecompiledHeader> + </PrecompiledHeader> + <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Lib> + <AdditionalOptions>/NODEFAULTLIB:MSVCRTD /VERBOSE:LIB %(AdditionalOptions)</AdditionalOptions> + <OutputFile>$(OutDir)$(ProjectName).lib</OutputFile> + </Lib> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - DLL|Win32'"> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>Default</InlineFunctionExpansion> + <IntrinsicFunctions>false</IntrinsicFunctions> + <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> + <OmitFramePointers>false</OmitFramePointers> + <AdditionalIncludeDirectories>..\..\..\..\Dependencies\trunk\main\Tinyxml\includes;..\..\..\..\Dependencies\trunk\main\OGRE\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;XMLNODEPROCESSING_BUILDMODE_DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>false</MinimalRebuild> + <BasicRuntimeChecks>Default</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <RuntimeTypeInfo>false</RuntimeTypeInfo> + <PrecompiledHeader> + </PrecompiledHeader> + <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalDependencies>tinyxml.lib;OgreMain.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)$(ProjectName).dll</OutputFile> + <AdditionalLibraryDirectories>..\..\..\..\Dependencies\trunk\main\Tinyxml\lib;../../../../../../Dependencies/trunk/main/Ogre/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClInclude Include="XNPCommonParamsOfXmlNodeProcessors.h" /> + <ClInclude Include="XNPPrerequisites.h" /> + <ClInclude Include="XNPXmlNodeProcessor.h" /> + <ClInclude Include="XNPXmlNodeProcessorTreeBuilder.h" /> + </ItemGroup> + <ItemGroup> + <ClCompile Include="XNPCommonParamsOfXmlNodeProcessors.cpp" /> + <ClCompile Include="XNPDemo.cpp" /> + <ClCompile Include="XNPXmlNodeProcessor.cpp" /> + <ClCompile Include="XNPXmlNodeProcessorTreeBuilder.cpp" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\..\..\Dependencies\trunk\main\Tinyxml\tinyxml.vcxproj"> + <Project>{b0c9c6cb-ec75-4f7c-8b35-2f6cb0fc4e0f}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> \ No newline at end of file Added: trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XmlNodeProcessor.vcxproj.filters =================================================================== --- trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XmlNodeProcessor.vcxproj.filters (rev 0) +++ trunk/dotsceneformat/Source/Common/trunk/main/XmlNodeProcessor/XmlNodeProcessor.vcxproj.filters 2013-09-13 09:28:46 UTC (rev 2987) @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Header Files"> + <UniqueIdentifier>{d567ebe9-bdfa-43ab-ad38-378166744d87}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Source Files"> + <UniqueIdentifier>{32a58f19-b546-40b7-8fc2-c534c0ff4fba}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClInclude Include="XNPCommonParamsOfXmlNodeProcessors.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="XNPPrerequisites.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="XNPXmlNodeProcessor.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="XNPXmlNodeProcessorTreeBuilder.h"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> + <ItemGroup> + <ClCompile Include="XNPCommonParamsOfXmlNodeProcessors.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="XNPDemo.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="XNPXmlNodeProcessor.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="XNPXmlNodeProcessorTreeBuilder.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> +</Project> \ No newline at end of file Added: trunk/dotsceneformat/Source/Dependencies/trunk/main/HDRLib/HDRLib.vcxproj =================================================================== --- trunk/dotsceneformat/Source/Dependencies/trunk/main/HDRLib/HDRLib.vcxproj (rev 0) +++ trunk/dotsceneformat/Source/Dependencies/trunk/main/HDRLib/HDRLib.vcxproj 2013-09-13 09:28:46 UTC (rev 2987) @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{5B2FC2A2-8C2D-4F38-896C-B67E14B3205F}</ProjectGuid> + <RootNamespace>HDRLib</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">./lib\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">./lib\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>includes;../Ogre/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Lib> + <OutputFile>$(OutDir)$(ProjectName)_d.lib</OutputFile> + </Lib> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>includes;../Ogre/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="src\HDRCompositor.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="includes\HDRCompositor.h" /> + </ItemGroup> + <ItemGroup> + <None Include="ReadMe.txt" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> \ No newline... [truncated message content] |