Boost logo

Boost :

From: Daryle Walker (darylew_at_[hidden])
Date: 2000-12-25 19:54:29


on 12/25/00 9:14 AM, etoffi_at_[hidden] at etoffi_at_[hidden] wrote:

> Daryle Walker writes:
>
> ... snipped
>
>> namespace boost
>> {
>> class tcpipbuf
>> : public std::streambuf
>> , noncopyable
>> {
>
> wouldnt this be a little better:
>
>> namespace boost
>> {
> template <typename extra_data>
>> class tcpipbuf
>> : public std::streambuf
>> , noncopyable
>> {
>
> ... snipped
>
>> private:
>> // Put general connection helper methods here.
>>
>> // What it really points to is platform-specific.
>> extra_data tcpip_data_;
>> };
>> }

A major point of my class was to not use templates at all, so the
implementation can be offloaded to a source file. This lets the writer hide
the platform-specific stuff there. This means that the user-visible
interface can't know anything about the actual (platform-dependent) TCP/IP
structures. I represented this by hiding them with a "void*".

-- 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk