On 7 Feb 2022 13:49, Alwyn Teh wrote:
> Hi,
>
> Please see the following post:
>
https://groups.google.com/g/comp.lang.tcl/c/r0-8i4vKd9Q
>
> I want to replace Rogue Wave tools.h++ used in an old C++ Unix program with the latest standard libraries. How do I go about doing this?
>
I'm unfamiliar with that library, but judging from the names:
> The classes and header files used are:
> 63 RWCString
`std::string`
> 35 RWCollectableString
`std::string`
> 8 RWHashDictionaryIterator
std::unordered_map::iterator
> 7 RWHashDictionary
std::unordered_map (or std::unordered_set)
> 4 RWOrdered
Possibly std::map or std::set
> 4 RWCRegexp
Oh, the now deprecated `std::regexp`. Problem that it doesn't handle
UTF-8 very well.
> 3 RWSortedVector
Nothing like it. Possibly `std::multiset`.
> 3 RWCTokenizer
`std::istringstream`, but better make your own because the streams are
inefficient (due to silly design with locale support and inversion of
layers of abstraction) and complex.
> 2 RWOrderedIterator
n/a
> 2 RWHashDictionary
std::unordered_map or std::unordered_set
> 1 RWSortedVectorIterator
-
> 1 RWSet
std::set
> 1 RWRegexp
Unclear what's the difference with RWCRegexp?
> 1 RWCollectable
Nothing like it, sounds like a Jave-esque `Object`.
> 1 RWBitVec
`std::vector<bool>` (dynamic) or `std::bitset` (fixed size)
> > 13 <rw/cstring.h>
> 7 <rw/hashdict.h>
> 5 <rw/regexp.h>
> 5 <rw/ordcltn.h>
> 4 <rw/collect.h>
> 3 <rw/collstr.h>
> 2 <rw/rwset.h>
> 2 <rw/ctoken.h>
> 1 <rw/tooldefs.h>
> 1 <rw/sortvec.h>
> 1 <rw/bitvec.h>
> 1 <rw/bintree.h>
>
> Thanks.
You're welcome.
See <url:
https://en.cppreference.com/w/> for details and general info.
- Alf