tools/installer/CFileList.h
author David Anderson <dvander@alliedmods.net>
Sun Nov 25 18:50:13 2007 +0000 (2007-11-25)
changeset 1725 ea875bcbc286
parent 1722 2c16f160f5dd
permissions -rw-r--r--
small clarification to param2 in MenuAction_End
     1 #ifndef _INCLUDE_FOLDER_LIST_H_
     2 #define _INCLUDE_FOLDER_LIST_H_
     3 
     4 #include "platform_headers.h"
     5 #include <list>
     6 #include <vector>
     7 
     8 struct CFileListEntry
     9 {
    10 	TCHAR file[MAX_PATH];
    11 	unsigned __int64 size;
    12 };
    13 
    14 class CFileList
    15 {
    16 public:
    17 	CFileList(const TCHAR *name);
    18 	~CFileList();
    19 public:
    20 	CFileList *PeekCurrentFolder();
    21 	void PopCurrentFolder();
    22 	const TCHAR *PeekCurrentFile();
    23 	void PopCurrentFile();
    24 	const TCHAR *GetFolderName();
    25 public:
    26 	void AddFolder(CFileList *pFileList);
    27 	void AddFile(const TCHAR *name, unsigned __int64 size);
    28 	unsigned __int64 GetRecursiveSize();
    29 public:
    30 	static CFileList *BuildFileList(const TCHAR *name, const TCHAR *root_folder);
    31 private:
    32 	std::list<CFileList *> m_folder_list;
    33 	std::list<CFileListEntry> m_file_list;
    34 	TCHAR m_FolderName[MAX_PATH];
    35 	unsigned __int64 m_TotalSize;
    36 	unsigned __int64 m_RecursiveSize;
    37 	bool m_bGotRecursiveSize;
    38 };
    39 
    40 #endif //_INCLUDE_FOLDER_LIST_H_