Microsoft Information Protection (MIP) SDK for C++: Reference 1.16
Doxygen-generated documentation for MIP SDK written in C++
Loading...
Searching...
No Matches
StorageDelegate::StorageSettings Class Reference

Settings used by StorageDelegate. More...

#include <src/api/mip/storage_delegate.h>

Public Member Functions

unsigned int GetStorageTableVersion () const
 Gets the version of the underlying storage tables that will be created by this StorageDelegate.
 
bool IsInMemoryStorageSupported () const
 Gets whether the delegate supports in-memory storage.
 
bool IsRemoteStorage () const
 Gets whether remote storage is used or not.
 
std::string OnDiskExtension () const
 Gets the extension that the delegate will use when storing a table on disk.
 
 StorageSettings (bool isRemoteStorage, bool isInMemoryStorageSupported, const std::string &onDiskExtension=GetSqliteExtension(), StorageTableVersion storageTableVersion=StorageTableVersion::One)
 Interface for configuring the storage settings.
 

Detailed Description

Settings used by StorageDelegate.

Definition at line 91 of file storage_delegate.h.

Constructor & Destructor Documentation

◆ StorageSettings()

StorageDelegate::StorageSettings::StorageSettings ( bool isRemoteStorage,
bool isInMemoryStorageSupported,
const std::string & onDiskExtension = GetSqliteExtension(),
StorageTableVersion storageTableVersion = StorageTableVersion::One )
inline

Interface for configuring the storage settings.

Parameters
isRemoteStorerepresents if store is remote. This will be taken into account for internal encryption.
isInMemoryStorageSupportedDeclares whether the delegate supports in-memory storage.
onDiskExtensionThe file extension that will be used to store the data if it is needed. Should begin with ".".
storageTableVersionThe version of the storage table that will be created by this delegate. If this is greater than 1, a cast can be made in internal code.

Definition at line 101 of file storage_delegate.h.

106 : mIsRemoteStorage(isRemoteStorage),
107 mIsInMemoryStorageSupported(isInMemoryStorageSupported),
108 mOnDiskExtension(onDiskExtension),
109 mStorageTableVersion(static_cast<unsigned int>(storageTableVersion)) {
110 if (mStorageTableVersion < static_cast<unsigned int>(StorageTableVersion::One) || mStorageTableVersion > static_cast<unsigned int>(StorageTableVersion::Two)) {
111 throw std::invalid_argument("Storage table version must be between StorageTableVersion::One and StorageTableVersion::Two");
112 }
113 }

References One, and Two.

Member Function Documentation

◆ GetStorageTableVersion()

unsigned int StorageDelegate::StorageSettings::GetStorageTableVersion ( ) const
inline

Gets the version of the underlying storage tables that will be created by this StorageDelegate.

Returns
The version of the StorageTables created

Definition at line 143 of file storage_delegate.h.

143{ return mStorageTableVersion; }

◆ IsInMemoryStorageSupported()

bool StorageDelegate::StorageSettings::IsInMemoryStorageSupported ( ) const
inline

Gets whether the delegate supports in-memory storage.

Returns
true if the delegate supports in-memory storage.

Definition at line 127 of file storage_delegate.h.

127{ return mIsInMemoryStorageSupported; }

◆ IsRemoteStorage()

bool StorageDelegate::StorageSettings::IsRemoteStorage ( ) const
inline

Gets whether remote storage is used or not.

Returns
whether remote storage is used or not.

Definition at line 120 of file storage_delegate.h.

120{ return mIsRemoteStorage; }

◆ OnDiskExtension()

std::string StorageDelegate::StorageSettings::OnDiskExtension ( ) const
inline

Gets the extension that the delegate will use when storing a table on disk.

Returns
The extension that will be used. Default to ".sqlite3".
Note
Extension will have "." preceding it

Definition at line 136 of file storage_delegate.h.

136{ return mOnDiskExtension; }

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