Home / Open source / Terimber 2.0
stream_input_common Class Referenceinterface of stream implementation for reading from file, socket
More...
#include <miscxml.h>
List of all members.
Detailed Description
interface of stream implementation for reading from file, socket
Definition at line 135 of file miscxml.h.
Constructor & Destructor Documentation
stream_input_common::stream_input_common |
( |
mem_pool_t & |
small_pool, |
|
|
mem_pool_t & |
big_pool, |
|
|
size_t |
xml_size, |
|
|
bool |
subset, |
|
|
size_t |
timeout = 10000 | |
|
) |
| | |
constructor
- Parameters:
-
small_pool |
small memory pool |
big_pool |
big memory pool |
xml_size |
xml size - just a tip |
subset |
subset flag |
timeout |
timeout for sockets |
Definition at line 581 of file miscxml.cpp.
stream_input_common::~stream_input_common |
( |
|
) |
[virtual] |
Member Function Documentation
opens stream source
- Parameters:
-
location |
location attribute |
Definition at line 652 of file miscxml.cpp.
References _desc, _file_length, xml_stream_attribute::_host, xml_stream_attribute::_port, xml_stream_attribute::_protocol, _protocol, _timeout, byte_source::_url, ch_cr, ch_lf, close(), terimber_socket::close(), xml_stream_attribute::combine_url(), terimber_socket::connect(), base_string< T >::length(), xml_stream_attribute::prepare_socket_request(), terimber_socket::receive(), terimber_socket::resolve_address(), terimber_socket::send(), terimber_socket::set_address(), STREAM_FILE, STREAM_FTP, STREAM_HTTP, STREAM_LOCAL, STREAM_RELATIVE, STREAM_UNKNOWN, str_template::strlen(), and str_template::strscan().
Referenced by xml_designer_impl::load(), buffer_loader::load(), and xml_processor::parseDTD().
void stream_input_common::close |
( |
|
) |
|
closes stream
Reimplemented from terimber_socket.
Definition at line 749 of file miscxml.cpp.
References _desc, _file_length, _protocol, terimber_socket::close(), STREAM_FILE, STREAM_FTP, STREAM_HTTP, STREAM_LOCAL, STREAM_RELATIVE, and STREAM_UNKNOWN.
Referenced by data_request(), buffer_loader::load(), open(), xml_processor::parseDTD(), and ~stream_input_common().
bool stream_input_common::data_request |
( |
ub1_t * |
buf, |
|
|
size_t & |
len | |
|
) |
| | [protected, virtual] |
gets actual data from stream
- Parameters:
-
buf |
pre-allocated buffer |
len |
[in,out] [in] buffer size, [out] obtained bytes |
Implements byte_source.
Definition at line 598 of file miscxml.cpp.
References _desc, _file_length, _protocol, _timeout, close(), terimber_socket::receive(), STREAM_FILE, STREAM_FTP, STREAM_HTTP, STREAM_LOCAL, STREAM_RELATIVE, and STREAM_UNKNOWN.
Member Data Documentation
The documentation for this class was generated from the following files:
|
|