libqi-api
2.0.6.8
|
qi general namespace More...
Namespaces | |
namespace | detail |
namespace | details |
namespace | log |
Log functions with different levels of verbosity. | |
namespace | os |
OS abstraction layer. | |
namespace | path |
Set of tools to handle SDK layouts. | |
namespace | version |
Version numbering API. | |
Classes | |
class | Application |
Class handling startup and teardown of an application. More... | |
struct | AtomicBase |
class | Atomic |
Atomic operations on integers. More... | |
class | Buffer |
Class to store buffer. More... | |
class | BufferReader |
Class to read const buffer. More... | |
class | SteadyClock |
class | WallClock |
struct | FutureValueConverter< void, void > |
struct | FutureValueConverter< T, void > |
struct | FutureValueConverter< void, T > |
class | EventLoop |
struct | FutureType |
struct | FutureHasNoValue |
struct | FutureType< void > |
class | FutureException |
class | FutureUserException |
class | Future |
class | FutureSync |
class | Promise |
class | FutureBarrier |
This class helps waiting on multiple futures at the same point. More... | |
struct | FutureValueConverter |
Specialize this struct to provide conversion between future values. More... | |
class | PeriodicTask |
class | SharedPtr |
Lightweight implementation of shared pointers. More... | |
class | MinMaxSum |
Stores min, max and sum of values fed to it. More... | |
class | MethodStatistics |
Store statistics about method calls. More... | |
class | ThreadPool |
Pool of workers. More... | |
class | TrackableBase |
Common base class to templates Trackable for compile-time detection. More... | |
class | Trackable |
class | PointerLockException |
struct | IsClonable |
Detect if a type is using boost::noncopyable or QI_DISALLOW_COPY_AND_ASSIGN. More... | |
class | Translator |
Typedefs | |
typedef boost::chrono::duration < int64_t, boost::nano > | Duration |
typedef boost::chrono::duration < int64_t, boost::nano > | NanoSeconds |
typedef boost::chrono::duration < int64_t, boost::micro > | MicroSeconds |
typedef boost::chrono::duration < int64_t, boost::milli > | MilliSeconds |
typedef boost::chrono::duration < int64_t > | Seconds |
typedef boost::chrono::duration < int64_t, boost::ratio< 60 > > | Minutes |
typedef boost::chrono::duration < int64_t, boost::ratio< 3600 > > | Hours |
typedef SteadyClock::SteadyClockTimePoint | SteadyClockTimePoint |
typedef WallClock::WallClockTimePoint | WallClockTimePoint |
typedef int | LogContext |
typedef std::codecvt< wchar_t, char, std::mbstate_t > | codecvt_type |
Standard std::codecvt type accepted by STL and boost. | |
typedef int8_t | int8_t |
Cross-platform signed integer of length 8 bits (1 byte). | |
typedef int16_t | int16_t |
Cross-platform signed integer of length 16 bits (2 bytes). | |
typedef int32_t | int32_t |
Cross-platform signed integer of length 32 bits (4 bytes). | |
typedef int64_t | int64_t |
Cross-platform signed integer of length 64 bits (8 bytes). | |
typedef uint8_t | uint8_t |
Cross-platform unsigned integer of length 8 bits (1 byte). | |
typedef uint16_t | uint16_t |
Cross-platform unsigned integer of length 16 bits (2 bytes). | |
typedef uint32_t | uint32_t |
Cross-platform unsigned integer of length 32 bits (4 bytes). | |
typedef uint64_t | uint64_t |
Cross-platform unsigned integer of length 64 bits (8 bytes). | |
Enumerations | |
enum | FutureState { FutureState_None, FutureState_Running, FutureState_Canceled, FutureState_FinishedWithError, FutureState_FinishedWithValue } |
enum | FutureCallbackType { FutureCallbackType_Sync = 0, FutureCallbackType_Async = 1 } |
enum | FutureTimeout { FutureTimeout_Infinite = ((int) 0x7fffffff), FutureTimeout_None = 0 } |
enum | StreamColor { StreamColor_None = 0, StreamColor_Reset = 1, StreamColor_Bold = 2, StreamColor_Faint = 3, StreamColor_Standout = 4, StreamColor_Underline = 5, StreamColor_Blink = 6, StreamColor_Overline = 7, StreamColor_Black = 8, StreamColor_DarkRed = 9, StreamColor_DarkGreen = 10, StreamColor_Brown = 11, StreamColor_DarkBlue = 12, StreamColor_Purple = 13, StreamColor_Teal = 14, StreamColor_LightGray = 15, StreamColor_DarkGray = 16, StreamColor_Red = 17, StreamColor_Green = 18, StreamColor_Yellow = 19, StreamColor_Blue = 20, StreamColor_Fuchsia = 21, StreamColor_Turquoise = 22, StreamColor_White = 23 } |
enum | LogLevel { LogLevel_Silent = 0, LogLevel_Fatal, LogLevel_Error, LogLevel_Warning, LogLevel_Info, LogLevel_Verbose, LogLevel_Debug } |
Log level verbosity. More... | |
enum | LogColor { LogColor_Never, LogColor_Auto, LogColor_Always } |
enum | LogContextAttr { LogContextAttr_None = 0, LogContextAttr_Verbosity = 1 << 0, LogContextAttr_ShortVerbosity = 1 << 1, LogContextAttr_Date = 1 << 2, LogContextAttr_Tid = 1 << 3, LogContextAttr_Category = 1 << 4, LogContextAttr_File = 1 << 5, LogContextAttr_Function = 1 << 6, LogContextAttr_Return = 1 << 7 } |
Functions | |
long | testAndSet (long *cond) |
SteadyClockTimePoint | steadyClockNow () |
WallClockTimePoint | wallClockNow () |
void | sleepFor (const qi::Duration &d) |
template<class Rep , class Period > | |
void | sleepFor (const boost::chrono::duration< Rep, Period > &d) |
void | sleepUntil (const SteadyClockTimePoint &t) |
template<class Duration > | |
void | sleepUntil (const boost::chrono::time_point< SteadyClock, Duration > &t) |
void | sleepUntil (const WallClockTimePoint &t) |
template<class Duration > | |
void | sleepUntil (const boost::chrono::time_point< WallClock, Duration > &t) |
template<typename R > | |
void | nullConverter (void *, R &) |
template<typename T > | |
qi::Future< T > | makeFutureError (const std::string &error, FutureCallbackType async) |
template<typename T > | |
void | waitForAll (std::vector< Future< T > > &vect) |
Helper function to wait on a vector of futures. | |
template<typename T > | |
qi::FutureSync< qi::Future< T > > | waitForFirst (std::vector< Future< T > > &vect) |
Helper function to wait for the first valid future. | |
template<typename FT , typename PT > | |
void | adaptFuture (const Future< FT > &f, Promise< PT > &p) |
template<typename FT , typename PT , typename CONV > | |
void | adaptFuture (const Future< FT > &f, Promise< PT > &p, CONV converter) |
Similar to adaptFuture(f, p) but with a custom converter. | |
template<typename F , typename ARG0 > | |
boost::function< F > | track (const boost::function< F > &f, const ARG0 &arg0) |
template<typename F , typename ARG0 > | |
boost::function< F > | trackWithFallback (boost::function< void()> onFail, const boost::function< F > &f, const ARG0 &arg0) |
EventLoop * | getEventLoop () |
Return the global eventloop, created on demand on first call. | |
void | startEventLoop (int nthread) |
Start the eventloop with nthread threads. No-op if already started. | |
boost::asio::io_service & | getIoService () |
Return the io_service used by the global event loop. | |
QI_API_DEPRECATED EventLoop * | getDefaultNetworkEventLoop () |
QI_API_DEPRECATED EventLoop * | getDefaultObjectEventLoop () |
Return a default context for other uses. | |
QI_API_DEPRECATED EventLoop * | getDefaultThreadPoolEventLoop () |
Return a default thread pool context. | |
QI_API_DEPRECATED void | init (int &argc, char **&argv) |
QI_API_DEPRECATED int | argc () |
Deprecated, see detailed description. | |
QI_API_DEPRECATED const char ** | argv () |
Deprecated, see detailed description. | |
QI_API_DEPRECATED const char * | program () |
Deprecated, see detailed description. | |
const codecvt_type & | unicodeFacet () |
UTF-8 facet object getter. | |
template<typename RF , typename AF > | |
boost::function< RF > | bind (const AF &fun,...) |
template<typename T > | |
bool | isClonable () |
template<typename T > | |
bool | isClonable (T *) |
qi::Translator & | defaultTranslator (const std::string &name) |
Get a reference on the default Translator. | |
std::string | tr (const std::string &msg, const std::string &domain="", const std::string &locale="") |
qi general namespace
Localization of your source code - make your application or library speak in the user's language.
typedef boost::chrono::duration<int64_t, boost::nano> qi::Duration |
typedef int qi::LogContext |
typedef boost::chrono::duration<int64_t, boost::micro> qi::MicroSeconds |
typedef boost::chrono::duration<int64_t, boost::milli> qi::MilliSeconds |
typedef boost::chrono::duration<int64_t, boost::ratio<60> > qi::Minutes |
typedef boost::chrono::duration<int64_t, boost::nano> qi::NanoSeconds |
typedef boost::chrono::duration<int64_t> qi::Seconds |
Definition at line 69 of file future.hpp.
enum qi::FutureState |
State of the future.
FutureState_None | |
FutureState_Running |
Future is not tied to a promise. |
FutureState_Canceled |
Operation pending. |
FutureState_FinishedWithError |
The future has been canceled. |
FutureState_FinishedWithValue |
The operation is finished with an error. |
Definition at line 61 of file future.hpp.
enum qi::FutureTimeout |
Definition at line 74 of file future.hpp.
enum qi::LogColor |
enum qi::LogContextAttr |
enum qi::LogLevel |
enum qi::StreamColor |
Definition at line 16 of file iocolor.hpp.
void qi::adaptFuture | ( | const Future< FT > & | f, |
Promise< PT > & | p | ||
) |
Feed a promise from a future of possibly different type. Will monitor f
, and bounce its state to p
. Error and canceled state are bounced as is. Valued state is bounced through FutureValueConverter<FT, PT>::convert()
Definition at line 314 of file future.hxx.
void qi::adaptFuture | ( | const Future< FT > & | f, |
Promise< PT > & | p, | ||
CONV | converter | ||
) |
Similar to adaptFuture(f, p) but with a custom converter.
Definition at line 324 of file future.hxx.
qi::argc | ( | ) |
Deprecated, see detailed description.
* .. deprecated:: 1.16 * Use :cpp:class:`qi::Application::argc()` *
qi::argv | ( | ) |
Deprecated, see detailed description.
* .. deprecated:: 1.16 * Use :cpp:class:`qi::Application::argv()` *
boost::function<RF> qi::bind | ( | const AF & | fun, |
... | |||
) |
Bind a set of arguments or placeholders to a function.
Handles first function argument of kind boost::weak_ptr and qi::Trackable: will try to lock and throw qi::PointerLockException in case of failure
qi::defaultTranslator | ( | const std::string & | name | ) |
Get a reference on the default Translator.
name | Application or Library name |
Compat Return a default event loop for network operations.
Return a default context for other uses.
Return a default thread pool context.
Return the global eventloop, created on demand on first call.
boost::asio::io_service& qi::getIoService | ( | ) |
Return the io_service used by the global event loop.
QI_API_DEPRECATED void qi::init | ( | int & | argc, |
char **& | argv | ||
) |
bool qi::isClonable | ( | ) |
Definition at line 36 of file traits.hpp.
bool qi::isClonable | ( | T * | ) |
Definition at line 41 of file traits.hpp.
qi::Future< T > qi::makeFutureError | ( | const std::string & | error, |
FutureCallbackType | async | ||
) |
Definition at line 229 of file future.hxx.
void qi::nullConverter | ( | void * | , |
R & | |||
) |
Definition at line 50 of file eventloop.hxx.
qi::program | ( | ) |
Deprecated, see detailed description.
* .. deprecated:: 1.16 * Use :cpp:class:`qi::Application::program()` *
void qi::sleepFor | ( | const qi::Duration & | d | ) |
void qi::sleepFor | ( | const boost::chrono::duration< Rep, Period > & | d | ) | [inline] |
void qi::sleepUntil | ( | const SteadyClockTimePoint & | t | ) |
void qi::sleepUntil | ( | const boost::chrono::time_point< SteadyClock, Duration > & | t | ) | [inline] |
void qi::sleepUntil | ( | const WallClockTimePoint & | t | ) |
void qi::sleepUntil | ( | const boost::chrono::time_point< WallClock, Duration > & | t | ) | [inline] |
void qi::startEventLoop | ( | int | nthread | ) |
Start the eventloop with nthread threads. No-op if already started.
SteadyClockTimePoint qi::steadyClockNow | ( | ) | [inline] |
long qi::testAndSet | ( | long * | cond | ) | [inline] |
Definition at line 31 of file atomic.hpp.
qi::tr | ( | const std::string & | msg, |
const std::string & | domain = "" , |
||
const std::string & | locale = "" |
||
) |
Translate a message.
message | Message |
domain | Domain name |
locale | Locale name |
boost::function< F > qi::track | ( | const boost::function< F > & | f, |
const ARG0 & | arg0 | ||
) |
Wrap given function f
with a tracking check on arg0
, which must be a weak pointer or a Trackable instance.
f
Definition at line 193 of file trackable.hxx.
boost::function< F > qi::trackWithFallback | ( | boost::function< void()> | onFail, |
const boost::function< F > & | f, | ||
const ARG0 & | arg0 | ||
) |
Definition at line 199 of file trackable.hxx.
qi::unicodeFacet | ( | ) |
UTF-8 facet object getter.
Return a facet object that can be used by stl (iostream, locale, ...) and std::locale compliant library like boost::filesystem.
This class allow conversion between UTF-8 (char) and UTF-16/UTF-32 (wchar).
void qi::waitForAll | ( | std::vector< Future< T > > & | vect | ) |
Helper function to wait on a vector of futures.
Definition at line 236 of file future.hxx.
qi::FutureSync< qi::Future< T > > qi::waitForFirst | ( | std::vector< Future< T > > & | vect | ) |
Helper function to wait for the first valid future.
Definition at line 247 of file future.hxx.
WallClockTimePoint qi::wallClockNow | ( | ) | [inline] |