[haiku-development] Re: ext3 Journal Design Considerations

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 14 Apr 2010 10:32:23 +0200

On 04/14/2010 09:33 AM, Ingo Weinhold wrote:
> On 2010-04-14 at 04:36:51 [+0200], Janito Ferreira Filho 
> <jvffprog@xxxxxxxxxxx> wrote:
>> One last thing, what's the usual semantics for an InitCheck function?
> In Be API classes it returns the initialization error code as a status_t, 
> i.e. B_OK, if the class is correctly initialized. Personally I prefer 
> explicit initialization methods (SetTo() or Init()) over constructor 
> initialization + InitCheck(), since oftentimes in the latter case one 
> either can't provide the actual error code (i.e. has to return B_ERROR or 
> B_NO_INIT) or has to add an extra attribute to store the error code (many 
> Be API classes do).

Plus you cannot use any virtual methods in the constructor (ie. they
will just always call your implementation, no matter if some subclass
overloaded it).

Bye,
   Axel.

Other related posts: