updated group plugin to the new pikotools api (child spaces were removed)

This commit is contained in:
2021-06-28 20:58:39 +02:00
parent 4569198b9d
commit ba60f9da8a
2 changed files with 86 additions and 95 deletions

View File

@@ -88,15 +88,17 @@ private:
/*
our space:
set1 (
set1 = (
# group1
# group1 table
(
( value = "value1"
other = "foo" )
# first object
{ value = "value1"
other = "foo" }
( value = "something"
other = "x" )
# second object
{ value = "something"
other = "x" }
)
# group2
@@ -104,7 +106,7 @@ private:
)
) # end of set1
) # end of set1 table
# we can have more sets
# sets should have a unique name
@@ -136,20 +138,20 @@ private:
std::wstring sort_by;
bool sort_asc;
std::vector<std::wstring> sort_value;
//std::vector<std::wstring> sort_value;
struct SortFunHelper
{
Groups * groups;
SortFunHelper(Groups * pgroups) : groups(pgroups) {};
size_t SortValue(const std::wstring & val);
//size_t SortValue(const std::wstring & val);
bool operator()(pt::Space * sp1, pt::Space * sp2);
};
void ReindexGroups(GroupIndex & group_index, pt::Space & set);
void SortValues(pt::Space & group);
void ReindexGroups(GroupIndex & group_index, const std::wstring & set_name, pt::Space::TableType & groups, const std::wstring & key);
void SortValues(pt::Space::TableType & group);
};