ucommon
7.0.0
About: GNU uCommon C++ is a portable and optimized class framework for writing C++ applications that need to use threads and support concurrent synchronization, and that use sockets, XML parsing, object serialization, thread-optimized string and data structure classes, etc.. Fossies Dox: ucommon-7.0.0.tar.gz ("inofficial" and yet experimental doxygen-generated source code documentation) 
|
Go to the documentation of this file. 25 #ifndef UCOMMON_SYSRUNTIME 26 #ifndef _UCOMMON_STREAM_H_ 27 #define _UCOMMON_STREAM_H_ 29 #ifndef _UCOMMON_CONFIG_H 33 #ifndef _UCOMMON_PROTOCOLS_H_ 37 #ifndef _UCOMMON_THREAD_H_ 41 #ifndef _UCOMMON_SOCKET_H_ 45 #ifndef _UCOMMON_FSYS_H_ 49 #ifndef _UCOMMON_SHELL_H_ 87 void allocate(
size_t size);
96 inline
bool is_open(
void)
const 99 inline operator bool()
const 100 {
return bufsize > 0;}
103 {
return bufsize == 0;}
117 __LOCAL void allocate(
unsigned size);
124 virtual ssize_t _read(
char *
buffer,
size_t size);
126 virtual ssize_t _write(
const char *
buffer,
size_t size);
128 virtual bool _wait(
void);
196 inline operator bool()
const {
221 void open(
const char *host,
const char *service,
unsigned segment = 536);
247 __LOCAL void allocate(
size_t size, access_t mode);
291 pipestream(
const char *command,
access_t access,
char **args,
char **env = NULL,
size_t size = 512);
302 inline operator bool()
const {
303 return (bufsize > 0);
322 void open(
const char *path, access_t access,
char **args,
char **env = NULL,
size_t buffering = 512);
333 void terminate(
void);
410 inline operator bool()
const {
411 return (bufsize > 0);
425 void open(
const char *filename,
fsys::access_t access,
size_t buffering = 512);
430 void open(
const char *filename,
unsigned mode,
fsys::access_t access,
size_t buffering = 512);
448 inline int err(
void)
const 472 inline
size_t remains()
const {
476 inline const uint8_t *
mem()
const {
480 inline const char *
chr()
const {
481 return (
const char *)bp;
484 inline size_t len()
const {
485 return (
size_t)(pos - bp) + count;
502 explicit omemstream(uint8_t *data,
size_t size);
511 inline uint8_t *
mem()
const {
515 inline char *
chr()
const {
519 inline size_t len()
const {
520 return (
size_t)(pos - bp);
542 static std::ostream& print(std::ostream&
out,
const string_t&
str);
546 static std::ostream& print(std::ostream&
out,
const stringlist_t& list);
550 static std::string& append(std::string& target,
String& source);
587 char buf[INET6_ADDRSTRLEN];
589 char buf[INET_ADDRSTRLEN];
591 addr.print(buf,
sizeof(buf),
false,
true);
std::ostream & operator<<(std::ostream &out, const PrintProtocol &format)
std::string & operator+(std::string &target, String &source)
static shell::stringopt out('o', "--output", _TEXT("output file"), "filename", "-")
std::istream & operator>>(std::istream &inp, InputProtocol &format)
const uint8_t * mem() const
static std::ostream & print(std::ostream &out, const PrintProtocol &format)
bool getline(std::istream &in, char *buffer, size_t size)
static shell::stringopt input('i', "--input", _TEXT("stdin path to use"), "filename")
socket_t getsocket(void) const
String str(Socket &so, size_t size)
static uint8_t buffer[65536]
static std::string & append(std::string &target, String &source)
static shell::numericopt timeout('t', "--timeout", _TEXT("optional keyboard input timeout"), "seconds", 0)
bool putline(std::ostream &out, char *buffer)
std::string & operator+=(std::string &target, String &source)
static std::istream & input(std::istream &inp, InputProtocol &format)
const struct sockaddr * addr(Socket::address &address)