added winix functions: ln winix function 'default' can be used without redirecting now added new tickets types: TypeProgress, TypeString, TypeMultistring, TypeImages, TypeFiles now tickets are combined with files added winix functions: showtickets fixed mountpoints: when the default root mount was created its parameter table was empty and it caused accessing to a non-existing objects fixed logger: modifiers (log1, log2, log3) were incorrectly treated added modifier: log4 (debug info) now we are moving threads to a new plugin 'thread' created directory: plugins/thread (not finished yet) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@704 e52654a7-88a9-db11-a3e9-0013d4bc506e
96 lines
1.7 KiB
C++
Executable File
96 lines
1.7 KiB
C++
Executable File
/*
|
|
* This file is a part of Winix
|
|
* and is not publicly distributed
|
|
*
|
|
* Copyright (c) 2008-2010, Tomasz Sowa
|
|
* All rights reserved.
|
|
*
|
|
*/
|
|
|
|
#ifndef headerfilecmslucoredircontainer
|
|
#define headerfilecmslucoredircontainer
|
|
|
|
#include <list>
|
|
#include <map>
|
|
#include "item.h"
|
|
|
|
|
|
|
|
class DirContainer
|
|
{
|
|
|
|
public:
|
|
typedef std::list<Item> Table;
|
|
typedef Table::iterator Iterator;
|
|
typedef Table::size_type SizeType;
|
|
|
|
typedef std::map<long, Iterator> TableId;
|
|
typedef std::multimap<long, Iterator> TableParent;
|
|
typedef TableParent::iterator ParentIterator;
|
|
typedef TableParent::size_type ParentSizeType;
|
|
|
|
|
|
DirContainer();
|
|
|
|
Iterator GetRoot();
|
|
Iterator GetEtc();
|
|
Iterator GetVar();
|
|
|
|
Iterator Begin();
|
|
Iterator End();
|
|
SizeType Size();
|
|
bool Empty();
|
|
Iterator PushBack(const Item & item);
|
|
bool ChangeParent(long dir_id, long new_parent_id);
|
|
void Clear();
|
|
|
|
Iterator FindId(long id);
|
|
|
|
bool DelById(long id);
|
|
|
|
ParentIterator ParentBegin();
|
|
ParentIterator ParentEnd();
|
|
ParentSizeType ParentSize();
|
|
bool ParentEmpty();
|
|
ParentIterator FindFirstChild(long parent);
|
|
ParentIterator NextChild(ParentIterator pi);
|
|
|
|
bool IsNameOfSpecialFolder(const std::wstring & name);
|
|
void FindSpecialFolders();
|
|
|
|
private:
|
|
|
|
void CheckSpecialFolder(const Item & item, Iterator iter);
|
|
|
|
// main table with dirs
|
|
Table table;
|
|
|
|
// true if there is a root dir in the table
|
|
bool is_root;
|
|
|
|
// root
|
|
Iterator root_iter;
|
|
|
|
// true if there is a etc dir in the table
|
|
bool is_etc;
|
|
|
|
// etc
|
|
Iterator etc_iter;
|
|
|
|
// true if there is a var dir in the table
|
|
bool is_var;
|
|
|
|
// var
|
|
Iterator var_iter;
|
|
|
|
// indexes
|
|
TableId table_id;
|
|
TableParent table_parent;
|
|
|
|
// names of folders
|
|
static std::wstring dir_etc, dir_var;
|
|
};
|
|
|
|
|
|
#endif
|