Equalizer base abstraction layer. More...
Classes | |
class | Atomic |
An variable with atomic operations. More... | |
class | Buffer |
A simple memory buffer with some helper functions. More... | |
class | Clock |
A class for time measurements. More... | |
class | Condition |
A condition variable and associated lock. More... | |
class | DSO |
Helper to access dynamic shared objects (DSO) More... | |
class | ErrorRegistry |
A registry translating error codes to strings. More... | |
class | ExecutionListener |
A listener interface to monitor execution unit (Thread, Process) state changes. More... | |
class | Global |
Global parameter handling for the Equalizer base library. More... | |
class | PtrHash |
A hash for pointer keys. More... | |
struct | hashRefPtr |
A hash function for RefPtr keys. More... | |
class | RefPtrHash |
A hash for RefPtr keys. More... | |
class | Launcher |
The launcher executes a command from a separate process. More... | |
class | LFQueue |
A thread-safe, lock-free queue with non-blocking access. More... | |
class | Lock |
A lock (mutex) primitive. More... | |
class | Lockable |
A convenience structure to hold data together with a lock for access. More... | |
class | LogBuffer |
The string buffer used for logging. More... | |
class | Log |
The logging class. More... | |
class | MemoryMap |
Helper to map a file to a memory address (mmap) More... | |
class | Monitor |
A monitor primitive. More... | |
class | MTQueue |
A thread-safe queue with a blocking read access. More... | |
class | NonCopyable |
Base class to make objects non-copyable. More... | |
class | OMP |
Base class for OpenMP functionality. More... | |
class | PerThread |
Implements thread-specific storage for C++ objects. More... | |
class | PerThreadRef |
Thread-specific storage for a RefPtr. More... | |
class | PluginRegistry |
The registry for all loaded Equalizer plugins. More... | |
class | Pool |
An object allocation pool. More... | |
class | Referenced |
Base class for referenced objects. More... | |
class | RefPtr |
A smart reference pointer. More... | |
class | RequestHandler |
A thread-safe request handler. More... | |
class | RNG |
A random number generator. More... | |
class | ScopedMutex |
A scoped mutex. More... | |
class | SpinLock |
A fast lock for uncontended memory access. More... | |
class | Thread |
An utility class to execute code in a separate execution thread. More... | |
class | ThreadID |
An utility class to wrap OS-specific thread identifiers. More... | |
class | TimedLock |
A mutex with timeout capabilities. More... | |
class | uint128_t |
A base type for 128 bit unsigned integer values. More... | |
class | UUID |
Provides a universally unique identifier. More... | |
class | UUIDHash |
A hash for UUID keys. More... | |
Functions | |
int64_t | getIndexOfLastBit (uint32_t value) |
void | abort () |
Used to trap into an infinite loop to allow debugging of assertions. | |
void | checkHeap () |
Check the consistency of the heap and abort on error (Win32 only). | |
std::ostream & | sysError (std::ostream &os) |
Print a textual description of the current system error. | |
std::ostream & | backtrace (std::ostream &os) |
Print the current call stack. | |
template<class T > | |
std::string | className (T *object) |
Print the RTTI name of the given class. | |
std::ostream & | operator<< (std::ostream &os, const Error &error) |
Print the error in a human-readable format. | |
Strings | searchDirectory (const std::string directory, const std::string pattern) |
Retrieve a list of files in a directory matching a pattern. | |
std::string | getFilename (const std::string &filename) |
std::string | getDirname (const std::string &filename) |
bool | init (const int argc, char **argv) |
Initialize the Equalizer base classes. | |
bool | exit () |
De-initialize the Equalizer base classes. | |
template<class D , class L > | |
std::ostream & | operator<< (std::ostream &os, const Lockable< D, L > &l) |
Print the data to the given output stream. | |
std::ostream & | indent (std::ostream &os) |
Increases the indentation level of the Log stream, causing subsequent lines to be intended by four characters. | |
std::ostream & | exdent (std::ostream &os) |
Decrease the indent of the Log stream. | |
std::ostream & | disableFlush (std::ostream &os) |
Disable flushing of the Log stream. | |
std::ostream & | enableFlush (std::ostream &os) |
Re-enable flushing of the Log stream. | |
std::ostream & | forceFlush (std::ostream &os) |
Flush the Log stream regardless of the auto-flush state. | |
std::ostream & | disableHeader (std::ostream &os) |
Disable printing of the Log header for subsequent lines. | |
std::ostream & | enableHeader (std::ostream &os) |
Re-enable printing of the Log header. | |
template<typename T > | |
std::ostream & | operator<< (std::ostream &os, const Monitor< T > &monitor) |
Print the monitor to the given output stream. | |
template<class T > | |
std::ostream & | operator<< (std::ostream &os, const RefPtr< T > &rp) |
Print the reference pointer to the given output stream. | |
template<class T > | |
std::string | className (const RefPtr< T > &rp) |
std::ostream & | operator<< (std::ostream &, const RequestHandler &) |
void | sleep (const uint32_t milliSeconds) |
Sleep the current thread for a number of milliseconds. | |
std::ostream & | operator<< (std::ostream &os, const Thread *thread) |
Print the thread to the given output stream. | |
std::ostream & | operator<< (std::ostream &, const ThreadID &) |
Print the thread to the given output stream. | |
std::ostream & | operator<< (std::ostream &os, const uint128_t &id) |
ostream operator for 128 bit unsigned integers. | |
uint128_t | operator+ (const uint128_t &a, const uint64_t &b) |
Add a 64 bit value to a 128 bit value. | |
uint128_t | operator- (const uint128_t &a, const uint64_t &b) |
Substract a 64 bit value from a 128 bit value. | |
Typedefs | |
typedef Atomic< long long > | a_int64_t |
typedef Atomic< long > | a_int32_t |
typedef Atomic< bool > | a_bool_t |
typedef Buffer< uint8_t > | Bufferb |
typedef Monitor< bool > | Monitorb |
typedef Monitor< uint32_t > | Monitoru |
typedef std::vector< std::string > | Strings |
A vector of std::strings. | |
typedef std::vector < CompressorInfo > | CompressorInfos |
typedef std::vector< const CompressorInfo * > | CompressorInfoPtrs |
typedef std::vector< Plugin * > | Plugins |
Enumerations | |
enum | Error { ERROR_NONE = 0, ERROR_CUSTOM = EQ_32KB } |
Defines errors produced by Equalizer classes. More... | |
enum | LogLevel { LOG_ERROR = 1, LOG_WARN, LOG_INFO, LOG_VERB, LOG_ALL } |
The logging levels. More... | |
enum | LogTopic { LOG_PLUGIN = 0x1, LOG_CUSTOM = 0x10, LOG_ANY = 0xffffu } |
The logging topics. More... |
Equalizer base abstraction layer.
The eq::base namespace provides C++ classes to abstract the underlying operating system and implements common helper functionality. Classes with non-virtual destructors are not intended to be subclassed.
std::ostream& eq::base::backtrace | ( | std::ostream & | os ) |
Print the current call stack.
May not be implemented on all platforms.
Referenced by eq::base::Referenced::ref().
std::string eq::base::className | ( | T * | object ) | [inline] |
Print the RTTI name of the given class.
Definition at line 65 of file debug.h.
Referenced by eq::base::PerThread< T >::operator*(), and eq::base::Referenced::ref().
std::ostream& eq::base::disableFlush | ( | std::ostream & | os ) |
Disable flushing of the Log stream.
Referenced by operator<<().
std::ostream& eq::base::disableHeader | ( | std::ostream & | os ) |
Disable printing of the Log header for subsequent lines.
std::ostream& eq::base::enableFlush | ( | std::ostream & | os ) |
Re-enable flushing of the Log stream.
Referenced by operator<<().
std::ostream& eq::base::enableHeader | ( | std::ostream & | os ) |
Re-enable printing of the Log header.
std::ostream& eq::base::exdent | ( | std::ostream & | os ) |
Decrease the indent of the Log stream.
bool eq::base::exit | ( | ) |
De-initialize the Equalizer base classes.
true
if the library was successfully de-initialised, false
otherwise. std::ostream& eq::base::forceFlush | ( | std::ostream & | os ) |
Flush the Log stream regardless of the auto-flush state.
std::string eq::base::getDirname | ( | const std::string & | filename ) | [inline] |
std::string eq::base::getFilename | ( | const std::string & | filename ) | [inline] |
int64_t eq::base::getIndexOfLastBit | ( | uint32_t | value ) | [inline] |
Definition at line 28 of file bitOperation.h.
Referenced by eqPly::Channel::frameAssemble(), eqPly::Channel::frameClear(), eqPly::Channel::frameDraw(), and eqPly::Channel::frameViewFinish().
std::ostream& eq::base::indent | ( | std::ostream & | os ) |
Increases the indentation level of the Log stream, causing subsequent lines to be intended by four characters.
bool eq::base::init | ( | const int | argc, |
char ** | argv | ||
) |
Initialize the Equalizer base classes.
If the command line parameter '--eq-logfile <filename>' is present, all log output is redirected to the given file.
argc | the command line argument count. |
argv | the command line argument values. |
uint128_t eq::base::operator+ | ( | const uint128_t & | a, |
const uint64_t & | b | ||
) | [inline] |
Add a 64 bit value to a 128 bit value.
Definition at line 183 of file uint128_t.h.
References eq::base::uint128_t::high(), and eq::base::uint128_t::low().
uint128_t eq::base::operator- | ( | const uint128_t & | a, |
const uint64_t & | b | ||
) | [inline] |
Substract a 64 bit value from a 128 bit value.
Definition at line 193 of file uint128_t.h.
References eq::base::uint128_t::high(), and eq::base::uint128_t::low().
std::ostream& eq::base::operator<< | ( | std::ostream & | os, |
const Lockable< D, L > & | l | ||
) | [inline] |
Print the data to the given output stream.
Definition at line 60 of file lockable.h.
References disableFlush(), and enableFlush().
std::ostream& eq::base::operator<< | ( | std::ostream & | , |
const ThreadID & | |||
) |
Print the thread to the given output stream.
std::ostream& eq::base::operator<< | ( | std::ostream & | os, |
const Thread * | thread | ||
) |
Print the thread to the given output stream.
std::ostream& eq::base::operator<< | ( | std::ostream & | os, |
const uint128_t & | id | ||
) | [inline] |
ostream operator for 128 bit unsigned integers.
Definition at line 176 of file uint128_t.h.
std::ostream& eq::base::operator<< | ( | std::ostream & | os, |
const Monitor< T > & | monitor | ||
) | [inline] |
Print the monitor to the given output stream.
Definition at line 234 of file monitor.h.
References eq::base::Monitor< T >::get().
std::ostream& eq::base::operator<< | ( | std::ostream & | os, |
const Error & | error | ||
) |
Print the error in a human-readable format.
std::ostream& eq::base::operator<< | ( | std::ostream & | os, |
const RefPtr< T > & | rp | ||
) | [inline] |
Print the reference pointer to the given output stream.
Definition at line 183 of file refPtr.h.
References disableFlush(), and enableFlush().
Strings eq::base::searchDirectory | ( | const std::string | directory, |
const std::string | pattern | ||
) | [inline] |
void eq::base::sleep | ( | const uint32_t | milliSeconds ) | [inline] |
std::ostream& eq::base::sysError | ( | std::ostream & | os ) |
Print a textual description of the current system error.
The current system error is OS-specific, e.g., errno or GetLastError().
Referenced by eq::base::RNG::get(), and Tracker::init().
typedef std::vector< std::string > eq::base::Strings |
enum eq::base::Error |
Defines errors produced by Equalizer classes.
Definition at line 29 of file include/co/base/error.h.
enum eq::base::LogLevel |
The logging levels.
LOG_ERROR |
Output critical errors. |
LOG_WARN |
Output potentially critical warnings. |
LOG_INFO |
Output informational messages. |
LOG_VERB |
Be noisy. |
Definition at line 49 of file co/base/log.h.
enum eq::base::LogTopic |
The logging topics.
LOG_PLUGIN |
Plugin usage (1) |
LOG_CUSTOM |
Log topics for other namespaces start here. |
LOG_ANY |
Log all Equalizer topics. |
Definition at line 64 of file co/base/log.h.