9 #ifndef __PBIO_API__PBIO__TEMPLATES_INDEX_H_
10 #define __PBIO_API__PBIO__TEMPLATES_INDEX_H_
17 #include "ComplexObject.h"
20 #include "stl_wraps_impls/WrapOStreamImpl.h"
44 typedef LightSmartPtr<TemplatesIndex>::tPtr
Ptr;
135 const DHPtr &dll_handle,
155 TemplatesIndex::TemplatesIndex(
156 const DHPtr &dll_handle,
158 ComplexObject(dll_handle, impl)
168 std::ostringstream name_stream;
169 pbio::stl_wraps::WrapOStreamImpl name_stream_wrap(name_stream);
171 void* exception = NULL;
173 _dll_handle->TemplatesIndex_getMethodName(
176 pbio::stl_wraps::WrapOStream::write_func,
179 checkException(exception, *_dll_handle);
181 return name_stream.str();
188 void* exception = NULL;
190 const size_t size = _dll_handle->TemplatesIndex_size(
194 checkException(exception, *_dll_handle);
203 void* exception = NULL;
205 pbio::facerec::TemplateImpl*
const result_impl = _dll_handle->TemplatesIndex_at(
210 checkException(exception, *_dll_handle);
212 return Template::Ptr::make(_dll_handle, result_impl);
219 void* exception = NULL;
221 _dll_handle->TemplatesIndex_reserveSearchMemory(
226 checkException(exception, *_dll_handle);
231 #endif // __PBIO_API__PBIO__TEMPLATES_INDEX_H_
size_t size() const
Get a number of templates in the index. Thread-safe.
Definition: TemplatesIndex.h:186
Interface object for working with the template index.
Definition: TemplatesIndex.h:35
std::string getMethodName() const
Get a method name. Thread-safe.
Definition: TemplatesIndex.h:166
Definition: Recognizer.h:64
Interface object for creating and matching templates.
Definition: Recognizer.h:37
LightSmartPtr< Template >::tPtr Ptr
Alias for the type of a smart pointer to Template.
Definition: Template.h:46
LightSmartPtr< TemplatesIndex >::tPtr Ptr
Alias for the type of a smart pointer to TemplatesIndex.
Definition: TemplatesIndex.h:44
Error - the class of exceptions thrown when errors occur.
void reserveSearchMemory(const int queries_count) const
Reserve memory for temporary buffers used while searching. These temporary buffers require 8 * size()...
Definition: TemplatesIndex.h:217
pbio::Template::Ptr at(size_t i) const
Get an i-th template. Thread-safe.
Definition: TemplatesIndex.h:201