Blame xmpsdk/src/ExpatAdapter.hpp

Packit Service 21b5d1
#ifndef __ExpatAdapter_hpp__
Packit Service 21b5d1
#define __ExpatAdapter_hpp__
Packit Service 21b5d1
Packit Service 21b5d1
// =================================================================================================
Packit Service 21b5d1
// Copyright 2005-2008 Adobe Systems Incorporated
Packit Service 21b5d1
// All Rights Reserved.
Packit Service 21b5d1
//
Packit Service 21b5d1
// NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance with the terms
Packit Service 21b5d1
// of the Adobe license agreement accompanying it.
Packit Service 21b5d1
// =================================================================================================
Packit Service 21b5d1
Packit Service 21b5d1
#include "XMP_Environment.h"	// ! Must be the first #include!
Packit Service 21b5d1
#include "XMLParserAdapter.hpp"
Packit Service 21b5d1
Packit Service 21b5d1
// =================================================================================================
Packit Service 21b5d1
// Derived XML parser adapter for Expat.
Packit Service 21b5d1
// =================================================================================================
Packit Service 21b5d1
Packit Service 21b5d1
#ifndef BanAllEntityUsage
Packit Service 21b5d1
	#define BanAllEntityUsage	0
Packit Service 21b5d1
#endif
Packit Service 21b5d1
Packit Service 21b5d1
struct XML_ParserStruct;	// ! Hack to avoid exposing expat.h to all clients.
Packit Service 21b5d1
typedef struct XML_ParserStruct *XML_Parser;
Packit Service 21b5d1
Packit Service 21b5d1
class ExpatAdapter : public XMLParserAdapter {
Packit Service 21b5d1
public:
Packit Service 21b5d1
Packit Service 21b5d1
	XML_Parser parser;
Packit Service 21b5d1
	
Packit Service 21b5d1
	#if BanAllEntityUsage
Packit Service 21b5d1
		bool isAborted;
Packit Service 21b5d1
	#endif
Packit Service 21b5d1
	
Packit Service 21b5d1
	#if XMP_DebugBuild
Packit Service 21b5d1
		size_t elemNesting;
Packit Service 21b5d1
	#endif
Packit Service 21b5d1
	
Packit Service 21b5d1
	ExpatAdapter();
Packit Service 21b5d1
	virtual ~ExpatAdapter();
Packit Service 21b5d1
	
Packit Service 21b5d1
	void ParseBuffer ( const void * buffer, size_t length, bool last = true );
Packit Service 21b5d1
Packit Service 21b5d1
};
Packit Service 21b5d1
Packit Service 21b5d1
extern "C" ExpatAdapter * XMP_NewExpatAdapter();
Packit Service 21b5d1
Packit Service 21b5d1
// =================================================================================================
Packit Service 21b5d1
Packit Service 21b5d1
#endif	// __ExpatAdapter_hpp__