namespace PT renamed to pt

This commit is contained in:
2021-05-20 20:59:12 +02:00
parent d66a36cf21
commit e48a28a5c8
100 changed files with 597 additions and 597 deletions

View File

@@ -77,10 +77,10 @@ Groups * GroupInfo::FindGroups(long dir_id)
bool GroupInfo::ParseGroups(const std::wstring & str, Groups & groups)
{
groups.Clear();
PT::Space & space = *groups.GetSpace();
pt::Space & space = *groups.GetSpace();
conf_parser.SetSpace(space);
if( conf_parser.ParseSpace(str) == PT::SpaceParser::ok )
if( conf_parser.ParseSpace(str) == pt::SpaceParser::ok )
{
groups.Reindex();
}
@@ -91,7 +91,7 @@ bool GroupInfo::ParseGroups(const std::wstring & str, Groups & groups)
groups.Clear();
}
return conf_parser.status == PT::SpaceParser::ok;
return conf_parser.status == pt::SpaceParser::ok;
}

View File

@@ -96,7 +96,7 @@ private:
typedef std::map<long, GroupsWrapItem> GroupsWrap;
GroupsWrap groups_wrap;
PT::SpaceParser conf_parser;
pt::SpaceParser conf_parser;
std::vector<Item*> config_dir_tab;
Item config_file;

View File

@@ -46,7 +46,7 @@ namespace GroupItem
PT::Space * Groups::GetSpace()
pt::Space * Groups::GetSpace()
{
return &space;
}
@@ -63,7 +63,7 @@ void Groups::Reindex()
{
while( seti < space.child_spaces->size() )
{
PT::Space & sp = *(*space.child_spaces)[seti];
pt::Space & sp = *(*space.child_spaces)[seti];
if( sp.name )
{
@@ -85,7 +85,7 @@ void Groups::Reindex()
}
void Groups::ReindexGroups(GroupIndex & group_index, PT::Space & set)
void Groups::ReindexGroups(GroupIndex & group_index, pt::Space & set)
{
size_t i, v;
@@ -94,7 +94,7 @@ size_t i, v;
// loop through all groups in the set
for( i=0 ; i < set.child_spaces->size() ; ++i )
{
PT::Space & group = *(*set.child_spaces)[i];
pt::Space & group = *(*set.child_spaces)[i];
// !! IMPROVE ME will be safer to copy the value out
// if we used accidently the group.Text later the key
// would be overwritten
@@ -141,7 +141,7 @@ size_t i, v;
}
void Groups::SortValues(PT::Space & group)
void Groups::SortValues(pt::Space & group)
{
sort_by = group.to_wstr(L"sort_by");
sort_asc = group.is_equal(L"sort_asc", L"true");
@@ -154,7 +154,7 @@ void Groups::SortValues(PT::Space & group)
}
bool Groups::SortFunHelper::operator()(PT::Space * sp1, PT::Space * sp2)
bool Groups::SortFunHelper::operator()(pt::Space * sp1, pt::Space * sp2)
{
const std::wstring * val1 = sp1->get_wstr(groups->sort_by.c_str());
const std::wstring * val2 = sp2->get_wstr(groups->sort_by.c_str());
@@ -208,11 +208,11 @@ const std::wstring & Groups::GetOption(size_t seti, size_t groupi, size_t valuei
{
if( space.child_spaces && seti < space.child_spaces->size() )
{
PT::Space & groups = *(*space.child_spaces)[seti];
pt::Space & groups = *(*space.child_spaces)[seti];
if( groups.child_spaces && groupi < groups.child_spaces->size() )
{
PT::Space & value = *(*groups.child_spaces)[groupi];
pt::Space & value = *(*groups.child_spaces)[groupi];
if( value.child_spaces && valuei < value.child_spaces->size() )
{
@@ -239,7 +239,7 @@ size_t Groups::Size(size_t seti, size_t groupi)
{
if( space.child_spaces && seti < space.child_spaces->size() )
{
PT::Space & groups = *(*space.child_spaces)[seti];
pt::Space & groups = *(*space.child_spaces)[seti];
if( groups.child_spaces && groupi < groups.child_spaces->size() )
return (*groups.child_spaces)[groupi]->child_spaces->size();

View File

@@ -57,7 +57,7 @@ public:
reading all space
(sets and groups)
*/
PT::Space * GetSpace();
pt::Space * GetSpace();
/*
@@ -110,7 +110,7 @@ private:
# sets should have a unique name
# groups don't have a name
*/
PT::Space space;
pt::Space space;
/*
@@ -143,13 +143,13 @@ private:
Groups * groups;
SortFunHelper(Groups * pgroups) : groups(pgroups) {};
size_t SortValue(const std::wstring & val);
bool operator()(PT::Space * sp1, PT::Space * sp2);
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, pt::Space & set);
void SortValues(pt::Space & group);
};