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..
![]() ![]() |
Namespaces | |
Type | |
Functions | |
static int | ncompare (const void *o1, const void *o2) |
static int | ncompare (const void *o1, const void *o2) |
static void | noecho (int fd) |
static void | echo (int fd) |
static void | exit_handler (void) |
static void | abort_handler (int signo) |
static void | socket_mapping (int family, socket_t so) |
static void | freeaddrinfo (struct addrinfo *aip) |
static int | getnameinfo (const struct sockaddr *addr, socklen_t len, char *host, size_t hostlen, char *service, size_t servlen, int flags) |
static int | getaddrinfo (const char *hostname, const char *servname, const struct addrinfo *hintsp, struct addrinfo **res) |
static int | setfamily (int family, const char *host) |
static void | bitmask (bit_t *bits, bit_t *mask, unsigned len) |
static void | bitimask (bit_t *bits, bit_t *mask, unsigned len) |
static void | bitset (bit_t *bits, unsigned blen) |
static unsigned | bitcount (bit_t *bits, unsigned len) |
String | str (Socket &so, size_t size) |
bool | getline (std::istream &in, char *buffer, size_t size) |
bool | putline (std::ostream &out, char *buffer) |
static int | hexcode (char ch) |
static unsigned | hash_address (const void *ptr, unsigned indexing) |
static void * | exec_thread (void *obj) |
static long | _difftime (time_t ref) |
static void | adj (struct timeval *ts) |
unicode_t | unidup (const char *string) |
bool | is_exists (const char *path) |
bool | is_readable (const char *path) |
bool | is_writable (const char *path) |
bool | is_executable (const char *path) |
bool | is_file (const char *path) |
bool | is_dir (const char *path) |
bool | is_link (const char *path) |
bool | is_device (const char *path) |
template<typename T > | |
bool | is (T &object) |
template<typename T > | |
bool | isnull (T &object) |
template<typename T > | |
bool | isnullp (T *object) |
template<typename T > | |
T * | dup (const T &object) |
template<typename T > | |
void | dupfree (T object) |
template<> | |
char * | dup< char > (const char &object) |
template<> | |
void | dupfree< char * > (char *object) |
template<typename T > | |
void | reset_unsafe (T &object) |
template<typename T > | |
void | zero_unsafe (T &object) |
template<typename T > | |
void | copy_unsafe (T *target, const T *source) |
template<typename T > | |
void | store_unsafe (T &target, const T *source) |
template<typename T > | |
void | swap (T &o1, T &o2) |
template<typename T > | |
T | copy (const T &src) |
template<typename T > | |
T & | copy (const T &src, T &to) |
template<typename T > | |
T & | move (T &src, T &to) |
template<typename T > | |
T & | clear (T &o) |
template<typename T > | |
bool | bound (const T *pointer, const T *base, size_t count) |
template<typename T > | |
T &() | max (T &o1, T &o2) |
template<typename T > | |
T &() | min (T &o1, T &o2) |
template<typename T > | |
T &() | limit (T &value, T &low, T &high) |
template<typename T > | |
T & | deref_pointer (T *pointer) |
template<typename T > | |
size_t | mapkeypath (typeref< T > &object) |
template<> | |
size_t | mapkeypath< const char * > (typeref< const char * > &object) |
template<> | |
size_t | mapkeypath< const uint8_t * > (typeref< const uint8_t * > &object) |
String | str (StringPager &list, const char *prefix=NULL, const char *middle=NULL, const char *suffix=NULL) |
template<typename T > | |
const T | abs (const T &value) |
template<typename T > | |
const T() | min (const T &v1, const T &v2) |
template<typename T > | |
const T() | max (const T &v1, const T &v2) |
void | zerofill (void *addr, size_t size) |
template<typename T > | |
void | clearmem (T &var) |
template<typename T > | |
size_t | mapped_keypath (const T *addr) |
template<typename T > | |
bool | mapped_keyequal (const T *key1, const T *key2) |
template<> | |
size_t | mapped_keypath< char > (const char *addr) |
template<> | |
bool | mapped_keyequal< char > (const char *k1, const char *k2) |
template<> | |
size_t | mapped_keypath< struct sockaddr > (const struct sockaddr *addr) |
template<> | |
bool | mapped_keyequal< struct sockaddr > (const struct sockaddr *s1, const struct sockaddr *s2) |
const char * | __TEXT (const char *s) |
const char * | _TEXT (const char *s) |
struct addrinfo * | addrinfo (Socket::address &address) |
const struct sockaddr * | addr (Socket::address &address) |
bool | eq (const struct sockaddr *s1, const struct sockaddr *s2) |
bool | eq (const struct sockaddr_storage *s1, const struct sockaddr_storage *s2) |
bool | eq_host (const struct sockaddr *s1, const struct sockaddr *s2) |
bool | eq_subnet (const struct sockaddr *s1, const struct sockaddr *s2) |
bool __EXPORT | putline (std::ostream &out, const char *buffer) |
std::ostream & | operator<< (std::ostream &out, const PrintProtocol &format) |
std::istream & | operator>> (std::istream &inp, InputProtocol &format) |
std::ostream & | operator<< (std::ostream &out, const string_t &str) |
std::istream & | operator>> (std::istream &inp, string_t &str) |
std::ostream & | operator<< (std::ostream &out, const stringlist_t &list) |
std::istream & | operator>> (std::istream &in, stringlist_t &list) |
std::string & | operator+ (std::string &target, String &source) |
std::string & | operator+= (std::string &target, String &source) |
std::ostream & | operator<< (std::ostream &os, Socket::address &addr) |
bool | eq (char const *s1, char const *s2) |
bool | ne (char const *s1, char const *s2) |
bool | eq (char const *s1, char const *s2, size_t size) |
bool | ne (char const *s1, char const *s2, size_t size) |
bool | eq (String &s1, const char *s2) |
bool | ne (String &s1, String &s2) |
bool | lt (String &s1, const char *s2) |
bool | gt (String &s1, const char *s2) |
bool | le (String &s1, const char *s2) |
bool | ge (String &s1, const char *s2) |
bool | eq_case (char const *s1, char const *s2) |
bool | ne_case (char const *s1, char const *s2) |
bool | eq_case (char const *s1, char const *s2, size_t size) |
String | str (const char *string) |
String | str (String &string) |
String | str (short value) |
String | str (unsigned short value) |
String | str (long value) |
String | str (unsigned long value) |
String | str (double value) |
template<> | |
void | swap< string_t > (string_t &s1, string_t &s2) |
template<typename T > | |
typeref< T > | typeref_cast (T x) |
ucs4_t * | strudup (const char *string) |
ucs2_t * | strwdup (const char *string) |
template<> | |
void | dupfree< ucs2_t * > (ucs2_t *string) |
template<> | |
void | dupfree< ucs4_t * > (ucs4_t *string) |
template<> | |
void | dupfree< unicode_t > (unicode_t string) |
static void | ssl_lock (int mode, int n, const char *file, int line) |
static unsigned long | ssl_self (void) |
Common namespace for all ucommon objects. We are using a common namespace to easily separate ucommon from other libraries. This namespace usage is set to the package name and controlled by macros so future changes will be hidden from user applications so long as the namespace macros (UCOMMON_NAMESPACE, NAMESPACE_UCOMMON, END_NAMESPACE) are used in place of direct namespace declarations.
Convenience type for scheduling access.
Definition at line 730 of file condition.h.
typedef Barrier ucommon::barrier_t |
Convenience type for using thread barriers.
Definition at line 740 of file condition.h.
typedef uint8_t ucommon::bit_t |
Definition at line 109 of file socket.cpp.
typedef typeref<Type::Bools> ucommon::boolref_t |
typedef arrayref<Type::Bytes> ucommon::bytearray_t |
Definition at line 332 of file arrayref.h.
typedef typeref<Type::Bytes> ucommon::byteref_t |
typedef typeref<Type::Bytes>::value* ucommon::bytevalues_t |
typedef typeref<Type::Chars>::value* ucommon::charvalues_t |
typedef gnutls_cipher_hd_t ucommon::CIPHER_CTX |
typedef gnutls_cipher_algorithm_t ucommon::CIPHER_ID |
typedef gnutls_datum_t ucommon::CIPHER_KEYDATA |
typedef Cipher ucommon::cipher_t |
typedef ConditionalLock ucommon::condlock_t |
Convenience type for using conditional locks.
Definition at line 725 of file condition.h.
typedef counter ucommon::counter_t |
typedef Date ucommon::date_t |
Convenience type for using Date object.
Definition at line 1031 of file datetime.h.
typedef DateTime ucommon::datetime_t |
Convenience type for using DateTime object.
Definition at line 1021 of file datetime.h.
Convenience type for using DateTimeString object.
Definition at line 1026 of file datetime.h.
typedef Digest ucommon::digest_t |
typedef dir ucommon::dir_t |
typedef DirPager ucommon::dirlist_t |
typedef dso ucommon::dso_t |
typedef fsys ucommon::fsys_t |
typedef gnutls_hmac_hd_t ucommon::HMAC_CTX |
typedef gnutls_mac_algorithm_t ucommon::HMAC_ID |
typedef HMAC ucommon::hmac_t |
typedef secure::string ucommon::keystring_t |
typedef LinkedObject* ucommon::LinkedIndex |
typedef DLinkedObject ucommon::LinkedList |
typedef gnutls_hash_hd_t ucommon::MD_CTX |
typedef gnutls_digest_algorithm_t ucommon::MD_ID |
typedef void* ucommon::mem_t |
typedef Mutex ucommon::mutex_t |
typedef Number ucommon::number_t |
typedef RecursiveMutex ucommon::rexlock_t |
typedef RWLock ucommon::rwlock_t |
typedef Semaphore ucommon::semaphore_t |
Convenience type for using counting semaphores.
Definition at line 735 of file condition.h.
typedef shell ucommon::shell_t |
typedef Cipher::Key ucommon::skey_t |
typedef gnutls_session_t ucommon::SSL |
typedef __context* ucommon::SSL_CTX |
typedef String ucommon::string_t |
typedef arrayref<Type::Chars> ucommon::stringarray_t |
Definition at line 333 of file arrayref.h.
typedef String::regex ucommon::stringex_t |
typedef StringPager ucommon::stringlist_t |
typedef typeref<Type::Chars> ucommon::stringref_t |
typedef TCPServer ucommon::tcpserv_t |
typedef TimedEvent ucommon::timedevent_t |
typedef Timer ucommon::timer_t |
typedef Time ucommon::tod_t |
Convenience type for using Time object.
Definition at line 1036 of file datetime.h.
typedef toggle ucommon::toggle_t |
typedef TimerQueue::event ucommon::TQEvent |
typedef int16_t ucommon::ucs2_t |
typedef int32_t ucommon::ucs4_t |
typedef void* ucommon::unicode_t |
typedef UString ucommon::ustring_t |
typedef utf8_pointer ucommon::utf8_t |
Convenience type for utf8_pointer strings.
typedef unsigned short ucommon::vectorsize_t |
typedef ZNumber ucommon::znumber_t |
|
inline |
Invoke translation lookup if available. This can also be used to mark text constants that need to be translated. It should not be used with pointer variables, which should instead call shell::text directly. The primary purpose is to allow extraction of text to be internationalized with xgettext "--keyword=_TEXT:1".
Definition at line 908 of file shell.h.
References ucommon::shell::text().
|
static |
Definition at line 31 of file timer.cpp.
Referenced by ucommon::Timer::operator+=(), ucommon::Timer::operator-=(), ucommon::Timer::operator=(), ucommon::Timer::set(), and ucommon::Timer::Timer().
|
inline |
Definition at line 911 of file shell.h.
References ucommon::shell::text().
Referenced by binarydecode(), main(), process(), report(), result(), streamdecode(), and zerofill().
|
static |
Definition at line 1765 of file shell.cpp.
References exit_handler().
Referenced by ucommon::shell::exiting().
|
inline |
Template for absolute value of a type.
value | to check |
Definition at line 217 of file numbers.h.
Referenced by ucommon::Timer::operator+=(), ucommon::Timer::operator-=(), ucommon::Timer::operator=(), and ucommon::Time::update().
|
inline |
A convenience function to convert a socket address list into a socket address.
address | list object. |
Definition at line 2089 of file socket.h.
References ucommon::Socket::address::get().
Referenced by ucommon::ListenSocket::accept(), ucommon::Socket::acceptfrom(), ucommon::Socket::address::add(), ucommon::Socket::address::address(), ost::DCCPSocket::connect(), ost::TCPStream::connect(), ucommon::Socket::address::copy(), ucommon::TypeRef::Counted::Counted(), cpr_memassign(), ost::DCCPSocket::DCCPSocket(), ucommon::Socket::disconnect(), ucommon::Socket::drop(), ucommon::Socket::address::dup(), ucommon::Socket::family(), ucommon::Socket::address::find(), ost::UDPSocket::getIPV4Peer(), ost::Socket::getIPV4Sender(), ost::Socket::getLocal(), getnameinfo(), ost::UDPSocket::getPeer(), ost::Socket::getPeer(), ost::Socket::getSender(), hash_address(), ucommon::Type::HostAddress::HostAddress(), ucommon::MapRef::index(), ucommon::Type::InetAddress::InetAddress(), ucommon::Socket::address::insert(), ucommon::Socket::address::ipv4(), ost::IPV4Address::IPV4Address(), ucommon::cidr::is_member(), ost::IPV4Address::isInetAddress(), ost::IPV4Cidr::isMember(), ucommon::Socket::join(), ucommon::Socket::keyhost(), ucommon::Socket::keyindex(), ucommon::MappedPointer::keypath(), ucommon::Socket::local(), ucommon::Socket::loopback(), main(), mapped_keypath(), mapped_keypath< char >(), mapped_keypath< struct sockaddr >(), ucommon::TypeRef::mem(), ucommon::Socket::multicast(), ost::operator&(), operator<<(), ost::IPV4Address::operator=(), ost::IPV4Mask::operator=(), ost::IPV4Host::operator=(), ucommon::Type::SockAddress::operator=(), ucommon::Type::InetAddress::operator=(), ost::DSO::operator[](), ucommon::memalloc::pager(), ucommon::Socket::port(), ucommon::Socket::query(), ost::UDPSocket::receive(), ucommon::Socket::recvfrom(), ucommon::Socket::remote(), ucommon::Socket::address::remove(), ost::UDPSocket::send(), ost::IPV4Cidr::set(), ucommon::Socket::address::set(), ost::IPV4Address::setIPAddress(), ost::Socket::setMulticastByFamily(), ucommon::Type::SockAddress::SockAddress(), ucommon::Socket::Socket(), ost::TCPSession::TCPSession(), ost::TCPSocket::TCPSocket(), ucommon::Socket::ttl(), ost::UDPSocket::UDPSocket(), and zerofill().
|
inline |
A convenience function to convert a socket address list into an addrinfo.
address | list object. |
Definition at line 2079 of file socket.h.
References ucommon::Socket::address::getList().
|
static |
Definition at line 51 of file timer.cpp.
Referenced by ucommon::Timer::get(), ucommon::Timer::operator+=(), ucommon::Timer::operator-=(), ucommon::JoinableThread::start(), and ucommon::DetachedThread::start().
|
static |
Definition at line 483 of file socket.cpp.
Referenced by ucommon::cidr::mask().
Definition at line 457 of file socket.cpp.
Referenced by ucommon::cidr::broadcast().
Definition at line 448 of file socket.cpp.
Referenced by ucommon::typeref< const uint8_t * >::count(), ucommon::cidr::is_member(), ucommon::cidr::set(), and ucommon::typeref< const uint8_t * >::set().
|
static |
Definition at line 466 of file socket.cpp.
Referenced by ucommon::cidr::set().
|
inline |
Convenience function to check memory arrays.
pointer | to validate. |
base | address of array. |
count | of objects. |
Definition at line 430 of file generics.h.
|
inline |
Definition at line 416 of file generics.h.
References caddr_t.
Referenced by ucommon::StreamBuffer::allocate(), ucommon::pipestream::allocate(), ucommon::filestream::allocate(), ost::TCPStream::allocate(), ost::TTYStream::allocate(), ucommon::Cipher::Key::b64(), ucommon::tcpstream::close(), ost::TCPStream::connect(), ucommon::Socket::address::copy(), ucommon::TimerQueue::event::detach(), ucommon::TimerQueue::event::disarm(), ost::TCPStream::endStream(), ost::TTYStream::endStream(), ucommon::Cipher::Key::Key(), ost::TCPStream::overflow(), ost::TTYStream::overflow(), ucommon::StreamBuffer::release(), ucommon::tcpstream::reset(), ucommon::Cipher::Key::set(), ucommon::Socket::address::set(), ucommon::Socket::address::setAny(), ucommon::Socket::address::setLoopback(), ost::AppLog::sync(), ucommon::tcpstream::tcpstream(), ost::TCPStream::TCPStream(), ucommon::Timer::Timer(), ost::TTYStream::uflow(), ucommon::tcpstream::underflow(), ucommon::pipestream::underflow(), ucommon::filestream::underflow(), ost::TCPStream::underflow(), ost::TTYStream::underflow(), ucommon::Socket::address::~address(), and ucommon::Cipher::Key::~Key().
|
inline |
Convenience function to copy objects.
Definition at line 395 of file generics.h.
Referenced by ucommon::MapRef::Instance::assign(), ucommon::charbuf< S >::charbuf(), ucommon::cidr::cidr(), ucommon::Date::Date(), ucommon::DateTime::DateTime(), ucommon::DateTimeString::DateTimeString(), ucommon::filestream::filestream(), ucommon::Type::HostAddress::HostAddress(), ucommon::Type::InetAddress::InetAddress(), ucommon::MapRef::Instance::Instance(), ucommon::keyfile::keyfile(), ucommon::linked_pointer< sockaddr_struct >::linked_pointer(), ucommon::keyfile::load(), ucommon::SharedProtocol::Locking::Locking(), ucommon::memalloc::memalloc(), ucommon::stackref< T >::operator=(), ucommon::SharedProtocol::Locking::operator=(), ucommon::queueref< T >::operator=(), ucommon::mapref< K, V >::instance::operator=(), ucommon::mapref< K, V >::operator=(), ucommon::arrayref< T >::operator=(), ucommon::OrderedIndex::operator=(), ucommon::listref< T >::instance::operator=(), ucommon::listref< T >::operator=(), ucommon::Type::HostAddress::operator=(), ucommon::Type::SockAddress::operator=(), ucommon::Type::InetAddress::operator=(), ucommon::OrderedIndex::OrderedIndex(), ucommon::Type::SockAddress::SockAddress(), ucommon::tcpstream::tcpstream(), ucommon::Time::Time(), ucommon::TypeRef::TypeRef(), and ucommon::utf8_pointer::utf8_pointer().
|
inline |
Definition at line 400 of file generics.h.
References caddr_t.
|
inline |
Convenience function to copy class.
target | to copy into. |
source | to copy from. |
Definition at line 367 of file generics.h.
|
inline |
Convert a pointer to a reference with type checking. This is mostly convenience for documenting behavior.
pointer | to convert. |
Definition at line 479 of file generics.h.
References __THROW_DEREF.
|
inline |
Convenience function to duplicate object pointer to heap.
object | we are duping. |
Definition at line 324 of file generics.h.
Referenced by ost::Socket::dupSocket(), ucommon::fsys::fsys(), ucommon::shell::getargv(), ucommon::shell::getenv(), ucommon::DirPager::load(), ucommon::fsys::operator=(), ost::Serial::operator=(), ucommon::shell::parse(), ost::RandomFile::RandomFile(), ucommon::String::right(), ucommon::shell::set0(), ucommon::shell::setsym(), and ucommon::Socket::Socket().
|
inline |
Definition at line 334 of file generics.h.
|
inline |
Definition at line 329 of file generics.h.
|
inline |
Definition at line 339 of file generics.h.
|
inline |
|
inline |
|
inline |
|
static |
Definition at line 1442 of file shell.cpp.
Referenced by ucommon::shell::getline(), ucommon::shell::getpass(), and ucommon::shell::inkey().
|
inline |
Compare two null terminated strings if equal.
s1 | string to compare. |
s2 | string to compare. |
Definition at line 1636 of file string.h.
References ucommon::String::equal().
|
inline |
Compare two null terminated strings if equal up to specified size.
s1 | string to compare. |
s2 | string to compare. |
size | of string to compare. |
Definition at line 1651 of file string.h.
References ucommon::String::equal().
|
inline |
Compare two socket addresses to see if equal. If the port is zero then this is the same as comparing host address alone.
s1 | socket address to compare. |
s2 | socket address to compare. |
Definition at line 2100 of file socket.h.
References ucommon::Socket::equal().
Referenced by binarydecode(), ucommon::shell::errexit(), ucommon::shell::errlog(), ucommon::NamedTree::find(), ucommon::shell::getargv(), ucommon::NamedTree::getChild(), ucommon::NamedTree::getLeaf(), ucommon::shell::getsym(), ucommon::shell::is_sym(), ucommon::NamedTree::leaf(), ucommon::keyfile::load(), main(), mapped_keyequal< char >(), ucommon::String::operator%(), ucommon::typeref< const char * >::operator==(), ost::XMLParser::parse(), ost::XMLParser::partial(), ucommon::shell::relocate(), ucommon::keyfile::save(), ucommon::shell::set0(), ucommon::shell::setsym(), and streamdecode().
|
inline |
Compare two stored socket addresses to see if equal. If the port is zero then this is the same as comparing host address alone.
s1 | stored socket address to compare. |
s2 | stored socket address to compare. |
Definition at line 2111 of file socket.h.
References ucommon::Socket::equal().
|
inline |
Compare two string objects if equal. The left string is an object, the right may be an object or converted to a const string. The compare virtual method of the left object is used, so we can do things like collation order or derived class specific sorting.
s1 | string to compare. |
s2 | string to compare. |
Definition at line 1668 of file string.h.
References ucommon::String::compare().
|
inline |
Compare two null terminated strings if equal ignoring case. This is related to stricmp or gcc strcasecmp.
s1 | string to compare. |
s2 | string to compare. |
Definition at line 1699 of file string.h.
References ucommon::String::eq_case().
Referenced by ucommon::keydata::clear(), ucommon::keydata::get(), ucommon::keyfile::get(), main(), ucommon::__context::map_cipher(), ucommon::__context::map_digest(), ucommon::__context::map_hmac(), ucommon::keydata::set(), ucommon::shell::set0(), and ost::Process::setScheduler().
|
inline |
Compare two null terminated strings if equal for a specified size ignoring case. This is related to stricmp or gcc strcasecmp.
s1 | string to compare. |
s2 | string to compare. |
size | of string to compare. |
Definition at line 1713 of file string.h.
References ucommon::String::eq_case().
|
inline |
Compare two host addresses to see if equal. The port numbers are ignored.
s1 | socket address to compare. |
s2 | socket address to compare. |
Definition at line 2122 of file socket.h.
References ucommon::Socket::eq_host().
|
inline |
Definition at line 2126 of file socket.h.
References ucommon::Socket::eq_subnet().
|
static |
Definition at line 1101 of file thread.cpp.
References ucommon::Thread::exit(), ucommon::Thread::run(), and ucommon::Thread::setPriority().
Referenced by ucommon::JoinableThread::start(), and ucommon::DetachedThread::start().
|
static |
Definition at line 1756 of file shell.cpp.
References _exitproc.
Referenced by abort_handler(), and ucommon::shell::exiting().
|
static |
Definition at line 129 of file socket.cpp.
References addrinfo::ai_addr, addrinfo::ai_canonname, and addrinfo::ai_next.
Referenced by ucommon::Socket::bindto(), ucommon::Socket::address::clear(), ucommon::Socket::create(), ucommon::Socket::address::insert(), ucommon::Socket::query(), ucommon::Socket::release(), ucommon::Socket::address::remove(), and ost::UDPSocket::setPeer().
|
inline |
Definition at line 1688 of file string.h.
References ucommon::String::compare().
|
static |
Definition at line 215 of file socket.cpp.
References AF_UNSPEC, addrinfo::ai_addr, addrinfo::ai_addrlen, addrinfo::ai_canonname, AI_CANONNAME, addrinfo::ai_family, addrinfo::ai_flags, addrinfo::ai_next, AI_PASSIVE, addrinfo::ai_protocol, addrinfo::ai_socktype, hostmutex, port, servmutex, and ucommon::String::set().
Referenced by ucommon::Socket::address::address(), ucommon::Socket::bindto(), ucommon::Socket::create(), ucommon::Socket::address::insert(), ucommon::Socket::query(), and ucommon::Socket::address::set().
bool __EXPORT ucommon::getline | ( | std::istream & | in, |
char * | buffer, | ||
size_t | size | ||
) |
Definition at line 882 of file stream.cpp.
References buffer.
|
static |
Definition at line 142 of file socket.cpp.
References addr(), caddr_t, hostmutex, NI_DGRAM, NI_NAMEREQD, NI_NOFQDN, NI_NUMERICHOST, NI_NUMERICSERV, port, and servmutex.
Referenced by ucommon::Socket::hostname().
|
inline |
Definition at line 1680 of file string.h.
References ucommon::String::compare().
|
static |
Definition at line 100 of file thread.cpp.
References addr().
Referenced by ucommon::RWLock::reader::lock(), ucommon::RWLock::writer::lock(), ucommon::Mutex::protect(), ucommon::RWLock::release(), and ucommon::Mutex::release().
|
static |
Definition at line 1865 of file string.cpp.
References ch.
Referenced by ucommon::String::hex2bin(), ucommon::String::hexcount(), and ucommon::String::hexpack().
|
inline |
Convenience function to validate object assuming it is castable to bool.
object | we are testing. |
Definition at line 292 of file generics.h.
Referenced by ucommon::mapref< K, V >::at(), ucommon::keydata::clear(), ucommon::shell::collapse(), ucommon::fsys::copy(), digest(), dirpath(), encodestream(), ucommon::mapref< K, V >::erase(), ucommon::listref< T >::erase(), ucommon::filestream::filestream(), ucommon::keydata::get(), ucommon::keyfile::get(), ucommon::mapped_pointer< K, V >::get(), ucommon::shell::getargv(), ucommon::shell::getsym(), ucommon::shell::help(), ucommon::shell::is_sym(), ucommon::StringPager::join(), ucommon::ObjectPager::list(), ucommon::StringPager::list(), ucommon::keyfile::load(), main(), ucommon::filestream::open(), output(), ucommon::ObjectPager::pop(), ucommon::StringPager::pop(), ucommon::_stream_operators::print(), process(), ucommon::Thread::release(), ucommon::mapped_pointer< K, V >::remove(), report(), ucommon::keyfile::save(), scan(), scrub(), ucommon::keydata::set(), ucommon::mapped_pointer< K, V >::set(), ucommon::shell::setsym(), ucommon::StringPager::sort(), ucommon::mapref< K, V >::take(), ucommon::listref< T >::take(), ucommon::mapref< K, V >::value(), and zerofill().
|
inline |
Definition at line 873 of file fsys.h.
References ucommon::fsys::is_device().
|
inline |
Definition at line 863 of file fsys.h.
References ucommon::fsys::is_dir().
Referenced by ucommon::fsys::is_device().
|
inline |
Definition at line 853 of file fsys.h.
References ucommon::fsys::is_executable().
|
inline |
Definition at line 838 of file fsys.h.
References ucommon::fsys::is_exists().
|
inline |
Definition at line 858 of file fsys.h.
References ucommon::fsys::is_file().
Referenced by ucommon::secure::oscerts().
|
inline |
Definition at line 868 of file fsys.h.
References ucommon::fsys::is_link().
|
inline |
Definition at line 843 of file fsys.h.
References ucommon::fsys::is_readable().
|
inline |
Definition at line 848 of file fsys.h.
References ucommon::fsys::is_writable().
|
inline |
Convenience function to test pointer object. This solves issues where some compilers get confused between bool and pointer operators.
object | we are testing. |
Definition at line 303 of file generics.h.
|
inline |
Convenience function to test pointer-pointer object. This solves issues where some compilers get confused between bool and pointer operators.
object | we are testing. |
Definition at line 314 of file generics.h.
|
inline |
Definition at line 1684 of file string.h.
References ucommon::String::compare().
|
inline |
Convenience macro to range restrict values.
value | to check. |
low | value. |
high | value. |
Definition at line 468 of file generics.h.
Referenced by ucommon::Barrier::Barrier(), ucommon::memalloc::max(), ost::Socket::receiveLimit(), ucommon::Semaphore::Semaphore(), ost::Socket::sendLimit(), ucommon::SeqCounter::SeqCounter(), and ucommon::Barrier::set().
|
inline |
Definition at line 1676 of file string.h.
References ucommon::String::compare().
|
inline |
Definition at line 194 of file mapref.h.
References ucommon::MapRef::index().
|
inline |
Definition at line 201 of file mapref.h.
References ucommon::MapRef::index().
|
inline |
Definition at line 208 of file mapref.h.
References ucommon::MapRef::index().
|
inline |
|
inline |
|
inline |
Definition at line 200 of file shared.h.
References ucommon::Socket::equal().
|
inline |
Definition at line 156 of file shared.h.
References addr(), and ucommon::MappedPointer::keypath().
|
inline |
Definition at line 173 of file shared.h.
References addr(), and ucommon::MappedPointer::keypath().
|
inline |
Definition at line 191 of file shared.h.
References addr(), ucommon::MappedPointer::keypath(), and ucommon::Socket::len().
|
inline |
|
inline |
Convenience function to return max of two objects.
o1 | to check. |
o2 | to check. |
Definition at line 445 of file generics.h.
Referenced by ucommon::String::cstring::add(), ucommon::NamedObject::add(), ucommon::tcpstream::allocate(), ucommon::AutoClear::AutoClear(), ucommon::String::check(), ucommon::NamedObject::count(), ucommon::counter::counter(), cpr_memassign(), ucommon::Random::get(), ucommon::String::hex2bin(), ucommon::Socket::hostname(), ucommon::NamedObject::index(), ucommon::NamedObject::keyindex(), ucommon::ConditionalAccess::limit_sharing(), ucommon::NamedObject::map(), ucommon::NamedObject::NamedObject(), ucommon::typeref< const uint8_t * >::operator+(), ucommon::String::paste(), ucommon::NamedObject::purge(), ucommon::Socket::readline(), ucommon::Random::real(), ucommon::NamedObject::remove(), ucommon::ArrayRef::reset(), ost::TCPStream::segmentBuffering(), ucommon::Number::set(), ucommon::String::cstring::set(), ucommon::ZNumber::set(), ost::Serial::setPacketInput(), ost::Process::setPriority(), ost::Process::setScheduler(), ucommon::NamedObject::skip(), and ucommon::Random::value().
|
inline |
|
inline |
Convenience function to return min of two objects.
o1 | to check. |
o2 | to check. |
Definition at line 456 of file generics.h.
Referenced by ucommon::String::check(), ucommon::Random::get(), ucommon::shell::priority(), ucommon::Random::real(), ost::Process::setPriority(), ost::Process::setScheduler(), and ucommon::Random::value().
|
inline |
Convenience function to move objects.
Definition at line 409 of file generics.h.
References caddr_t.
|
static |
Definition at line 49 of file memory.cpp.
References ucommon::String::collate().
|
static |
Definition at line 264 of file linked.cpp.
Referenced by ucommon::NamedObject::sort(), and ucommon::StringPager::sort().
|
inline |
Definition at line 1640 of file string.h.
References ucommon::String::equal().
|
inline |
Definition at line 1655 of file string.h.
References ucommon::String::equal().
Definition at line 1672 of file string.h.
References ucommon::String::compare().
|
inline |
Definition at line 1702 of file string.h.
References ucommon::String::eq_case().
|
static |
Definition at line 1427 of file shell.cpp.
Referenced by ucommon::shell::getline(), ucommon::shell::getpass(), and ucommon::shell::inkey().
|
inline |
Definition at line 577 of file stream.h.
References ucommon::_stream_operators::append().
|
inline |
Definition at line 581 of file stream.h.
References ucommon::_stream_operators::append().
Referenced by ucommon::String::trim().
|
inline |
|
inline |
Definition at line 553 of file stream.h.
References out, and ucommon::_stream_operators::print().
|
inline |
Definition at line 561 of file stream.h.
References out, ucommon::_stream_operators::print(), and str().
|
inline |
Definition at line 569 of file stream.h.
References out, and ucommon::_stream_operators::print().
|
inline |
Definition at line 573 of file stream.h.
References ucommon::_stream_operators::input().
|
inline |
Definition at line 557 of file stream.h.
References ucommon::_stream_operators::input().
|
inline |
Definition at line 565 of file stream.h.
References ucommon::_stream_operators::input(), and str().
bool ucommon::putline | ( | std::ostream & | out, |
char * | buffer | ||
) |
Definition at line 895 of file stream.cpp.
bool __EXPORT ucommon::putline | ( | std::ostream & | out, |
const char * | buffer | ||
) |
|
inline |
Convenience function to reset an existing object.
object | type to reset. |
Definition at line 348 of file generics.h.
References caddr_t.
|
static |
Definition at line 421 of file socket.cpp.
References AF_UNSPEC, and query_family.
Referenced by ucommon::Socket::create(), and ucommon::Socket::Socket().
|
static |
Definition at line 114 of file socket.cpp.
References INVALID_SOCKET, and v6only.
Referenced by ucommon::Socket::create(), ucommon::Socket::Socket(), and ucommon::Socket::via().
|
static |
Definition at line 30 of file secure.cpp.
References ucommon::Mutex::acquire(), private_locks, and ucommon::Mutex::release().
|
static |
Definition at line 38 of file secure.cpp.
References ucommon::Thread::self().
|
inline |
Convenience function to store object pointer into object.
target | to copy into. |
source | to copy from. |
Definition at line 377 of file generics.h.
|
inline |
Definition at line 1741 of file string.h.
References temp.
Referenced by ost::addString(), and ost::setString().
|
inline |
Definition at line 3507 of file socket.cpp.
References ucommon::String::data(), ucommon::String::fix(), ucommon::Socket::readline(), and ucommon::String::size().
Referenced by ucommon::StringPager::add(), ost::MemPager::alloc(), ucommon::typeref< const uint8_t * >::b64(), ucommon::byteref< R >::b64(), ucommon::utf8::chars(), ost::Socket::connectError(), ucommon::UString::count(), cpr_runtime_error(), ucommon::Date::Date(), ucommon::DateTime::DateTime(), ost::delString(), ucommon::MemoryProtocol::dup(), ost::RandomFile::error(), ost::MemPager::first(), ucommon::typeref< const uint8_t * >::hex(), ucommon::byteref< R >::hex(), ucommon::imemstream::imemstream(), ucommon::_stream_operators::input(), ucommon::Socket::is_null(), ucommon::Socket::is_numeric(), main(), ucommon::Digest::operator secure::string(), ucommon::HMAC::operator secure::string(), ucommon::Digest::operator*(), ucommon::HMAC::operator*(), ucommon::Digest::operator<<(), operator<<(), ucommon::HMAC::operator<<(), ost::AppLog::Ident::operator=(), ost::IPV4Address::operator=(), ucommon::utf8_pointer::operator=(), ucommon::typeref< const char * >::operator=(), ucommon::strdup_t::operator=(), operator>>(), ucommon::utf8::pack(), ucommon::shell::path(), ucommon::_stream_operators::print(), process(), ucommon::stringref< R >::promote(), ucommon::byteref< R >::promote(), ucommon::StringPager::push(), ucommon::Digest::puts(), ucommon::HMAC::puts(), ost::PersistEngine::read(), ost::Socket::readData(), ost::Socket::readLine(), ost::logger::runQueue(), scan(), ucommon::Date::set(), ucommon::Time::set(), ucommon::StringPager::set(), ucommon::typeref< const char * >::set(), ucommon::typeref< const uint8_t * >::set(), ucommon::stringref< R >::set(), ucommon::byteref< R >::set(), ucommon::strdup_t::strdup_t(), strfree(), ucommon::Time::Time(), ucommon::typeref< const char * >::typeref(), ucommon::typeref< const uint8_t * >::typeref(), ucommon::utf8::unpack(), ucommon::shell::userid(), ucommon::utf8_pointer::utf8_pointer(), ucommon::secure::uuid(), ucommon::Random::uuid(), ucommon::typeref< const char * >::value::value(), ucommon::typeref< const uint8_t * >::value::value(), ost::PersistEngine::write(), and ucommon::Socket::writes().
|
inline |
Definition at line 897 of file memory.h.
References ucommon::StringPager::join(), prefix, and suffix.
|
inline |
|
inline |
|
inline |
Definition at line 557 of file unicode.h.
References ucommon::utf8::udup().
|
inline |
Definition at line 561 of file unicode.h.
References ucommon::utf8::wdup().
|
inline |
Convenience function to swap objects. Can be specialized.
o1 | to swap. |
o2 | to swap. |
Definition at line 387 of file generics.h.
References cpr_memswap().
|
inline |
Definition at line 1746 of file string.h.
References ucommon::String::swap().
|
inline |
Definition at line 235 of file unicode.cpp.
References ucommon::utf8::udup(), and ucommon::utf8::wdup().
|
inline |
Convenience function to zero an object and restore type info.
object | to zero in memory. |
Definition at line 357 of file generics.h.
References caddr_t.
|
inline |
Definition at line 895 of file secure.h.
References addr().
Referenced by ucommon::Cipher::Key::clear(), main(), ucommon::Cipher::pad(), and ucommon::Cipher::puts().
|
static |
Definition at line 106 of file shell.cpp.
Referenced by ucommon::shell::bind(), ucommon::shell::path(), ucommon::shell::rebind(), and ucommon::shell::set0().
|
static |
Definition at line 107 of file shell.cpp.
Referenced by exit_handler(), and ucommon::shell::exiting().
|
static |
Definition at line 104 of file shell.cpp.
Referenced by ucommon::shell::parse().
|
static |
Definition at line 756 of file typeref.cpp.
|
static |
Definition at line 755 of file typeref.cpp.
|
static |
Definition at line 2114 of file string.cpp.
Referenced by ucommon::String::b64count(), ucommon::String::b64decode(), and ucommon::String::b64encode().
__EXPORT TypeRelease ucommon::auto_release |
Definition at line 758 of file typeref.cpp.
Referenced by ucommon::ArrayRef::create(), and ucommon::MapRef::create().
|
static |
Definition at line 99 of file shell.cpp.
Referenced by ucommon::shell::debug(), ucommon::shell::errexit(), ucommon::shell::errlog(), and ucommon::shell::log().
|
static |
Definition at line 100 of file shell.cpp.
Referenced by ucommon::shell::errexit(), ucommon::shell::errlog(), ucommon::shell::log(), and ucommon::shell::security().
|
static |
Definition at line 101 of file shell.cpp.
Referenced by ucommon::shell::debug(), ucommon::shell::errexit(), ucommon::shell::errlog(), ucommon::shell::log(), and ucommon::shell::security().
|
static |
Definition at line 102 of file shell.cpp.
Referenced by ucommon::shell::log().
|
static |
Definition at line 127 of file socket.cpp.
Referenced by getaddrinfo(), and getnameinfo().
|
static |
Definition at line 91 of file datetime.cpp.
Referenced by ucommon::DateTime::gmt(), ucommon::DateTime::local(), and ucommon::DateTime::release().
|
static |
Definition at line 367 of file shell.cpp.
Referenced by ucommon::shell::errmsg().
|
static |
Definition at line 81 of file thread.cpp.
Referenced by ucommon::Mutex::indexing(), ucommon::Mutex::protect(), and ucommon::Mutex::release().
|
static |
Definition at line 80 of file thread.cpp.
Referenced by ucommon::Mutex::indexing(), ucommon::Mutex::protect(), and ucommon::Mutex::release().
|
static |
Definition at line 108 of file shell.cpp.
Referenced by ucommon::shell::getargv(), and ucommon::shell::setNumeric().
|
static |
Definition at line 109 of file shell.cpp.
Referenced by ucommon::shell::getargv(), ucommon::shell::getNumeric(), and ucommon::shell::setNumeric().
|
static |
Definition at line 105 of file shell.cpp.
Referenced by ucommon::shell::Option::first(), ucommon::shell::Option::Option(), and ucommon::shell::Option::reset().
|
static |
Definition at line 105 of file shell.cpp.
Referenced by ucommon::shell::Option::Option(), and ucommon::shell::Option::reset().
|
static |
Definition at line 27 of file secure.cpp.
Referenced by ssl_lock().
|
static |
Definition at line 111 of file socket.cpp.
Referenced by ucommon::Socket::query(), and setfamily().
__EXPORT TypeRelease ucommon::release_later |
|
static |
Definition at line 82 of file thread.cpp.
Referenced by ucommon::RWLock::indexing(), ucommon::RWLock::reader::lock(), ucommon::RWLock::writer::lock(), and ucommon::RWLock::release().
|
static |
Definition at line 78 of file thread.cpp.
Referenced by ucommon::RWLock::indexing(), ucommon::RWLock::reader::lock(), ucommon::RWLock::writer::lock(), and ucommon::RWLock::release().
__EXPORT TypeRelease ucommon::secure_release |
|
static |
Definition at line 127 of file socket.cpp.
Referenced by getaddrinfo(), and getnameinfo().
|
static |
Definition at line 77 of file thread.cpp.
|
static |
Definition at line 79 of file thread.cpp.
|
static |
Definition at line 103 of file shell.cpp.
Referenced by ucommon::shell::getsym(), ucommon::shell::is_sym(), and ucommon::shell::setsym().
|
static |
Definition at line 1419 of file shell.cpp.
Referenced by ucommon::shell::path(), and ucommon::shell::relocate().
|
static |
Definition at line 83 of file thread.cpp.
Referenced by ucommon::Thread::get(), ucommon::Thread::init(), and ucommon::Thread::map().
|
static |
Definition at line 112 of file socket.cpp.
Referenced by ucommon::Socket::bindto(), ucommon::Socket::create(), ucommon::Socket::query(), ucommon::Socket::address::set(), socket_mapping(), and ucommon::Socket::v4mapping().