Deprecated Containers
From AbiWiki
(New page: Since the begining, AbiWord reimplemented its own containers for use across the framework. One of the reason was that STL implementation and template support sucked back in the end of 90's...)
Newer edit →
Revision as of 01:30, 11 June 2009
Since the begining, AbiWord reimplemented its own containers for use across the framework. One of the reason was that STL implementation and template support sucked back in the end of 90's. But this is not longer the case.
In 2004, several of these containers got templated to provide a better compile time type safety.
Contents |
UT_GenericVector
This templated container should be replaced by std::vector<>. UT_Vector should be replaced by the proper type-safe template.
UT_GenericStringMap
This should be replaced either by std::map or by the extension hash_map or tr1::unordered_map. The key type is then a std::string
Strings
The strings are a mess. UT_String MUST go away. Use std::string or const char * in some cases.
UT_UTF8String is to be removed in a lot of case, replaced by std::string. Maybe in all cases.
UT_UCS4String is to be replaced by std::basic_string<UCS4Char>.
We should provide replacement convenience functions for convert between the various unicode encodings only when necessary.
UT_Stack
UT_Stack must be replaced by std::stack. There are very few occurences left. UT_NumberStack should get the same.