Belle II Software light-2406-ragdoll
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.
 
virtual ~InputHandler ()
 empty, virtual destructor
 
virtual InputContextopen (const std::string &path)=0
 Open an XML resource.
 

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.

Member Typedef Documentation

◆ Factory

typedef InputHandler * Factory(const std::string &uri)

Factory function which takes a backend uri and returns an InputHandler instance.

Definition at line 53 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

◆ ~InputHandler()

virtual ~InputHandler ( )
inlinevirtual

empty, virtual destructor

Definition at line 66 of file InputHandler.h.

66{}

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 FileHandler, and StringHandler.

Member Data Documentation

◆ m_uri

std::string m_uri
protected

URI for the InputHandler.

Definition at line 79 of file InputHandler.h.


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