#include "Stroika/Foundation/StroikaPreComp.h"
#include <ostream>
#include "Stroika/Foundation/Common/Common.h"
#include "Stroika/Foundation/Streams/OutputStream.h"
#include "OutputStreamFromStdOStream.inl"
Go to the source code of this file.
Namespaces | |
namespace | Stroika::Foundation |
namespace | Stroika::Foundation::Streams::iostream |
Typedefs | |
template<typename ELEMENT_TYPE > | |
using | Stroika::Foundation::Streams::iostream::OutputStreamFromStdOStream::Ptr = typename OutputStream::Ptr< ELEMENT_TYPE > |
Functions | |
template<typename ELEMENT_TYPE , typename BASIC_OSTREAM_ELEMENT_TYPE , typename BASIC_OSTREAM_TRAITS_TYPE > requires ((same_as<ELEMENT_TYPE, byte> and same_as<BASIC_OSTREAM_ELEMENT_TYPE, char>) or (same_as<ELEMENT_TYPE, Characters::Character> and same_as<BASIC_OSTREAM_ELEMENT_TYPE, wchar_t>)) | |
Ptr< ELEMENT_TYPE > | Stroika::Foundation::Streams::iostream::OutputStreamFromStdOStream::New (basic_ostream< BASIC_OSTREAM_ELEMENT_TYPE, BASIC_OSTREAM_TRAITS_TYPE > &originalStream) |
using Stroika::Foundation::Streams::iostream::OutputStreamFromStdOStream::Ptr = typedef typename OutputStream::Ptr<ELEMENT_TYPE> |
very rough - going to need more stuff
A SocketStream wraps a a socket as a InputOutputStream - two separate but related streams.
The only real connection is that they share a common socket, and if it is closed, then the whole SocketStream will stop working.
\note SocketStream adopts its owned ConnectionOrientedStreamSocket, so that a Close () on SocketStream will Close that socket as well. But SocketStream is an InputOutputStream - so you can close the input and output sides separately. If you call close on only one side of the input stream, Shutdown () will be used to shutdown just that end of the stream. Closing both sides of the stream (calling Close on the InputOutputStream) closes both sides and ShutDowns both sides of the socket.
Definition at line 26 of file OutputStreamFromStdOStream.h.
Ptr< ELEMENT_TYPE > Stroika::Foundation::Streams::iostream::OutputStreamFromStdOStream::New | ( | basic_ostream< BASIC_OSTREAM_ELEMENT_TYPE, BASIC_OSTREAM_TRAITS_TYPE > & | originalStream | ) |
OutputStreamFromStdOStream wraps an argument std::ostream or std::wostream or std::basic_ostream<> as a Stroika OutputStream object
\note OutputStreamFromStdOStream ::Close () does not call close on the owned basic_ostream, because there is no such stdC++ method (though filestream has one)
Default seekability should be determined automatically, but for now, I cannot figure out how...
If you pass in eInternallySynchronized, the internal rep is internally synchronized, but you still must assure no other threads access the OStreamType object.
Definition at line 101 of file OutputStreamFromStdOStream.inl.