added: Patterns class (in templates)
ezc patterns are managed by this class added: some work in groupitem plugin (not finished yet) changed: ConfParser can read a string from memory now (need some testing yet) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@757 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
84
plugins/groupitem/groupinfo.h
Executable file
84
plugins/groupitem/groupinfo.h
Executable file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2011, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfile_winix_plugins_groupitem_groupinfo
|
||||
#define headerfile_winix_plugins_groupitem_groupinfo
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "groups.h"
|
||||
#include "core/confparser.h"
|
||||
#include "core/item.h"
|
||||
#include "core/system.h"
|
||||
|
||||
|
||||
|
||||
|
||||
namespace GroupItem
|
||||
{
|
||||
|
||||
struct GroupsWrapItem
|
||||
{
|
||||
bool to_delete;
|
||||
std::wstring file_name;
|
||||
Groups groups;
|
||||
|
||||
GroupsWrapItem()
|
||||
{
|
||||
to_delete = false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
class GroupInfo
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
GroupInfo();
|
||||
|
||||
void SetSystem(System * psystem);
|
||||
void ReadGroupsConfigs(bool skip_existing_configs);
|
||||
Groups * FindGroups(long dir_id); // can return a null pointer
|
||||
|
||||
|
||||
int mount_par_group_conf;
|
||||
int mount_par_group_lang_conf;
|
||||
|
||||
void PrintGroups();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
System * system;
|
||||
|
||||
// map[dir_id] -> GroupsWrap
|
||||
typedef std::map<long, GroupsWrapItem> GroupsWrap;
|
||||
GroupsWrap groups_wrap;
|
||||
|
||||
ConfParser conf_parser;
|
||||
std::vector<Item*> config_dir_tab;
|
||||
Item config_file;
|
||||
|
||||
void MarkAllGroupsToDelete();
|
||||
void DeleteAllMarkedGroups();
|
||||
bool GetConfContent(const std::wstring & path);
|
||||
bool ParseGroupsConf(long mount_dir_id, const std::wstring & path);
|
||||
bool ParseGroups(const std::wstring & str, Groups & groups);
|
||||
void ReadGroupsConf(Mounts & mounts, bool skip_existing_configs);
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user