Re: [boost] Re: API Review request: XML API for C++, second round

2003-06-27 Thread Hamish Mackenzie
On Fri, 2003-06-27 at 09:09, Anthony Williams wrote: Stefan Seefeld [EMAIL PROTECTED] writes: Hamish Mackenzie wrote: dom::document doc; dom::document_ref doc2( doc.root().document() ); assert( doc2 == doc ); and... assert( doc2 == doc ); Can be implemented but ideally

Re: [boost] Re: API Review request: XML API for C++, second round

2003-06-27 Thread Hamish Mackenzie
and synchronise any changes (or rebuild it every time you want to call a libxml2 function). -- Hamish Mackenzie [EMAIL PROTECTED] ___ Unsubscribe other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [boost] API Review request: XML API for C++, second round

2003-06-26 Thread Hamish Mackenzie
basic_node_pointer by taking basic_element_iterator and stripping the ++ and -- operators). Then some_pointer-x() and some_iterator-x() would call the same x() member of the _reference class. -- Hamish Mackenzie [EMAIL PROTECTED] ___ Unsubscribe other

Re: [boost] API Review request: XML API for C++, second round

2003-06-26 Thread Hamish Mackenzie
node_pointer const_node_ref const_node_ptr; In fact you will probably need const_ versions for all your reference, pointer and iterator types. Though the pointers and iterators should just be additional instances of template classes. -- Hamish Mackenzie [EMAIL PROTECTED

Re: [boost] API Review request: XML API for C++, second round

2003-06-26 Thread Hamish Mackenzie
) define a deep copy value_type that doesn't work as there is no way to copy nodes 'out of the document'. I am not suggesting we need this but it is possible... class node { ... private: document doc_; node_ptr node_; }; 2) typedef void value_type; 3) leave it undefined -- Hamish

Re: [boost] API Review request: XML API for C++, second round

2003-06-26 Thread Hamish Mackenzie
::make_document(1.0); Hm now dom::document doc( 1.0 ); looks even nicer :-) -- Hamish Mackenzie [EMAIL PROTECTED] ___ Unsubscribe other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [boost] API Review request: XML API for C++, second round

2003-06-26 Thread Hamish Mackenzie
On Thu, 2003-06-26 at 18:32, Stefan Seefeld wrote: Hamish Mackenzie wrote: On Thu, 2003-06-26 at 16:04, Stefan Seefeld wrote: I don't really understand why we need three different classes to manage documents. In particular I don't understand why you provide a 'document_ptr

Re: [boost] API Review request: XML API for C++, second round

2003-06-26 Thread Hamish Mackenzie
On Thu, 2003-06-26 at 19:51, Stefan Seefeld wrote: Hamish Mackenzie wrote: And I don't use a 'document' class, as that is managed implicitely by my dom::document_ptr: dom::document_ptr document; // create new document; dom::document_ptr doc(document); // create second reference to it dom

Re: [boost] API Review request: XML API for C++, second round

2003-06-26 Thread Hamish Mackenzie
On Thu, 2003-06-26 at 21:00, Hamish Mackenzie wrote: You might be worried about... dom::document dom; assert( dom.root().document() == dom ); I think this can work be made to work with bool operator ==( document * p1, document_ref * p2 ) { return p1-raw_ == p2-raw_; } bool

Re: [boost] API Review request: XML API for C++, second round

2003-06-26 Thread Hamish Mackenzie
On Thu, 2003-06-26 at 21:39, Stefan Seefeld wrote: Hamish Mackenzie wrote: dom::document doc; dom::document_ref doc2( doc.root().document() ); assert( doc2 == doc ); and... assert( doc2 == doc ); Can be implemented but ideally it would compare all the nodes

Re: [boost] API Review request: XML API for C++, second round

2003-06-25 Thread Hamish Mackenzie
On Wed, 2003-06-25 at 01:12, Stefan Seefeld wrote: hi there, some weeks ago I proposed an API for XML, which triggered an interesting discussion. Hamish Mackenzie proposed a somewhat simpler mechanism to attach the C++ wrapper objects to the C structs from libxml2. I reworked the API

Re: [boost] API Review request: XML APIs for C++

2003-06-13 Thread Hamish Mackenzie
On Fri, 2003-06-13 at 12:14, Peter Dimov wrote: Hamish Mackenzie wrote: 3) Why dom::basic_document::clone? Why not have the copy constructor and assignment operator should do a deep copy of the document? This is consistent with other containers. If you want to stick with clone return

Re: [boost] API Review request: XML APIs for C++

2003-06-13 Thread Hamish Mackenzie
of the parse is not stored on the stack you do not need a separate thread for each parser. -- Hamish Mackenzie ___ Unsubscribe other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [boost] API Review request: XML APIs for C++

2003-06-13 Thread Hamish Mackenzie
that libxml2 supports it. -- Hamish Mackenzie [EMAIL PROTECTED] ___ Unsubscribe other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [boost] API Review request: XML APIs for C++

2003-06-13 Thread Hamish Mackenzie
in the document would only be safe as long as that node existed in the document. -- Hamish Mackenzie [EMAIL PROTECTED] ___ Unsubscribe other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [boost] API Review request: XML APIs for C++

2003-06-12 Thread Hamish Mackenzie
in this library evolving into a boost::xml library ? If so, what needs to change, what needs to be added / removed ? Regards, Stefan ___ Unsubscribe other changes: http://lists.boost.org/mailman/listinfo.cgi/boost -- Hamish

Re: [boost] API Review request: XML APIs for C++

2003-06-12 Thread Hamish Mackenzie
() and node.end() be fore iteration over the child nodes. -- Hamish Mackenzie [EMAIL PROTECTED] xml_stuff.tar.gz Description: application/compressed-tar ___ Unsubscribe other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [boost] shared_ptr question (with respect to thread safety)

2003-02-06 Thread Hamish Mackenzie
-m_ ) private: boost::mutex::scoped_lock l_; } }; // etc. -- Hamish Mackenzie [EMAIL PROTECTED] ___ Unsubscribe other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [boost] shared_ptr question (with respect to thread safety)

2003-02-06 Thread Hamish Mackenzie
On Thu, 2003-02-06 at 18:52, Trey Jackson wrote: Hamish Mackenzie wrote: These scoped locks will go out of scope before you do stuff. Right, thanks for the catch. I started writing it thinking I'd be doing some cool new meta-programming, but it turned into just simple object inheritance

RE: [boost] Re: AW: Re: AW: Sockets

2002-11-28 Thread Hamish Mackenzie
your example could become class my_observer : public buffered_observer { public: void on_connect() { ... out() Hello World std::flush; } }; I will take an ostream over writen any day. -- Hamish Mackenzie [EMAIL PROTECTED

RE: [boost] Re: AW: Re: AW: Sockets

2002-11-28 Thread Hamish Mackenzie
() ) { throw; } } return size; } ... }; -- Hamish Mackenzie [EMAIL PROTECTED] ___ Unsubscribe other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

RE: [boost] Re: AW: Re: AW: Sockets

2002-11-27 Thread Hamish Mackenzie
? This is not the problem I am concerned about. I was trying to illustrate the problem (as discussed above) that arises when your output buffer is larger than the amount of information you have to write. -- Hamish Mackenzie [EMAIL PROTECTED] ___ Unsubscribe

Re: [boost] Re: Sockets

2002-11-25 Thread Hamish Mackenzie
On Mon, 2002-11-25 at 10:30, Markus Schöpflin wrote: And I think it would be really important to provide a clean interaction model between the socket library and the thread library and a clean solution to the problems that keep on coming up again and again when doing socket programming.

Re: [boost] Re: Re: SocketSetConcept (fd_set wrapper)

2002-11-25 Thread Hamish Mackenzie
three socket_sets and select. -- Hamish Mackenzie [EMAIL PROTECTED] ___ Unsubscribe other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

RE: [boost] Re: AW: Re: AW: Sockets

2002-11-25 Thread Hamish Mackenzie
don't mind if there is a lower level that has on_read/on_write events but it needs both, not just on_read. Keep in mind its not the socket I want to wrap in iostreams. -- Hamish Mackenzie [EMAIL PROTECTED] ___ Unsubscribe other changes: http

Re: [boost] Re: Re: Socket errors

2002-11-25 Thread Hamish Mackenzie
On Mon, 2002-11-25 at 23:34, Hugo Duncan wrote: Hamish, On 25 Nov 2002 17:17:41 +, Hamish Mackenzie [EMAIL PROTECTED] wrote: On Mon, 2002-11-25 at 15:43, Hugo Duncan wrote: A write on an ssl stream can block attempting to read from the underlying socket (and vice-versa

[boost] SocketSetConcept (fd_set wrapper)

2002-11-24 Thread Hamish Mackenzie
has updated the fd_set -- Hamish Mackenzie [EMAIL PROTECTED] ___ Unsubscribe other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

[boost] Socket errors

2002-11-24 Thread Hamish Mackenzie
tuple would include the socket itself followed by the args. Implementors of handle_error would have two options 1) return err; 2) throw a type derived from socket_exception; They could log errors or provide more detail in the socket_error derived exception. -- Hamish Mackenzie [EMAIL PROTECTED

Re: [boost] Re: SocketSetConcept (fd_set wrapper)

2002-11-24 Thread Hamish Mackenzie
On Sun, 2002-11-24 at 21:22, Hugo Duncan wrote: is_set - count (I'm not fussed about this one) Not sure about count, how about something like active Yes, or contains? Also for library implementors I think we need update_width() To be called after the OS has updated the fd_set I saw