Am Mittwoch, 13. September 2006 17:41 schrieb Abdelrazak Younes:
> Angus Leeming wrote:
> > Note that keeping std::string for the format name will enable you to 
enforce 
> > the distinction at compile time. Even clearer if you follow Georg's 
suggestion 
> > of
> >     typedef std::string lyx::asciistring;

I don't think it was from me, but that is not so important :-)

> Why not... I would even go further:
> 
>       typedef std::string lyx::keystring;

I would even go further:

class Format {
public:
        typedef std::string name_type;
};

The fact that it is a string is not important IMO, so it should not be in 
the typename. Logically I think it belongs to the Format class. All 
functions that only deal with format names then take a Format::name_type 
argument, and because it is std::string we can still use general string 
utility functions with it.


Georg

Reply via email to