Ice 3.7 C++98 API Reference
Loading...
Searching...
No Matches
IceUtil Namespace Reference

Classes

class  BadThreadControlException
class  BasicStringConverter
 A StringConverter converts narrow or wide-strings to and from UTF-8 byte sequences. More...
class  Cond
class  CtrlCHandler
 Provides a portable way to handle Ctrl-C and Ctrl-C like signals. More...
class  CtrlCHandlerException
 Raised by the CtrlCHandler constructor if another CtrlCHandler already exists. More...
class  Exception
 Abstract base class for all Ice exceptions. More...
class  ExceptionHelper
 Helper template for the implementation of Ice::Exception. More...
class  FileLockException
 This exception indicates the failure to lock a file. More...
class  Handle
class  HandleBase
class  IllegalArgumentException
 This exception indicates that a function was called with an illegal parameter value. More...
class  IllegalConversionException
 This exception indicates the failure of a string conversion. More...
class  InvalidTimeoutException
class  LockT
class  Monitor
class  Mutex
class  noncopyable
class  NullHandleException
 This exception indicates an attempt to dereference a null IceUtil::Handle or IceInternal::Handle. More...
class  Optional
 Encapsulates an optional value, which may or may not be present. More...
class  OptionalNotSetException
 This exception indicates an IceUtil::Optional is not set. More...
class  RecMutex
class  ScopedArray
class  Shared
class  SimpleShared
class  SyscallException
 This exception indicates the failure of a system call. More...
class  SyscallExceptionHelper
 Helper template for the implementation of SyscallException. More...
class  Thread
class  ThreadControl
class  ThreadLockedException
class  ThreadNotStartedException
class  ThreadStartedException
class  ThreadSyscallException
class  Time
class  Timer
class  TimerTask
class  TryLockT
class  UTF8Buffer
 Provides bytes to toUTF8. More...

Typedefs

typedef unsigned char Byte
typedef void(* CtrlCHandlerCallback) (int sig)
 Invoked when a signal occurs.
typedef long long Int64
typedef BasicStringConverter< char > StringConverter
 A narrow string converter.
typedef ::IceUtil::Handle< StringConverterStringConverterPtr
typedef Handle< ThreadThreadPtr
typedef IceUtil::Handle< TimerTimerPtr
typedef ::IceUtil::Handle< TimerTaskTimerTaskPtr
typedef BasicStringConverter< wchar_t > WstringConverter
 A wide string converter.
typedef ::IceUtil::Handle< WstringConverterWstringConverterPtr

Enumerations

enum  MutexProtocol { PrioInherit , PrioNone }

Functions

template<class R, class T>
inline ::IceUtilInternal::ConstMemFun< R, T, Handle< T > > constMemFun (R(T::*p)(void) const)
template<class R, class T, class A>
inline ::IceUtilInternal::ConstMemFun1< R, T, Handle< T >, A > constMemFun1 (R(T::*p)(A) const)
template<class T>
inline ::IceUtilInternal::ConstVoidMemFun< T, Handle< T > > constVoidMemFun (void(T::*p)(void) const)
template<class T, class A>
inline ::IceUtilInternal::ConstVoidMemFun1< T, Handle< T >, A > constVoidMemFun1 (void(T::*p)(A) const)
WstringConverterPtr createUnicodeWstringConverter ()
 Creates a WstringConverter that converts to and from UTF-16 or UTF-32 depending on sizeof(wchar_t).
std::string generateUUID ()
 Generates a universally unique identifier (UUID).
MutexProtocol getDefaultMutexProtocol ()
StringConverterPtr getProcessStringConverter ()
 Retrieves the per-process narrow string converter.
WstringConverterPtr getProcessWstringConverter ()
 Retrieves the per-process wide string converter.
template<class T>
Optional< T > makeOptional (const T &v)
 Constructs an optional from the given value.
template<class R, class T>
inline ::IceUtilInternal::MemFun< R, T, Handle< T > > memFun (R(T::*p)(void))
template<class R, class T, class A>
inline ::IceUtilInternal::MemFun1< R, T, Handle< T >, A > memFun1 (R(T::*p)(A))
std::string nativeToUTF8 (const std::string &str, const StringConverterPtr &nc)
 Converts the given string from the native narrow string encoding to UTF-8 using the given converter.
template<typename T, typename U>
bool operator!= (const HandleBase< T > &lhs, const HandleBase< U > &rhs)
template<typename T, typename U>
bool operator!= (const Optional< T > &lhs, const Optional< U > &rhs)
template<typename T, typename Y>
bool operator!= (const Optional< T > &lhs, const Y &rhs)
template<typename T, typename Y>
bool operator!= (const Y &lhs, const Optional< T > &rhs)
template<typename T, typename U>
bool operator< (const HandleBase< T > &lhs, const HandleBase< U > &rhs)
template<typename T, typename U>
bool operator< (const Optional< T > &lhs, const Optional< U > &rhs)
template<typename T, typename Y>
bool operator< (const Optional< T > &lhs, const Y &rhs)
template<typename T, typename Y>
bool operator< (const Y &lhs, const Optional< T > &rhs)
std::ostream & operator<< (std::ostream &, const Exception &)
std::ostream & operator<< (std::ostream &, const Time &)
template<typename T, typename U>
bool operator<= (const HandleBase< T > &lhs, const HandleBase< U > &rhs)
template<typename T, typename U>
bool operator<= (const Optional< T > &lhs, const Optional< U > &rhs)
template<typename T, typename Y>
bool operator<= (const Optional< T > &lhs, const Y &rhs)
template<typename T, typename Y>
bool operator<= (const Y &lhs, const Optional< T > &rhs)
template<typename T, typename U>
bool operator== (const HandleBase< T > &lhs, const HandleBase< U > &rhs)
template<typename T, typename U>
bool operator== (const Optional< T > &lhs, const Optional< U > &rhs)
template<typename T, typename Y>
bool operator== (const Optional< T > &lhs, const Y &rhs)
template<typename T, typename Y>
bool operator== (const Y &lhs, const Optional< T > &rhs)
template<typename T, typename U>
bool operator> (const HandleBase< T > &lhs, const HandleBase< U > &rhs)
template<typename T, typename U>
bool operator> (const Optional< T > &lhs, const Optional< U > &rhs)
template<typename T, typename Y>
bool operator> (const Optional< T > &lhs, const Y &rhs)
template<typename T, typename Y>
bool operator> (const Y &lhs, const Optional< T > &rhs)
template<typename T, typename U>
bool operator>= (const HandleBase< T > &lhs, const HandleBase< U > &rhs)
template<typename T, typename U>
bool operator>= (const Optional< T > &lhs, const Optional< U > &rhs)
template<typename T, typename Y>
bool operator>= (const Optional< T > &lhs, const Y &rhs)
template<typename T, typename Y>
bool operator>= (const Y &lhs, const Optional< T > &rhs)
template<class R, class K, class T>
inline ::IceUtilInternal::SecondConstMemFun< R, K, T, Handle< T > > secondConstMemFun (R(T::*p)(void) const)
template<class R, class K, class T, class A>
inline ::IceUtilInternal::SecondConstMemFun1< R, K, T, Handle< T >, A > secondConstMemFun1 (R(T::*p)(A) const)
template<class K, class T>
inline ::IceUtilInternal::SecondConstVoidMemFun< K, T, Handle< T > > secondConstVoidMemFun (void(T::*p)(void) const)
template<class K, class T, class A>
inline ::IceUtilInternal::SecondConstVoidMemFun1< K, T, Handle< T >, A > secondConstVoidMemFun1 (void(T::*p)(A) const)
template<class R, class K, class T>
inline ::IceUtilInternal::SecondMemFun< R, K, T, Handle< T > > secondMemFun (R(T::*p)(void))
template<class R, class K, class T, class A>
inline ::IceUtilInternal::SecondMemFun1< R, K, T, Handle< T >, A > secondMemFun1 (R(T::*p)(A))
template<class K, class T>
inline ::IceUtilInternal::SecondVoidMemFun< K, T, Handle< T > > secondVoidMemFun (void(T::*p)(void))
template<class K, class T, class A>
inline ::IceUtilInternal::SecondVoidMemFun1< K, T, Handle< T >, A > secondVoidMemFun1 (void(T::*p)(A))
void setProcessStringConverter (const StringConverterPtr &c)
 Sets the per-process narrow string converter.
void setProcessWstringConverter (const WstringConverterPtr &c)
 Sets the per process wide string converter.
std::wstring stringToWstring (const std::string &str, const StringConverterPtr &nc=0, const WstringConverterPtr &wc=0)
 Converts the given narrow string to a wide string.
std::string UTF8ToNative (const std::string &str, const StringConverterPtr &nc)
 Converts the given string from UTF-8 to the native narrow string encoding using the given converter.
template<class T>
inline ::IceUtilInternal::VoidMemFun< T, Handle< T > > voidMemFun (void(T::*p)(void))
template<class T, class A>
inline ::IceUtilInternal::VoidMemFun1< T, Handle< T >, A > voidMemFun1 (void(T::*p)(A))
std::string wstringToString (const std::wstring &str, const StringConverterPtr &nc=0, const WstringConverterPtr &wc=0)
 Converts the given wide string to a narrow string.

Variables

const IceUtilInternal::NoneType None = {}
 A sentinel value used to indicate that no optional value was provided.

Typedef Documentation

◆ Byte

typedef unsigned char IceUtil::Byte

◆ CtrlCHandlerCallback

typedef void(* IceUtil::CtrlCHandlerCallback) (int sig)

Invoked when a signal occurs.

The callback must not raise exceptions. On Linux and macOS, the callback is NOT a signal handler and can call functions that are not async-signal safe.

Parameters
sigThe signal number that occurred.

◆ Int64

typedef long long IceUtil::Int64

◆ StringConverter

A narrow string converter.

◆ StringConverterPtr

◆ ThreadPtr

◆ TimerPtr

◆ TimerTaskPtr

◆ WstringConverter

A wide string converter.

◆ WstringConverterPtr

Enumeration Type Documentation

◆ MutexProtocol

Enumerator
PrioInherit 
PrioNone 

Function Documentation

◆ constMemFun()

template<class R, class T>
inline ::IceUtilInternal::ConstMemFun< R, T, Handle< T > > IceUtil::constMemFun ( R(T::* )(void) const)

◆ constMemFun1()

template<class R, class T, class A>
inline ::IceUtilInternal::ConstMemFun1< R, T, Handle< T >, A > IceUtil::constMemFun1 ( R(T::* )(A) const)

◆ constVoidMemFun()

template<class T>
inline ::IceUtilInternal::ConstVoidMemFun< T, Handle< T > > IceUtil::constVoidMemFun ( void(T::* )(void) const)

◆ constVoidMemFun1()

template<class T, class A>
inline ::IceUtilInternal::ConstVoidMemFun1< T, Handle< T >, A > IceUtil::constVoidMemFun1 ( void(T::* )(A) const)

◆ createUnicodeWstringConverter()

WstringConverterPtr IceUtil::createUnicodeWstringConverter ( )

Creates a WstringConverter that converts to and from UTF-16 or UTF-32 depending on sizeof(wchar_t).

Returns
The string converter.

◆ generateUUID()

std::string IceUtil::generateUUID ( )

Generates a universally unique identifier (UUID).

Returns
The UUID.

◆ getDefaultMutexProtocol()

MutexProtocol IceUtil::getDefaultMutexProtocol ( )

◆ getProcessStringConverter()

StringConverterPtr IceUtil::getProcessStringConverter ( )

Retrieves the per-process narrow string converter.

Returns
The string converter.

◆ getProcessWstringConverter()

WstringConverterPtr IceUtil::getProcessWstringConverter ( )

Retrieves the per-process wide string converter.

Returns
The string converter.

◆ makeOptional()

template<class T>
Optional< T > IceUtil::makeOptional ( const T & v)
inline

Constructs an optional from the given value.

Parameters
vThe optional's initial value.
Returns
A new optional object.

◆ memFun()

template<class R, class T>
inline ::IceUtilInternal::MemFun< R, T, Handle< T > > IceUtil::memFun ( R(T::* )(void))

◆ memFun1()

template<class R, class T, class A>
inline ::IceUtilInternal::MemFun1< R, T, Handle< T >, A > IceUtil::memFun1 ( R(T::* )(A))

◆ nativeToUTF8()

std::string IceUtil::nativeToUTF8 ( const std::string & str,
const StringConverterPtr & nc )

Converts the given string from the native narrow string encoding to UTF-8 using the given converter.

Parameters
strThe native narrow string.
ncThe narrow string converter. If null, the native string is returned.
Returns
A UTF-8 string.

◆ operator!=() [1/4]

template<typename T, typename U>
bool IceUtil::operator!= ( const HandleBase< T > & lhs,
const HandleBase< U > & rhs )
inline

◆ operator!=() [2/4]

template<typename T, typename U>
bool IceUtil::operator!= ( const Optional< T > & lhs,
const Optional< U > & rhs )
inline

◆ operator!=() [3/4]

template<typename T, typename Y>
bool IceUtil::operator!= ( const Optional< T > & lhs,
const Y & rhs )
inline

◆ operator!=() [4/4]

template<typename T, typename Y>
bool IceUtil::operator!= ( const Y & lhs,
const Optional< T > & rhs )
inline

◆ operator<() [1/4]

template<typename T, typename U>
bool IceUtil::operator< ( const HandleBase< T > & lhs,
const HandleBase< U > & rhs )
inline

◆ operator<() [2/4]

template<typename T, typename U>
bool IceUtil::operator< ( const Optional< T > & lhs,
const Optional< U > & rhs )
inline

◆ operator<() [3/4]

template<typename T, typename Y>
bool IceUtil::operator< ( const Optional< T > & lhs,
const Y & rhs )
inline

◆ operator<() [4/4]

template<typename T, typename Y>
bool IceUtil::operator< ( const Y & lhs,
const Optional< T > & rhs )
inline

◆ operator<<() [1/2]

std::ostream & IceUtil::operator<< ( std::ostream & ,
const Exception &  )

◆ operator<<() [2/2]

std::ostream & IceUtil::operator<< ( std::ostream & ,
const Time &  )

◆ operator<=() [1/4]

template<typename T, typename U>
bool IceUtil::operator<= ( const HandleBase< T > & lhs,
const HandleBase< U > & rhs )
inline

◆ operator<=() [2/4]

template<typename T, typename U>
bool IceUtil::operator<= ( const Optional< T > & lhs,
const Optional< U > & rhs )
inline

◆ operator<=() [3/4]

template<typename T, typename Y>
bool IceUtil::operator<= ( const Optional< T > & lhs,
const Y & rhs )
inline

◆ operator<=() [4/4]

template<typename T, typename Y>
bool IceUtil::operator<= ( const Y & lhs,
const Optional< T > & rhs )
inline

◆ operator==() [1/4]

template<typename T, typename U>
bool IceUtil::operator== ( const HandleBase< T > & lhs,
const HandleBase< U > & rhs )
inline

◆ operator==() [2/4]

template<typename T, typename U>
bool IceUtil::operator== ( const Optional< T > & lhs,
const Optional< U > & rhs )
inline

◆ operator==() [3/4]

template<typename T, typename Y>
bool IceUtil::operator== ( const Optional< T > & lhs,
const Y & rhs )
inline

◆ operator==() [4/4]

template<typename T, typename Y>
bool IceUtil::operator== ( const Y & lhs,
const Optional< T > & rhs )
inline

◆ operator>() [1/4]

template<typename T, typename U>
bool IceUtil::operator> ( const HandleBase< T > & lhs,
const HandleBase< U > & rhs )
inline

◆ operator>() [2/4]

template<typename T, typename U>
bool IceUtil::operator> ( const Optional< T > & lhs,
const Optional< U > & rhs )
inline

◆ operator>() [3/4]

template<typename T, typename Y>
bool IceUtil::operator> ( const Optional< T > & lhs,
const Y & rhs )
inline

◆ operator>() [4/4]

template<typename T, typename Y>
bool IceUtil::operator> ( const Y & lhs,
const Optional< T > & rhs )
inline

◆ operator>=() [1/4]

template<typename T, typename U>
bool IceUtil::operator>= ( const HandleBase< T > & lhs,
const HandleBase< U > & rhs )
inline

◆ operator>=() [2/4]

template<typename T, typename U>
bool IceUtil::operator>= ( const Optional< T > & lhs,
const Optional< U > & rhs )
inline

◆ operator>=() [3/4]

template<typename T, typename Y>
bool IceUtil::operator>= ( const Optional< T > & lhs,
const Y & rhs )
inline

◆ operator>=() [4/4]

template<typename T, typename Y>
bool IceUtil::operator>= ( const Y & lhs,
const Optional< T > & rhs )
inline

◆ secondConstMemFun()

template<class R, class K, class T>
inline ::IceUtilInternal::SecondConstMemFun< R, K, T, Handle< T > > IceUtil::secondConstMemFun ( R(T::* )(void) const)

◆ secondConstMemFun1()

template<class R, class K, class T, class A>
inline ::IceUtilInternal::SecondConstMemFun1< R, K, T, Handle< T >, A > IceUtil::secondConstMemFun1 ( R(T::* )(A) const)

◆ secondConstVoidMemFun()

template<class K, class T>
inline ::IceUtilInternal::SecondConstVoidMemFun< K, T, Handle< T > > IceUtil::secondConstVoidMemFun ( void(T::* )(void) const)

◆ secondConstVoidMemFun1()

template<class K, class T, class A>
inline ::IceUtilInternal::SecondConstVoidMemFun1< K, T, Handle< T >, A > IceUtil::secondConstVoidMemFun1 ( void(T::* )(A) const)

◆ secondMemFun()

template<class R, class K, class T>
inline ::IceUtilInternal::SecondMemFun< R, K, T, Handle< T > > IceUtil::secondMemFun ( R(T::* )(void))

◆ secondMemFun1()

template<class R, class K, class T, class A>
inline ::IceUtilInternal::SecondMemFun1< R, K, T, Handle< T >, A > IceUtil::secondMemFun1 ( R(T::* )(A))

◆ secondVoidMemFun()

template<class K, class T>
inline ::IceUtilInternal::SecondVoidMemFun< K, T, Handle< T > > IceUtil::secondVoidMemFun ( void(T::* )(void))

◆ secondVoidMemFun1()

template<class K, class T, class A>
inline ::IceUtilInternal::SecondVoidMemFun1< K, T, Handle< T >, A > IceUtil::secondVoidMemFun1 ( void(T::* )(A))

◆ setProcessStringConverter()

void IceUtil::setProcessStringConverter ( const StringConverterPtr & c)

Sets the per-process narrow string converter.

Parameters
cThe string converter.

◆ setProcessWstringConverter()

void IceUtil::setProcessWstringConverter ( const WstringConverterPtr & c)

Sets the per process wide string converter.

Parameters
cThe string converter.

◆ stringToWstring()

std::wstring IceUtil::stringToWstring ( const std::string & str,
const StringConverterPtr & nc = 0,
const WstringConverterPtr & wc = 0 )

Converts the given narrow string to a wide string.

Parameters
strA narrow string.
ncThe narrow string converter. If null, the result's narrow string encoding is UTF-8.
wcThe wide string converter. If null, the input's wstring encoding is UTF-16 or UTF-32 depending on the size of wchar_t.
Returns
A wide string.

◆ UTF8ToNative()

std::string IceUtil::UTF8ToNative ( const std::string & str,
const StringConverterPtr & nc )

Converts the given string from UTF-8 to the native narrow string encoding using the given converter.

Parameters
strThe UTF-8 string.
ncThe narrow string converter. If null, the UTF-8 string is returned.
Returns
A native narrow string.

◆ voidMemFun()

template<class T>
inline ::IceUtilInternal::VoidMemFun< T, Handle< T > > IceUtil::voidMemFun ( void(T::* )(void))

◆ voidMemFun1()

template<class T, class A>
inline ::IceUtilInternal::VoidMemFun1< T, Handle< T >, A > IceUtil::voidMemFun1 ( void(T::* )(A))

◆ wstringToString()

std::string IceUtil::wstringToString ( const std::wstring & str,
const StringConverterPtr & nc = 0,
const WstringConverterPtr & wc = 0 )

Converts the given wide string to a narrow string.

Parameters
strA wide string.
ncThe narrow string converter. If null, the result's narrow string encoding is UTF-8.
wcThe wide string converter. If null, the input's wstring encoding is UTF-16 or UTF-32 depending on the size of wchar_t.
Returns
A narrow string.

Variable Documentation

◆ None

const IceUtilInternal::NoneType IceUtil::None = {}

A sentinel value used to indicate that no optional value was provided.