Skip to content
Snippets Groups Projects
Commit 90046db4 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

remove not needed ContainerConverter

parent a6ccb0fc
No related branches found
No related tags found
No related merge requests found
/*
* StringContainerConverter.h
*
* Created on: 7. 4. 2015
* Author: Jan Travnicek
*/
#ifndef _STRING_CONTAINER_CONVERTER__H_
#define _STRING_CONTAINER_CONVERTER__H_
#include <core/castApi.hpp>
namespace common {
/* R is container<T>
* S is container<Wrapper>
* T is targetType
*/
template<class R, class S, class T>
class ContainerConverter {
public:
/**
* Performs conversion from contaier<String> to container<T>.
* @return container<T>.
*/
static R convert(const S& containerOfStrings);
};
template<class R, class S, class T>
R ContainerConverter<R, S, T>::convert(const S& container) {
R result;
auto inserter = std::inserter(result, result.end());
for(const auto& elem : container) {
alib::Object res = alib::castApi::getCastPool<T>().cast(elem.getData());
inserter = std::move((T&) res.getData());
}
return result;
}
} /* namespace common */
#endif /* _STRING_CONTAINER_CONVERTER__H_ */
......@@ -6,7 +6,6 @@
*/
 
#include "ExactMultiNondeterministicSubsequenceAutomaton.h"
#include <common/ContainerConverter.hpp>
#include <registration/AlgoRegistration.hpp>
 
namespace stringology {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment