#ifndef NodeSerialize_hpp
#define NodeSerialize_hpp

#include <fstream>
#include "TreeElements.hpp"


namespace apoc { namespace legacy {
    
    class NodeSerialize : public NodeVisitor
    {
    public :
	NodeSerialize(void) {}
	NodeSerialize( const std::string& aFileName ):mFileName(aFileName) {}
	void open();
	void close();
        virtual ~NodeSerialize(void) {}
	
        virtual bool preChildrenProcess(Node& aNode) ;
	virtual bool postChildrenProcess(Node& aNode) ;
	
    protected :
    private :
	std::string mFileName;
	std::ofstream mOutputStream;
	void NodeSerialize::serializeValues(PropertyNode& aNode) ;
    } ;
    
} } // apoc.legacy

#endif // NodeSerialize_hpp
