On Montag, 5. August 2013 17:09:58 CEST, Jan Kundrát wrote:
You're right that a defensive design would enforce this via
asserts and mention this in the docs. Patches for both are
welcome.
=P
+ enum Type {
+ Request,
+ Store,
+ Delete
+ };
enums are extendable (though i'm absolutely not sure about
compilers here, we'd have to research this)
-> you could likely move this into PasswordJob, have a barrier enum Type
{
Request = 0,
Store,
Delete,
UserType = 256
}; ...
I don't follow here -- do we expect to have something inherit
from this class?
There's class "ClearTextPasswordJob : public PasswordJob" and ClearTextPasswordJob
defines "enum Type { Request, Store, Delete };" what sounded pretty common to all
PasswordJob's to me (and both present implementation implement them)
Therefore i thought moving the Type enum to PasswordJob and let the specific
implementations just extend them on demand - better for generic job handling
processing.
THOUGH BEWARE: I have yet NOT checked on whether this is safe for all (usable,
i bet MSVC6 fails) compilers. It's so far just an idea.
(The other idea was to have "Type" and "CTPWJType" - but that's not very
elegant either)
Cheers,
Thomas