libqi-api
2.1.4.13
|
qi general namespace More...
Namespaces | |
detail | |
details | |
log | |
Log functions with different levels of verbosity. | |
os | |
OS abstraction layer. | |
path | |
Set of tools to handle SDK layouts. | |
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 | Future |
class | EventLoop |
struct | FutureType |
struct | FutureHasNoValue |
struct | FutureType< void > |
class | FutureInterface |
class | FutureSync |
class | Promise |
class | FutureException |
class | FutureUserException |
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 | Path |
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::vector< Path > | PathVector |
typedef std::codecvt< wchar_t, char, std::mbstate_t > | codecvt_type |
Standard std::codecvt type accepted by STL and boost. More... | |
typedef int8_t | int8_t |
Cross-platform signed integer of length 8 bits (1 byte). More... | |
typedef int16_t | int16_t |
Cross-platform signed integer of length 16 bits (2 bytes). More... | |
typedef int32_t | int32_t |
Cross-platform signed integer of length 32 bits (4 bytes). More... | |
typedef int64_t | int64_t |
Cross-platform signed integer of length 64 bits (8 bytes). More... | |
typedef uint8_t | uint8_t |
Cross-platform unsigned integer of length 8 bits (1 byte). More... | |
typedef uint16_t | uint16_t |
Cross-platform unsigned integer of length 16 bits (2 bytes). More... | |
typedef uint32_t | uint32_t |
Cross-platform unsigned integer of length 32 bits (4 bytes). More... | |
typedef uint64_t | uint64_t |
Cross-platform unsigned integer of length 64 bits (8 bytes). More... | |
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. More... | |
template<typename T > | |
qi::FutureSync< qi::Future< T > > | waitForFirst (std::vector< Future< T > > &vect) |
Helper function to wait for the first valid future. More... | |
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. More... | |
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. More... | |
void | startEventLoop (int nthread) |
Start the eventloop with nthread threads. No-op if already started. More... | |
boost::asio::io_service & | getIoService () |
Return the io_service used by the global event loop. More... | |
QI_API_DEPRECATED EventLoop * | getDefaultNetworkEventLoop () |
QI_API_DEPRECATED EventLoop * | getDefaultObjectEventLoop () |
Return a default context for other uses. More... | |
QI_API_DEPRECATED EventLoop * | getDefaultThreadPoolEventLoop () |
Return a default thread pool context. More... | |
QI_API_DEPRECATED void | init (int &argc, char **&argv) |
QI_API_DEPRECATED int | argc () |
Deprecated, see detailed description. More... | |
QI_API_DEPRECATED const char ** | argv () |
Deprecated, see detailed description. More... | |
QI_API_DEPRECATED const char * | program () |
Deprecated, see detailed description. More... | |
const codecvt_type & | unicodeFacet () |
UTF-8 facet object getter. More... | |
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. More... | |
std::string | tr (const std::string &msg, const std::string &domain="", const std::string &locale="") |
Translate a message. More... | |
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 std::vector<Path> qi::PathVector |
typedef boost::chrono::duration<int64_t> qi::Seconds |
Enumerator | |
---|---|
FutureCallbackType_Sync | |
FutureCallbackType_Async |
Definition at line 69 of file future.hpp.
enum qi::FutureState |
State of the future.
Enumerator | |
---|---|
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 |
Enumerator | |
---|---|
FutureTimeout_Infinite | |
FutureTimeout_None |
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 316 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 326 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 |
QI_API_DEPRECATED EventLoop* qi::getDefaultNetworkEventLoop | ( | ) |
Compat Return a default event loop for network operations.
QI_API_DEPRECATED EventLoop* qi::getDefaultObjectEventLoop | ( | ) |
Return a default context for other uses.
QI_API_DEPRECATED EventLoop* qi::getDefaultThreadPoolEventLoop | ( | ) |
Return a default thread pool context.
EventLoop* qi::getEventLoop | ( | ) |
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 231 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 | ) |
|
inline |
void qi::sleepUntil | ( | const SteadyClockTimePoint & | t | ) |
|
inline |
void qi::sleepUntil | ( | const WallClockTimePoint & | t | ) |
|
inline |
void qi::startEventLoop | ( | int | nthread | ) |
Start the eventloop with nthread threads. No-op if already started.
|
inline |
|
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 238 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 249 of file future.hxx.
|
inline |