00001 #ifndef FILENAME_LIST_CLASS 00002 #define FILENAME_LIST_CLASS 00003 00004 /*****************************************************************************\ 00005 * * 00006 * Name : filename_list * 00007 * Author : Chris Koeritz * 00008 * * 00009 ******************************************************************************* 00010 * Copyright (c) 2005-$now By Author. This program is free software; you can * 00011 * redistribute it and/or modify it under the terms of the GNU General Public * 00012 * License as published by the Free Software Foundation; either version 2 of * 00013 * the License or (at your option) any later version. This is online at: * 00014 * http://www.fsf.org/copyleft/gpl.html * 00015 * Please send any updates to: fred@gruntose.com * 00016 \*****************************************************************************/ 00017 00019 00027 #include "file_info.h" 00028 00029 #include <basis/packable.h> 00030 #include <data_struct/amorph.h> 00031 00032 class OPSYSTEM_CLASS_STYLE filename_list 00033 : public amorph<file_info>, public packable 00034 { 00035 public: 00036 filename_list(); 00037 00038 filename_list &operator =(const filename_list &to_copy); 00039 00040 int total_files() const; 00041 00042 double total_size() const; 00043 00044 bool calculate_progress(const filename &file, double current_offset, 00045 int ¤t_file, double ¤t_size); 00046 00047 filename_list &operator = (const string_array &to_copy); 00048 00049 void fill(string_array &to_fill); 00050 00051 const file_info *find(const filename &to_check) const; 00052 00054 int locate(const filename &to_find) const; 00055 00056 bool member(const filename &to_check) const; 00057 00058 bool member(const file_info &to_check, bool check_size = true, 00059 bool check_checksum = true) const; 00060 00061 istring text_form() const; 00062 00063 virtual void pack(byte_array &packed_form) const; 00064 00065 virtual bool unpack(byte_array &packed_form); 00066 }; 00067 00068 #endif 00069
1.5.1