libyuni
Modules | Namespaces | Classes | Macros | Typedefs | Functions
Core
Collaboration diagram for Core:

Modules

 Container for values of any type.
 
 Atomic types
 
 Bit manipulation
 
 Color models
 
 Database Independent Abstraction Layer
 
 Dynamic Library
 
 Endianness
 
 Events
 
 Exceptions handling
 
 Functional
 
 Low-level routines for file and directory support
 
 Common mathematical operations and transformations
 
 Policies (policy-based programming)
 
 Threading support
 
 Units of measurement
 

Namespaces

 Yuni::Core::EventLoop
 Event loops.
 

Classes

class  Yuni::Dictionary< KeyT, ValueT >
 Class helper for defining ordered/unordered map. More...
 
class  Yuni::Set< KeyT >
 Class helper for defining ordered/unordered set. More...
 
class  Yuni::Core::EventLoop::IEventLoop< ParentT, FlowT, StatsT, DetachedT >
 A Synchronous Event Demultiplexer (Reactor pattern)This class handles requests (from any thread or process) from a single thread. It is designed to run code that can not be thread-safe, like calls to OpenGL or OpenAL routines. If those requests must be run from the main thread (e.g. OpenGL), the event loop must not be detached (see the template parameter 'DetachedT') and the method 'start()' must be executed from the main thread. More...
 
class  Yuni::GetOpt::Parser
 A command line options parser. More...
 
class  Yuni::CString< ChunkSizeT, ExpandableT >
 Character stringThe class manipulates and stores sequences of characters. More...
 
class  Yuni::Version
 Version number. More...
 

Macros

#define YUNI_FOREACH(var, container)
 foreach..else statement More...
 

Typedefs

typedef Dictionary< String, String >::Hash Yuni::KeyValueStore
 Convenient typedef for a key/value store.
 

Functions

void Yuni::Suspend (uint seconds)
 Suspend thread execution for an interval measured in seconds. More...
 
void Yuni::SuspendMilliSeconds (uint milliseconds)
 Suspend thread execution for an interval measured in milliseconds. More...
 

Detailed Description

Macro Definition Documentation

◆ YUNI_FOREACH

#define YUNI_FOREACH (   var,
  container 
)
Value:
for (bool YUNI_JOIN(yn_continue_, __LINE__) = true; YUNI_JOIN(yn_continue_, __LINE__); ) \
for (auto& YUNI_JOIN(yn_list_, __LINE__) = (container); YUNI_JOIN(yn_continue_, __LINE__); YUNI_JOIN(yn_continue_, __LINE__) = false) \
if (YUNI_JOIN(yn_list_, __LINE__).size() > 0) \
for (auto _yn_each_it = YUNI_JOIN(yn_list_, __LINE__).begin(); YUNI_JOIN(yn_continue_, __LINE__); YUNI_JOIN(yn_continue_, __LINE__) = false) \
for (bool _foreach_continue = true; _foreach_continue && _yn_each_it != YUNI_JOIN(yn_list_, __LINE__).end(); ++_yn_each_it) \
for (var = *_yn_each_it; !(_foreach_continue = !_foreach_continue); _foreach_continue = false) \
/* else statement [optional] */

foreach..else statement

std::vector<int> list;
list.push_back(2);
list.push_back(3);
foreach (int i, list)
std::cout << i << std::endl;
std::vector<int> list; // empty list
foreach (int i, list)
std::cout << "got " << i << std::endl;
else
std::cout << "got nothing" << std::endl;
Note
C++11 is required (auto keyword)

Function Documentation

◆ Suspend()

YUNI_DECL void Yuni::Suspend ( uint  seconds)

Suspend thread execution for an interval measured in seconds.

Parameters
secondsNumber of seconds to wait
Note
You should consider that this method can not be interrupted. You should not use this routine when using the thread facility provided by the Yuni library and you should prefer the method suspend() instead.
See also
Yuni::Threads::AThread::suspend()

◆ SuspendMilliSeconds()

YUNI_DECL void Yuni::SuspendMilliSeconds ( uint  milliseconds)

Suspend thread execution for an interval measured in milliseconds.

Parameters
millisecondsNUmber of milliseconds to wait
Note
You should consider that this method can not be interrupted. You should not use this routine when using the thread facility provided by the Yuni library and you should prefer the method suspend() instead.