Belle II Software light-2406-ragdoll
StringHandler Class Reference

InputHandler which just takes the uri as XML data. More...

#include <StringHandler.h>

Inheritance diagram for StringHandler:
Collaboration diagram for StringHandler:

Public Types

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

Public Member Functions

 StringHandler (const std::string &uri)
 Create a new InputHandler which always returns uri as XML content.
 
virtual ~StringHandler ()
 empty, virtual destructor
 
virtual InputContextopen (const std::string &path) override
 Create a new context, path will be ignored.
 

Protected Attributes

std::string m_uri
 URI for the InputHandler.
 

Detailed Description

InputHandler which just takes the uri as XML data.

Intended for ease of unit testing, beware that the current implementation does always return the same fragment regardles of resource name, so xincludes will lead to endless loop

Definition at line 42 of file StringHandler.h.

Member Typedef Documentation

◆ Factory

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

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

Definition at line 53 of file InputHandler.h.

Constructor & Destructor Documentation

◆ StringHandler()

StringHandler ( const std::string &  uri)
inlineexplicit

Create a new InputHandler which always returns uri as XML content.

Definition at line 45 of file StringHandler.h.

45: InputHandler(uri) {}
InputHandler(const std::string &uri)
Constructor accepting the uri for the InputHandler.
Definition: InputHandler.h:63

◆ ~StringHandler()

virtual ~StringHandler ( )
inlinevirtual

empty, virtual destructor

Definition at line 47 of file StringHandler.h.

47{}

Member Function Documentation

◆ open()

InputContext * open ( const std::string &  path)
overridevirtual

Create a new context, path will be ignored.

Implements InputHandler.

Definition at line 17 of file StringHandler.cc.

18 {
19 return new StringContext(m_uri);
20 }
std::string m_uri
URI for the InputHandler.
Definition: InputHandler.h:79

Member Data Documentation

◆ m_uri

std::string m_uri
protectedinherited

URI for the InputHandler.

Definition at line 79 of file InputHandler.h.


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