It would be really good if the message object inherited from istringstream so that you could do something like the following,
Message* msg = new Message();
message << "The construction of your new fleet is" << fleetname << "is complete and in orbit around" << planet->getName() << endl;
message << "The fleet consists of: " << endl;
message << "<ul>" << endl;
for(std::map<uint32_t,uint32_t>::iterator itcurr = fleettype.begin(); itcurr != fleettype.end(); ++itcurr){
Design* design = Game::getGame()->getDesignStore()->getDesign(itcurr->first);
message << "<li>" << itcurr->second << " * " << design->getName() << "</li>" << endl;
}
message << "</ul>" << endl;
Logged In: YES
user_id=82757
Originator: NO
Two things:
- That method of string construction is very hard to internationalise. I know that is how it's currently done, but it could be better.
- It shouldn't inherit for implementation. More likely provide a istringstream& Message::getBodyWriter() or some such.
So basically, I'll think about it, but don't expect it to happen soon.