I am looking at the code and I see a lot of this:
class Foo { public: Foo() { // 'nuffin } void init() { // actual construction code } } ;
The only advantage I see is to create Foo without using a pointer, and you want to keep its build code until you can.
Is this a good idea or a bad idea?
, , . - , . , , - , , , . , , , , , .
init(), , - , , didInitializationSucceed() .
didInitializationSucceed()
. , ... ... . , 1 .
1 , .
, , , . , , , , (, - , ), , , .
, init(), - , .
init()
, init(). , .
, RAII. RAII , , . , .
, , "Foo" . "Foo" "".
(: ++) , , , , init(). , ?
contructor init, , . , , , , init(). db, contruct($param) $param init($param).
contruct($param)
init($param)
, , , , , - .
, - , , , , /, , . - .
, , , - . .
, . , , ( - , ..), , , .
, isInitialized(). , .
isInitialized()