[haiku-commits] Re: BRANCH ahenriksson-github.production - src/add-ons/kernel/file_systems/bfs

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 10 Aug 2012 12:48:58 +0200

On 10.07.2012 11:49, ahenriksson-github.production wrote:
+class FileSystemVisitor {
+public:
+                                                               
FileSystemVisitor(Volume* volume);
+       virtual                                         ~FileSystemVisitor();
+
+                       Volume*                         GetVolume() const { 
return fVolume; }
+       
+                       // traversing the file system
+                       status_t                        Next();
+                       void                            Start(uint32 flags);
+                       void                            Stop();
+       
+
+       virtual status_t                        VisitDirectoryEntry(Inode* 
inode,
+                                                                       Inode* 
parent, const char* treeName);
+       virtual status_t                        VisitInode(Inode* inode, const 
char* treeName);
+
+       virtual status_t                        OpenInodeFailed(status_t 
reason, ino_t id,
+                                                                       Inode* 
parent, char* treeName,
+                                                                       
TreeIterator* iterator);
+       virtual status_t                        OpenBPlusTreeFailed(Inode* 
inode);
+       virtual status_t                        TreeIterationFailed(status_t 
reason,
+                                                                       Inode* 
parent);

From a class design point of view, I probably would put the error handling methods into a separate class. The current implementation would either be the fallback (if no error handler is set), or live in a default error handler.
Just as a suggestion.

Bye,
   Axel.


Other related posts: