libimgdoc2
Loading...
Searching...
No Matches
Public Member Functions | List of all members
imgdoc2::ICreateOptions Class Referenceabstract

Options for creating an imgdoc2-document. More...

#include <ICreateOptions.h>

Public Member Functions

virtual void SetDocumentType (imgdoc2::DocumentType document_type)=0
 
virtual void SetFilename (const char *filename)=0
 
virtual void AddDimension (imgdoc2::Dimension dim)=0
 
virtual void SetUseSpatialIndex (bool use_spatial_index)=0
 
virtual void AddIndexForDimension (imgdoc2::Dimension dim)=0
 
virtual void SetCreateBlobTable (bool create_blob_table)=0
 
virtual imgdoc2::DocumentType GetDocumentType () const =0
 
virtual bool GetUseSpatialIndex () const =0
 
virtual const std::string & GetFilename () const =0
 
virtual const std::unordered_set< imgdoc2::Dimension > & GetDimensions () const =0
 
virtual const std::unordered_set< imgdoc2::Dimension > & GetIndexedDimensions () const =0
 
virtual bool GetCreateBlobTable () const =0
 
void SetFilename (const std::string &filename)
 
template<class ForwardIterator >
void AddDimensions (ForwardIterator start, ForwardIterator end)
 

Detailed Description

Options for creating an imgdoc2-document.

Member Function Documentation

◆ AddDimension()

virtual void imgdoc2::ICreateOptions::AddDimension ( imgdoc2::Dimension  dim)
pure virtual

Adds a dimension. Adding the same dimension multiple times is valid, no error is reported in this case. If the argument 'dim' is not a valid dimension identifier, an "invalid_argument" exception will be thrown.

Parameters
dimThe dimension to add.

◆ AddDimensions()

template<class ForwardIterator >
void imgdoc2::ICreateOptions::AddDimensions ( ForwardIterator  start,
ForwardIterator  end 
)
inline

Adds the dimensions from the specified iterator.

Template Parameters
ForwardIteratorType of the forward iterator.
Parameters
startThe start.
endThe end.

◆ AddIndexForDimension()

virtual void imgdoc2::ICreateOptions::AddIndexForDimension ( imgdoc2::Dimension  dim)
pure virtual

Adds a dimension for which an index is to be created. Adding the same dimension multiple times is valid, no error is reported in this case. If the argument 'dim' is not a valid dimension identifier, an "invalid_argument" exception will be thrown.

Parameters
dimThe dimension for which to create an index.

◆ GetCreateBlobTable()

virtual bool imgdoc2::ICreateOptions::GetCreateBlobTable ( ) const
pure virtual

Gets a boolean indicating whether a blob table is to be created.

Returns
True if a blob table is to be created; false otherwise.

◆ GetDimensions()

virtual const std::unordered_set< imgdoc2::Dimension > & imgdoc2::ICreateOptions::GetDimensions ( ) const
pure virtual

Gets the dimensions.

Returns
The dimensions.

◆ GetDocumentType()

virtual imgdoc2::DocumentType imgdoc2::ICreateOptions::GetDocumentType ( ) const
pure virtual

Gets the document type.

Returns
The document type.

◆ GetFilename()

virtual const std::string & imgdoc2::ICreateOptions::GetFilename ( ) const
pure virtual

Gets the filename. The returned string is given in UTF8-encoding.

Returns
The filename.

◆ GetIndexedDimensions()

virtual const std::unordered_set< imgdoc2::Dimension > & imgdoc2::ICreateOptions::GetIndexedDimensions ( ) const
pure virtual

Gets dimensions for which an index is to be created.

Returns
The indexed dimensions.

◆ GetUseSpatialIndex()

virtual bool imgdoc2::ICreateOptions::GetUseSpatialIndex ( ) const
pure virtual

Whether the document should be created with a spatial index.

Returns
True if a spatial index is requested; false otherwise.

◆ SetCreateBlobTable()

virtual void imgdoc2::ICreateOptions::SetCreateBlobTable ( bool  create_blob_table)
pure virtual

Sets a flag indicating whether a BLOB table is to be constructed. Only if a BLOB table is present, the storage-type "BlobInDatabase" can be used.

Parameters
create_blob_tableTrue to create BLOB table.

◆ SetDocumentType()

virtual void imgdoc2::ICreateOptions::SetDocumentType ( imgdoc2::DocumentType  document_type)
pure virtual

Sets the document type. Note that a newly created instance will have the document type "kImage2d2".

Parameters
document_typeType of the document.

◆ SetFilename() [1/2]

virtual void imgdoc2::ICreateOptions::SetFilename ( const char *  filename)
pure virtual

Sets the filename. For a Sqlite-based database, this string allows for additional functionality (like an in-memory database) - cf. https://sqlite.org/inmemorydb.html, https://sqlite.org/uri.html. The string must be given in UTF-8 encoding.

Parameters
filenameThe filename (in UTF8-encoding).

◆ SetFilename() [2/2]

void imgdoc2::ICreateOptions::SetFilename ( const std::string &  filename)
inline

Sets the filename. For a Sqlite-based database, this string allows for additional functionality (like an in-memory database) - cf. https://sqlite.org/inmemorydb.html, https://sqlite.org/uri.html. The string must be given in UTF-8 encoding.

Parameters
filenameThe filename (in UTF8-encoding).

◆ SetUseSpatialIndex()

virtual void imgdoc2::ICreateOptions::SetUseSpatialIndex ( bool  use_spatial_index)
pure virtual

Sets a flag indicating whether the database should be created containing a spatial index.

Parameters
use_spatial_indexTrue if to construct with a spatial index.

The documentation for this class was generated from the following file: