|
|
От: |
Serrega
|
http://sergeyteplyakov.blogspot.com/ |
| Дата: | 21.12.04 15:59 | ||
| Оценка: | |||
|
|
От: |
Анатолий Широков
|
|
| Дата: | 21.12.04 16:28 | ||
| Оценка: | |||
class BaseCreator
{
public:
...
Base* CreateBase(EClassType type) const;
Base* CreateFromStream(std::istream &stream) const
{
int type = -1;
stream >> type;
std::auto_ptr<Base> guard(CreateBase(type));
if( guard.get() )
guard->Load(stream);
return guard.release();
}
};
|
|
От: |
Bell
|
|
| Дата: | 21.12.04 16:31 | ||
| Оценка: | 1 (1) +1 | ||