|
From: Ermete G. <ex...@li...> - 2003-09-29 20:56:54
|
<html> Hello guys,<br> I'm glad to communicate you that I'm back !! ;-D<br> I survived the last holidays and I began the university. Now I've enough time to begin the PAQ Explorer project.<br> I've prepared some documents about the possible GUI and the internal architecture, but I don't have a scanner here and I cannot post them.<br><br> Anyway the concept is to build a GUI similar to the Windows's explorer one.<br> I began using the BCB6 enterprise environment and I found very easy to create windows and insert the appropriate code there. It's like using visual basic!! I enjoy very much this easyness..<br> I'm a bit in trouble about building an project file cause I never built one. I must see the configuration of the other projects in the devpack and understand them.<br><br> About the internal structure of the PAQ Explorer I was thinking about building an intermetiate object between the GUI and the PAQ Files Library. This object is responsible for providing a general set of methods that support directory structure and file naming. (the PAQ Library was built without *real* directory structure, it threats a "dir\file" entry as a long filename with all characters allowed in the name, included the backslash). This object is needed to handle the treeview of the directories and to display directories with different icon/color.<br> The operations on single files or lists of files are: <ul> <li>add (from disk files) <li>remove <li>move (from one virtual directory to another) <li>rename (only on single files) <li>modify attributes (if we decide how to use them) <li>extract to disk <li>search (file pattern in a directory and subdirectories) <li>update (derived from remove and add) </ul>"rename" and "move" are basically the same operation.I'll continue to work on the concept and I'll try to have a detailed plan before begin coding.<br> For now I must prepare the project file for the PAQ Files Library, make it work, then prepare the PAQ Explorer one.<br> Anyone could give me some tips about creating a project?<br><br> I have an idea about the selective use of functions in classes that must be used by different clients.<br> Example code taken from paqsolidfile.h<br><br> <b>protected:<br><br> ///////////////////////////////////<br> // Here goes the methods that can<br> // only be used by the PAQVirtualFile class<br> friend class PAQVirtualFile;<br><br> //! Returns a PAQSolidFileManipulator to be used by a PAQVirtualFile to interact with the Solid File.<br> //! \remark The PAQVirtualFile file manipulator MUST had been invalidated after the call to this method.<br> <x-tab> </x-tab>//! \note The preemption of the manipulator will follow a Lest Recently Used Algorithm.<br> <x-tab> </x-tab>PAQSolidFileManipulator* acquireFileManipulator (PAQVirtualFile* file);<br> ///////////////////////////////////<br><br> ///////////////////////////////////<br> // Here goes the methods that can<br> // only be used by the PAQ Explorer<br> <x-tab> </x-tab>friend class PAQExplorerManager;<br><br> //! This method will lock the PAQ file for writting.<br> //! \note This is not intended to be a semaphore lock, it is intended to close any opened file descriptor and open the file with exclusive access.<br> <x-tab> </x-tab>//! \remark There MUST NOT be any attempt to open any file when the PAQ is locked. This method is only to be used by the PAQExplorerManager.<br> void lockPAQFile ();<br><br> </b>My idea is to build two derived classes from PAQSolidFile, one used by PAQExplorerManager and one by PAQVirtualFile.<br> The main class contains all the methods but without code (not abstract, just dummy code to notify the application that method cannot be used). The two derived classes contain redefined methods with the real functions.<br> A problem with this implementration is that variables declared as private in the main class must be declared as protected instead.<br> I think it should work... what do you think about that? You surely have more programming experience (or at least different) than me so your opinion is important.<br><br> Regards<br> exio82<br> </html> |