C++
class Foo {
public:
Foo(args);
~Foo();
};
class FooFactory{
public:
static Foo* createFoo(){
return new Foo(args);
}
};
class Foo {
public:
Foo(args);
~Foo();
};
class FooFactory{
public:
static Foo* createFoo(){
return new Foo(args);
}
};