I seem to be stuck staring at the trees...
Background: I'm playing around with some library code for loading images and thought I'd ask what interface others would proffer. Here I have a stream 'in', say 'std::istream' for simplicity, and desire a rather direct creation interface, but find everything... lacking. (Basically, which feels right in your opinion?)
1):
2):Code:smart_pointer<some_class> whatever(factory(in));
3):Code:smart_pointer<some_class> whatever(in >> factory());
Even something as simply as '1' would be sufficient and helpful.Code:smart_pointer<some_class> whatever(0); factory(whatever, in));
(Note: If I've missed an option, and I rather hope I have, then I welcome any comments regarding such other options.)
Soma



LinkBack URL
About LinkBacks



CornedBee