Manages the indexing information of a repository fo images.
More...
#include <index_manager.h>
Manages the indexing information of a repository fo images.
Maintains a list in memory of the indexes (using the class ImageIndex
for the nodes) of all the opened images and allows a multi-thread access to the information.
- See also
- FileManager
-
ImageIndex
jpeg2000::IndexManager::IndexManager |
( |
| ) |
|
|
inline |
virtual jpeg2000::IndexManager::~IndexManager |
( |
| ) |
|
|
inlinevirtual |
bool jpeg2000::IndexManager::CloseImage |
( |
const ImageIndex::Ptr & |
image_index | ) |
|
Closes an image and removes its index from the list, only if it is not used by any other one.
- Parameters
-
image_index | Associated image index. |
- Returns
true
if successful.
Returns a reference to the base file manager.
Returns a pointer to the first image index.
Returns a pointer to the last image index.
int jpeg2000::IndexManager::GetSize |
( |
| ) |
const |
|
inline |
Returns the size of the list.
bool jpeg2000::IndexManager::Init |
( |
string |
root_dir, |
|
|
string |
cache_dir |
|
) |
| |
|
inline |
Initializes the object.
- Parameters
-
root_dir | Root directory of the image repository. |
cache_dir | Directory used for caching. |
- Returns
true
if successful
bool jpeg2000::IndexManager::OpenImage |
( |
string & |
path_image_file, |
|
|
ImageIndex::Ptr * |
image_index |
|
) |
| |
Opens an image and adds its index to the list.
- Parameters
-
path_image_file | Path of the image file. |
image_index | Receives the pointer to the image index created. |
- Returns
true
if successful.
bool jpeg2000::IndexManager::UnsafeCloseImage |
( |
const ImageIndex::Ptr & |
image_index | ) |
|
|
private |
Unsafely (without mutex) closes an image and removes its index from the list, only if it is not used by any other one.
- Parameters
-
image_index | Associated image index. |
- Returns
true
if successful.
bool jpeg2000::IndexManager::UnsafeOpenImage |
( |
string & |
path_image_file, |
|
|
ImageIndex::Ptr * |
image_index |
|
) |
| |
|
private |
Unsafely (without mutex) opens an image and adds its index to the list.
- Parameters
-
path_image_file | Path of the image file. |
image_index | Receives the pointer to the image index created. |
- Returns
true
if successful.
list<ImageIndex> jpeg2000::IndexManager::index_list |
|
private |
Mutex jpeg2000::IndexManager::mutex |
|
private |
Mutex for the operations with the list.
The documentation for this class was generated from the following files: