LibreOffice Module connectivity (master) 1
|
The class OSortIndex can be used to implement a sorted index. More...
#include <TSortIndex.hxx>
Public Types | |
typedef std::vector< std::pair< sal_Int32, std::unique_ptr< OKeyValue > > > | TIntValuePairVector |
typedef std::vector< OKeyType > | TKeyTypeVector |
Public Member Functions | |
OSortIndex (std::vector< OKeyType > &&_aKeyType, std::vector< TAscendingOrder > &&_aAscending) | |
OSortIndex (OSortIndex const &)=delete | |
OSortIndex & | operator= (OSortIndex const &)=delete |
~OSortIndex () | |
void | AddKeyValue (std::unique_ptr< OKeyValue > pKeyValue) |
AddKeyValue appends a new value. More... | |
void | Freeze () |
Freeze freezes the sortindex so that new values could only be appended by their value. More... | |
::rtl::Reference< OKeySet > | CreateKeySet () |
CreateKeySet creates the keyset which values could be used to travel in your table/result The returned keyset is frozen. More... | |
const std::vector< OKeyType > & | getKeyType () const |
TAscendingOrder | getAscending (std::vector< TAscendingOrder >::size_type _nPos) const |
Private Attributes | |
TIntValuePairVector | m_aKeyValues |
TKeyTypeVector | m_aKeyType |
std::vector< TAscendingOrder > | m_aAscending |
bool | m_bFrozen |
The class OSortIndex can be used to implement a sorted index.
This can depend on the fields which should be sorted.
Definition at line 46 of file TSortIndex.hxx.
typedef std::vector<std::pair<sal_Int32, std::unique_ptr<OKeyValue> > > connectivity::OSortIndex::TIntValuePairVector |
Definition at line 49 of file TSortIndex.hxx.
typedef std::vector<OKeyType> connectivity::OSortIndex::TKeyTypeVector |
Definition at line 50 of file TSortIndex.hxx.
OSortIndex::OSortIndex | ( | std::vector< OKeyType > && | _aKeyType, |
std::vector< TAscendingOrder > && | _aAscending | ||
) |
Definition at line 97 of file TSortIndex.cxx.
References m_aKeyType.
|
delete |
OSortIndex::~OSortIndex | ( | ) |
Definition at line 105 of file TSortIndex.cxx.
void OSortIndex::AddKeyValue | ( | std::unique_ptr< OKeyValue > | pKeyValue | ) |
AddKeyValue appends a new value.
pKeyValue | the keyvalue to be appended ATTENTION: when the sortindex is already frozen the parameter will be deleted |
Definition at line 109 of file TSortIndex.cxx.
References m_aKeyValues, and m_bFrozen.
rtl::Reference< OKeySet > OSortIndex::CreateKeySet | ( | ) |
CreateKeySet creates the keyset which values could be used to travel in your table/result The returned keyset is frozen.
Definition at line 83 of file TSortIndex.cxx.
References Freeze(), and m_aKeyValues.
void OSortIndex::Freeze | ( | ) |
Freeze freezes the sortindex so that new values could only be appended by their value.
Definition at line 120 of file TSortIndex.cxx.
References m_aKeyType, m_aKeyValues, m_bFrozen, and connectivity::NONE.
Referenced by CreateKeySet().
|
inline |
Definition at line 87 of file TSortIndex.hxx.
References _nPos.
|
inline |
Definition at line 86 of file TSortIndex.hxx.
References m_aKeyType.
|
delete |
|
private |
Definition at line 55 of file TSortIndex.hxx.
|
private |
Definition at line 54 of file TSortIndex.hxx.
Referenced by Freeze().
|
private |
Definition at line 53 of file TSortIndex.hxx.
Referenced by AddKeyValue(), CreateKeySet(), and Freeze().
|
private |
Definition at line 56 of file TSortIndex.hxx.
Referenced by AddKeyValue(), and Freeze().