Belle II Software  release-08-01-10
InputHandler Class Referenceabstract

Class to provide an InputContext for a given XML resource name. More...

#include <InputHandler.h>

Inheritance diagram for InputHandler:
Collaboration diagram for InputHandler:

Public Types

typedef InputHandlerFactory(const std::string &uri)
 Factory function which takes a backend uri and returns an InputHandler instance.
 

Public Member Functions

 InputHandler (const std::string &uri)
 Constructor accepting the uri for the InputHandler. More...
 
virtual ~InputHandler ()
 empty, virtual destructor
 
virtual InputContextopen (const std::string &path)=0
 Open an XML resource. More...
 

Protected Attributes

std::string m_uri
 URI for the InputHandler.
 

Detailed Description

Class to provide an InputContext for a given XML resource name.

This class is responsible for opening XML resources on request hand returning an InputContext representing the resource on success

Definition at line 47 of file InputHandler.h.

Constructor & Destructor Documentation

◆ InputHandler()

InputHandler ( const std::string &  uri)
inlineexplicit

Constructor accepting the uri for the InputHandler.

The uri is used to specify any parameters for the backend. The content is dependent on the actual InputHandler implementation but could be a base directory, a database host, an archive filename or any combination. Parsing of this string is left to the actual implementation

Definition at line 63 of file InputHandler.h.

63 : m_uri(uri) {};
std::string m_uri
URI for the InputHandler.
Definition: InputHandler.h:79

Member Function Documentation

◆ open()

virtual InputContext* open ( const std::string &  path)
pure virtual

Open an XML resource.

Open the XML resource specified by path and return an InputContext instance on success.

Parameters
pathname of the XML resource
Returns
pointer to an InputContext instance on success, 0 otherwise

Implemented in StringHandler, and FileHandler.


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