7 #include "fwRuntime/ExtensionPoint.hpp" 9 #include "fwRuntime/Bundle.hpp" 10 #include "fwRuntime/io/Validator.hpp" 11 #include "fwRuntime/RuntimeException.hpp" 19 const ::boost::filesystem::path& schema ) :
37 if( !m_schema.empty() && !m_validator )
41 const ::boost::filesystem::path schemaPath =
getBundle()->getResourcesLocation() / m_schema;
42 OSLM_DEBUG(
"Use this schema : " << schemaPath <<
" for this id : " << m_id );
43 m_validator = std::shared_ptr< io::Validator >(
new io::Validator(schemaPath) );
45 catch(
const std::exception& e )
47 throw RuntimeException(
"Error while creating a validator. " + std::string(e.what()) );
Implements the base class for all element managed by a bundle.
Defines the runtime exception class.
ExtensionPoint(const std::shared_ptr< Bundle > bundle, const std::string &id, const boost::filesystem::path &schema)
constructor
Defines the extension point class.
The namespace fwRuntime contains classes to manage bundle, configuration element, extension point in ...
FWRUNTIME_API const std::string & getIdentifier() const
Retrieves the extension point identifier.
Implements an XML validator.
FWRUNTIME_API std::shared_ptr< io::Validator > getExtensionValidator() const
Retrieves the extension validator.
FWRUNTIME_API std::shared_ptr< Bundle > getBundle() const
Retrieves the bundle that owns the extension.
#define OSLM_DEBUG(message)