DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Public Member Functions | Protected Attributes | List of all members
dd4hep::xml::UriContextReader Class Reference

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

#include <UriReader.h>

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

Public Member Functions

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

Protected Attributes

UriReaderm_reader
 Pointer to true reader object. More...
 
UriReader::UserContextm_context
 Pointer to user context. More...
 

Detailed Description

Class supporting to read data given a URI.

Wrapper to read XML URI using a virtual reader instance. This implementation allows to externally chain an argument structure to the resolution function, which allows to set/retrieve further arguments such as e.g. conditions IOVs.

Author
M.Frank
Version
1.0

Definition at line 83 of file UriReader.h.

Constructor & Destructor Documentation

◆ UriContextReader() [1/2]

dd4hep::xml::UriContextReader::UriContextReader ( UriReader reader,
UriReader::UserContext ctxt 
)

Default initializing constructor.

Default constructor.

Definition at line 32 of file UriReader.cpp.

◆ UriContextReader() [2/2]

dd4hep::xml::UriContextReader::UriContextReader ( const UriContextReader copy)

Copy constructor.

Definition at line 38 of file UriReader.cpp.

◆ ~UriContextReader()

dd4hep::xml::UriContextReader::~UriContextReader ( )
virtual

Default destructor.

Definition at line 44 of file UriReader.cpp.

Member Function Documentation

◆ blockPath()

void dd4hep::xml::UriContextReader::blockPath ( const std::string &  path)
overridevirtual

Add a blocked path entry.

Helpers for selective parsing

Reimplemented from dd4hep::xml::UriReader.

Definition at line 48 of file UriReader.cpp.

◆ context()

virtual UserContext* dd4hep::xml::UriContextReader::context ( )
inlineoverridevirtual

Access to local context.

Implements dd4hep::xml::UriReader.

Definition at line 97 of file UriReader.h.

◆ isBlocked()

bool dd4hep::xml::UriContextReader::isBlocked ( const std::string &  path) const
overridevirtual

Check if a URI path is blocked.

Reimplemented from dd4hep::xml::UriReader.

Definition at line 53 of file UriReader.cpp.

◆ load() [1/2]

bool dd4hep::xml::UriContextReader::load ( const std::string &  system_id,
std::string &  data 
)
overridevirtual

Resolve a given URI to a string containing the data.

Reimplemented from dd4hep::xml::UriReader.

Definition at line 58 of file UriReader.cpp.

◆ load() [2/2]

bool dd4hep::xml::UriContextReader::load ( const std::string &  system_id,
UserContext context,
std::string &  data 
)
overridevirtual

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

Resolve a given URI to a string containing the data.

Implements dd4hep::xml::UriReader.

Definition at line 63 of file UriReader.cpp.

◆ parserLoaded() [1/2]

void dd4hep::xml::UriContextReader::parserLoaded ( const std::string &  system_id)
overridevirtual

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

Reimplemented from dd4hep::xml::UriReader.

Definition at line 68 of file UriReader.cpp.

◆ parserLoaded() [2/2]

void dd4hep::xml::UriContextReader::parserLoaded ( const std::string &  system_id,
UserContext ctxt 
)
overridevirtual

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

Implements dd4hep::xml::UriReader.

Definition at line 73 of file UriReader.cpp.

Member Data Documentation

◆ m_context

UriReader::UserContext* dd4hep::xml::UriContextReader::m_context
protected

Pointer to user context.

Definition at line 88 of file UriReader.h.

◆ m_reader

UriReader* dd4hep::xml::UriContextReader::m_reader
protected

Pointer to true reader object.

Definition at line 86 of file UriReader.h.


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