DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Classes | Public Member Functions | List of all members
dd4hep::xml::UriReader Class Referenceabstract

Class supporting to read data given a URI. More...

#include <UriReader.h>

Inheritance diagram for dd4hep::xml::UriReader:
dd4hep::xml::UriContextReader

Classes

struct  UserContext
 Base class of the user context type chained to the entity resolver. More...
 

Public Member Functions

 UriReader ()=default
 Default constructor. More...
 
virtual ~UriReader ()
 Default destructor. More...
 
virtual UserContextcontext ()=0
 Access to local context. More...
 
virtual void blockPath (const std::string &)
 Add a blocked path entry. More...
 
virtual bool isBlocked (const std::string &) const
 Check if a URI path is blocked. More...
 
virtual bool load (const std::string &system_id, std::string &data)
 Resolve a given URI to a string containing the data. More...
 
virtual bool load (const std::string &system_id, UserContext *context, std::string &data)=0
 Resolve a given URI to a string containing the data with context. More...
 
virtual void parserLoaded (const std::string &system_id)
 Inform reader about a locally (e.g. by XercesC) handled source load. More...
 
virtual void parserLoaded (const std::string &system_id, UserContext *ctxt)=0
 Inform reader about a locally (e.g. by XercesC) handled source load. More...
 

Detailed Description

Class supporting to read data given a URI.

Interface to use entity resolvers for parsing layered XML documents Currently only supported by the XercesC interface. No support for TinyXML possible.

Author
M.Frank
Version
1.0

Definition at line 35 of file UriReader.h.

Constructor & Destructor Documentation

◆ UriReader()

dd4hep::xml::UriReader::UriReader ( )
default

Default constructor.

◆ ~UriReader()

dd4hep::xml::UriReader::~UriReader ( )
virtual

Default destructor.

Definition at line 18 of file UriReader.cpp.

Member Function Documentation

◆ blockPath()

virtual void dd4hep::xml::UriReader::blockPath ( const std::string &  )
inlinevirtual

Add a blocked path entry.

Helpers for selective parsing

Reimplemented in dd4hep::xml::UriContextReader.

Definition at line 59 of file UriReader.h.

◆ context()

virtual UserContext* dd4hep::xml::UriReader::context ( )
pure virtual

Access to local context.

Implemented in dd4hep::xml::UriContextReader.

◆ isBlocked()

virtual bool dd4hep::xml::UriReader::isBlocked ( const std::string &  ) const
inlinevirtual

Check if a URI path is blocked.

Reimplemented in dd4hep::xml::UriContextReader.

Definition at line 61 of file UriReader.h.

◆ load() [1/2]

bool dd4hep::xml::UriReader::load ( const std::string &  system_id,
std::string &  data 
)
virtual

Resolve a given URI to a string containing the data.

Reimplemented in dd4hep::xml::UriContextReader.

Definition at line 22 of file UriReader.cpp.

◆ load() [2/2]

virtual bool dd4hep::xml::UriReader::load ( const std::string &  system_id,
UserContext context,
std::string &  data 
)
pure virtual

Resolve a given URI to a string containing the data with context.

Implemented in dd4hep::xml::UriContextReader.

◆ parserLoaded() [1/2]

void dd4hep::xml::UriReader::parserLoaded ( const std::string &  system_id)
virtual

Inform reader about a locally (e.g. by XercesC) handled source load.

Reimplemented in dd4hep::xml::UriContextReader.

Definition at line 27 of file UriReader.cpp.

◆ parserLoaded() [2/2]

virtual void dd4hep::xml::UriReader::parserLoaded ( const std::string &  system_id,
UserContext ctxt 
)
pure virtual

Inform reader about a locally (e.g. by XercesC) handled source load.

Implemented in dd4hep::xml::UriContextReader.


The documentation for this class was generated from the following files: