Skip to content
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.

Add livre::DataSource::handles() #375

Merged
merged 1 commit into from
Jan 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Changelog {#Changelog}

# git master

* [#375](https://github.com/BlueBrain/Livre/pull/375):
Add livre::DataSource::handles()
* [#373](https://github.com/BlueBrain/Livre/pull/373):
Fix concurrent send & receive from livreGUI, which lead to crashes on GUI
and/or connected clients
Expand Down
2 changes: 1 addition & 1 deletion livre/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
set(LIVRECORE_PUBLIC_HEADERS
configuration/Configuration.h
configuration/Parameters.h
data/DataSource.h
data/DataSourcePlugin.h
data/Histogram.h
data/LODNode.h
Expand All @@ -28,7 +29,6 @@ set(LIVRECORE_HEADERS
cache/Cache.h
cache/CacheObject.h
cache/CacheStatistics.h
data/DataSource.h
maths/Quantizer.h
pipeline/Executable.h
pipeline/Filter.h
Expand Down
5 changes: 5 additions & 0 deletions livre/core/data/DataSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ std::string DataSource::getDescriptions()
return DataSource::Impl::PluginFactory::getInstance().getDescriptions();
}

bool DataSource::handles( const servus::URI& uri )
{
return DataSource::Impl::PluginFactory::getInstance().handles( DataSourcePluginData{ uri } );
}

LODNode DataSource::getNode( const NodeId& nodeId ) const
{
return _impl->getNode( nodeId );
Expand Down
5 changes: 4 additions & 1 deletion livre/core/data/DataSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ class DataSource
LIVRECORE_API static void loadPlugins();

/** @return information on all loaded plugins. */
static std::string getDescriptions();
LIVRECORE_API static std::string getDescriptions();

/** @return true if a datasource plugin for the given URI is available. */
LIVRECORE_API static bool handles( const servus::URI& uri );

/**
* @return The volume information.
Expand Down