Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
Namespaces | |
array | |
avl | |
block | |
checksum | |
color | |
concept | |
dtd | |
dyndata | |
genstruct | |
imm | |
inhstruct | |
ini | |
intern | |
io | |
json | |
log | |
meta | |
net | |
option | |
rtti | |
serial2 | |
stree | |
sys | |
t | |
utf16 | |
utf8 | |
variant | |
win | |
xom | |
Typedefs | |
typedef DefaultAllocatorDelegate | DefaultAlloc |
typedef CString | cstring |
typedef String | string |
typedef elm::sys::Path | Path |
typedef struct elm::default_t | default_t |
typedef elm::type_t | type_t |
typedef enum elm::error_level_t | error_level_t |
typedef xom::String | xstring |
typedef WAHVector::word_t | word_t |
Enumerations | |
enum | error_level_t { level_none = 0, level_info, level_warning, level_error, level_fatal } |
Functions | |
void | crash (void) |
template<class T > | |
const T & | min (const T &x, const T &y) |
template<class T , class C > | |
const T & | min (const T &x, const T &y, const C &c=single< C >()) |
template<class T > | |
const T & | max (const T &x, const T &y) |
template<class T , class C > | |
const T & | max (const T &x, const T &y, const C &c=single< C >()) |
template<class C > | |
C::t | min (const C &c) |
template<class C , class CC > | |
C::t | min (const C &c, const CC &cc) |
template<class C > | |
C::t | max (const C &c) |
template<class T > | |
Array< T > | _array (int n, T t[]) |
template<class T , class E , class A > | |
bool | operator<= (const T &v, const FragTable< T, E, A > &t) |
template<class K , class T , class M > | |
bool | operator<= (const T &v, const ListMap< K, T, M > &m) |
template<class T , class M > | |
bool | operator<= (const T &val, const ListSet< T, M > &set) |
template<class A , class C = Comparator<typename A::t>> | |
void | quicksort (A &array, const C &c=Comparator< typename A::t >()) |
template<class I > | |
Range< I > | range (const I &begin, const I &end) |
template<class C > | |
Slice< C > | slice (C &a, int fst, int cnt) |
template<class C , class P > | |
int | count (const C &c, const P &p) |
template<class C , class P > | |
bool | forall (const C &c, const P &p) |
template<class C , class P > | |
bool | exists (const C &c, const P &p) |
template<class C , class P > | |
C::Iter | find (const C &c, const P &p) |
template<class C , class F , class D > | |
void | map (const C &c, const F &f, D &d) |
template<class C , class F > | |
void | iter (const C &c, const F &f) |
template<class C , class F , class T > | |
T | fold (const C &c, const F &f, T t) |
template<class C1 , class C2 > | |
bool | equals (const C1 &c1, const C2 &c2) |
template<class C1 , class C2 > | |
Pair< typename C1::Iter, typename C2::Iter > | mismatch (const C1 &c1, const C2 &c2) |
template<class C1 , class C2 , class P > | |
Pair< typename C1::Iter, typename C2::Iter > | mismatch (const C1 &c1, const C2 &c2, P p) |
template<class C > | |
void | deleteAll (const C &c) |
template<class C > | |
C::t | sum (const C &c) |
template<class C > | |
C::t | product (const C &c) |
template<class C > | |
void | fill (C &c, int n, const typename C::t v=type_info< typename C::t >::null) |
template<class T > | |
NumRange< T > | nrange (T i, T j, T s=1) |
template<class I , class P > | |
SelectIter< I, P > | select_iter (const I &i, const P &p) |
template<class C , class P > | |
Range< SelectIter< typename C::Iter, P > > | select (const C &c, const P &p) |
template<class I > | |
Iterable< I > | subiter (const I &b, const I &e) |
void | trace (CString file, int line, CString fun) |
template<class T > | |
T | elm_spy (cstring comment, T value) |
t::hash | hash_string (const char *chars, int length) |
t::hash | hash_cstring (const char *chars) |
t::hash | hash_jenkins (const void *block, int size) |
t::hash | hash_ptr (const void *p) |
bool | hash_equals (const void *p1, const void *p2, int size) |
template<class T > | |
t::hash | hash (const T &x) |
int | ones (t::uint8 i) |
int | countOnes (t::uint16 i) |
int | countOnes (t::uint32 i) |
int | countOnes (t::uint64 i) |
int | msb (t::uint32 i) |
int | msb (t::int32 i) |
int | msb (t::uint64 i) |
int | msb (t::int64 i) |
t::uint32 | leastUpperPowerOf2 (t::uint32 v) |
t::uint64 | leastUpperPowerOf2 (t::uint64 v) |
t::uint32 | abs (t::int32 v) |
t::uint64 | abs (t::int64 v) |
t::uint32 | roundup (t::uint32 v, t::uint32 m) |
t::uint32 | rounddown (t::uint32 v, t::uint32 m) |
t::uint32 | mult (t::uint32 a, t::uint32, bool &over) |
t::uint64 | mult (t::uint64 a, t::uint64, bool &over) |
int | ones (t::uint16 i) |
int | ones (t::uint32 i) |
int | ones (t::uint64 i) |
template<class T > | |
const rtti::Type & | type_of (void) |
template<class T > | |
const rtti::Type & | type_of (const T &v) |
template<class T > | |
const rtti::Type & | template_of (void) |
template<class T > | |
const rtti::Type & | template_of (const T &v) |
template<class T > | |
Field< T > | field (CString name, T &value) |
template<class T > | |
DefaultField< T > | field (CString name, T &value, const T &def) |
template<class T > | |
DefaultField< T > | field (CString name, const T &value, const T &def) |
CString | _unqualify (CString name) |
template<class T > | |
AutoString & | operator<< (CString str, const T &value) |
template<class T > | |
AutoString & | operator<< (const String &str, const T &value) |
template<class T > | |
io::StringInput | operator>> (const string &str, T &val) |
template<class T > | |
io::StringInput | operator>> (cstring str, T &val) |
cstring | cstr (const char *s) |
string | str (const char *s) |
bool | operator== (const CString &s1, const CString &s2) |
bool | operator!= (const CString &s1, const CString &s2) |
bool | operator< (const CString s1, const CString s2) |
bool | operator<= (const CString s1, const CString s2) |
bool | operator> (const CString s1, const CString s2) |
bool | operator>= (const CString s1, const CString s2) |
bool | operator== (const String &s1, const CString s2) |
bool | operator!= (const String &s1, const CString s2) |
bool | operator< (const String &s1, const CString s2) |
bool | operator<= (const String &s1, const CString s2) |
bool | operator> (const String &s1, const CString s2) |
bool | operator>= (const String &s1, const CString s2) |
bool | operator== (const String &s1, const String &s2) |
bool | operator!= (const String &s1, const String &s2) |
bool | operator< (const String &s1, const String &s2) |
bool | operator<= (const String &s1, const String &s2) |
bool | operator> (const String &s1, const String &s2) |
bool | operator>= (const String &s1, const String &s2) |
bool | operator== (const CString s1, const String &s2) |
bool | operator!= (const CString s1, const String &s2) |
bool | operator< (const CString s1, const String &s2) |
bool | operator<= (const CString s1, const String &s2) |
bool | operator> (const CString s1, const String &s2) |
bool | operator>= (const CString s1, const String &s2) |
bool | operator== (const String &s1, const char *s2) |
bool | operator!= (const String &s1, const char *s2) |
bool | operator< (const String &s1, const char *s2) |
bool | operator<= (const String &s1, const char *s2) |
bool | operator> (const String &s1, const char *s2) |
bool | operator>= (const String &s1, const char *s2) |
bool | operator== (const CString s1, const char *s2) |
bool | operator!= (const CString s1, const char *s2) |
bool | operator< (const CString s1, const char *s2) |
bool | operator<= (const CString s1, const char *s2) |
bool | operator> (const CString s1, const char *s2) |
bool | operator>= (const CString s1, const char *s2) |
bool | operator== (const char *s1, const CString s2) |
bool | operator!= (const char *s1, const CString s2) |
bool | operator< (const char *s1, const CString s2) |
bool | operator<= (const char *s1, const CString s2) |
bool | operator> (const char *s1, const CString s2) |
bool | operator>= (const char *s1, const CString s2) |
bool | operator== (const char *s1, const String &s2) |
bool | operator!= (const char *s1, const String &s2) |
bool | operator< (const char *s1, const String &s2) |
bool | operator<= (const char *s1, const String &s2) |
bool | operator> (const char *s1, const String &s2) |
bool | operator>= (const char *s1, const String &s2) |
String | operator+ (const CString &s1, const CString &s2) |
String | operator+ (const CString &s1, const char *s2) |
String | operator+ (const CString s1, const String &s2) |
String | operator+ (const cstring &s, char c) |
String | operator+ (const String &s1, const CString s2) |
String | operator+ (const String &s1, const char *s2) |
String | operator+ (const String &s1, const String &s2) |
String | operator+ (const string &s, char c) |
String | operator+ (const char *s1, const CString s2) |
String | operator+ (const char *s1, const String &s2) |
String | operator+ (char c, const cstring s) |
String | operator+ (char c, const String &s) |
template<class T > | |
T & | single (void) |
template<class T > | |
T * | null (void) |
io::Output & | operator<< (io::Output &out, const BitVector &bvec) |
template<class T > | |
void | swap (T &x, T &y) |
template<class T > | |
Option< T > | some (const T &val) |
template<class T1 , class T2 > | |
Pair< T1, T2 > | pair (const T1 &v1, const T2 &v2) |
template<class T1 , class T2 > | |
io::Output & | operator<< (io::Output &out, const Pair< T1, T2 > &p) |
template<class T1 , class T2 > | |
RefPair< T1, T2 > | let (T1 &v1, T2 &v2) |
template<class T1 , class T2 > | |
io::Input & | operator>> (io::Input &in, Pair< T1, T2 > &p) |
template<class T > | |
Output & | operator<< (Output &out, const Ref< T > &ref) |
io::Output & | operator<< (io::Output &out, const Time &t) |
template<class T > | |
UniquePtr< T > | unique (T *p) |
io::Output & | operator<< (io::Output &out, const Version &version) |
io::Output & | operator<< (io::Output &out, const WAHVector &v) |
static void | handle_SIGSEGV (int sig, siginfo_t *info, void *context) |
static void | handle_SIGILL (int sig, siginfo_t *info, void *context) |
static void | handle_SIGABRT (int sig, siginfo_t *info, void *context) |
static void | handle_SIGFPE (int sig, siginfo_t *info, void *context) |
static void | handle_SIGINT (int sig, siginfo_t *info, void *context) |
static bool | is (unsigned char c, t::uint64 set[]) |
STRONG_TYPE (inode_t, ino_t) | |
io::Output | cout (buf_out) |
io::Output | cerr (buf_err) |
bool | isFill (word_t w) |
bool | isLite (word_t w) |
bool | isOnes (word_t w) |
bool | isZeroes (word_t w) |
word_t | fillCount (word_t w) |
word_t | mask (int n) |
word_t | lite (word_t w) |
word_t | fill (int size, bool init) |
int | times (int v) |
int | div (int v) |
int | mod (int v) |
Variables | |
io::Output | cout |
io::Output | cerr |
io::Input | cin |
io::Monitor | monitor |
AutoStringStartup | autostr |
AutoStringStartup & | _ = autostr |
const OptionalNone | none = OptionalNone() |
static t::uint64 | bin_set [] = { 0x3000000000000, 0x00000000, 0x00000000, 0x00000000 } |
static t::uint64 | dec_set [] = { 0x3ff000000000000, 0x00000000, 0x00000000, 0x00000000 } |
static t::uint64 | hex_set [] = { 0x3ff000000000000, 0x7e0000007e, 0x00000000, 0x00000000 } |
static t::uint64 | space_set [] = { 0x100002e00, 0x00000000, 0x00000000, 0x00000000 } |
static t::uint64 | letter_set [] = { 0x00000000, 0x7fffffe07fffffe, 0x00000000, 0x00000000 } |
static t::uint64 | lower_set [] = { 0x00000000, 0x7fffffe00000000, 0x00000000, 0x00000000 } |
static t::uint64 | upper_set [] = { 0x00000000, 0x07fffffe, 0x00000000, 0x00000000 } |
static HashMap< inode_t, sys::FileItem * > * | files = 0 |
static io::BufferedOutStream | buf_out (io::out) |
static io::BufferedOutStream | buf_err (io::err) |
static NoInfoHandler | NO_INFO_HANDLER |
static QuietHandler | QUIET_HANDLER |
static const word_t | FILL = 0x80000000 |
static const word_t | ONES = 0x40000000 |
static const word_t | ALL_ONES = 0x7fffffff |
static const word_t | ALL_ZEROES = 0x00000000 |
static int | WORD_SIZE = 31 |
typedef struct elm::default_t default_t |
typedef DefaultAllocatorDelegate DefaultAlloc |
typedef enum elm::error_level_t error_level_t |
typedef elm::sys::Path Path |
typedef elm::type_t type_t |
typedef WAHVector::word_t word_t |
typedef xom::String xstring |
enum error_level_t |
References CString::lastIndexOf(), and CString::substring().
|
inline |
References ones().
Referenced by ones(), rounddown(), and roundup().
@degroup debug Debugging Support
ELM provides several facilities to debug your own application.
crash
Automatic Crash Support
As it is a tedious task to restart a program from a debugger after a crash, ELM provides CrashHandler class to associate an action with such an event.
Basically, the behavior of this handler depends on the configuration of the environment. Two environment variable are taken in account :
The used handler depends on the configuration of the ELM library. The handler to use is defined by the CRASH_HANDLER definition variable and may be changed in the config.h file at the source root of ELM. As a defaut, the GDBCrashHandler::DEFAULT handler is used on Unix systems. For the time being, there is no other crash handler but the user may provide its own crash handler by calling the method CrashHandler::set().
The GDBCrashHandler invokes the GDB debugger on the current process when a crash arises.
debug_helper
Debug Helper Macros
These macros help obtaining log during debugging phase. They are all de-activated as soon as the macro NDEBUG is defined (as for standard C assert macro).
References CrashHandler::crash().
|
inline |
|
inline |
Referenced by WAHVector::clear(), mod(), WAHVector::set(), and WAHVector::WAHVector().
|
inline |
References cerr, and elm::io::endl.
|
inline |
|
inline |
Referenced by builder::pushFill().
|
inline |
References elm::io::p().
References CrashHandler::crash().
Referenced by CrashHandler::setup().
References CrashHandler::crash().
Referenced by CrashHandler::setup().
References CrashHandler::crash().
Referenced by CrashHandler::setup().
References CrashHandler::crash().
Referenced by CrashHandler::setup().
References CrashHandler::crash().
Referenced by CrashHandler::setup().
Perform hashing of the given pointer. Currently, it removes bits of current OS alignments constrains.
p | Pointer to hash. |
References elm::io::p().
Referenced by HashKey< T * >::hash(), and HashKey< const T * >::hash().
Referenced by Char::isBin(), Char::isDec(), Char::isHex(), Char::isLetter(), Char::isLowerCase(), Char::isSpace(), Char::isUpperCase(), and Set< T, C >::meet().
References FILL.
Referenced by builder::fix().
References ONES.
Referenced by builder::fix(), and WAHVector::isFull().
References ONES.
Referenced by builder::fix(), and WAHVector::isEmpty().
|
inline |
Referenced by WAHVector::clear(), builder::fix(), and WAHVector::set().
|
inline |
Referenced by WAHVector::countOnes(), and builder::fix().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
References div(), and times().
Referenced by WAHVector::bit(), WAHVector::clear(), System::getUnitPath(), and WAHVector::set().
NumRange< T > nrange | ( | T | i, |
T | j, | ||
T | s = 1 |
||
) |
Creates a range over a numeric domain spanning from i to j using a step of s.
i | Lower bound of the range (inclusive). |
j | Upper bound of the range (inclusive). |
s | Step in the range. |
References CString::compare().
References String::compare().
References CString::compare().
References CString::compare().
References String::compare().
References String::compare().
References String::compare().
References String::compare().
References CString::concat().
References CString::concat().
References CString::concat().
References CString::concat().
References CString::concat().
References CString::concat().
References CString::concat().
References CString::concat().
References CString::compare().
References String::compare().
References CString::compare().
References CString::compare().
References String::compare().
References String::compare().
References String::compare().
References String::compare().
|
inline |
|
inline |
|
inline |
References BitVector::print().
io::Output& elm::operator<< | ( | io::Output & | out, |
const Pair< T1, T2 > & | p | ||
) |
References elm::io::p().
io::Output & operator<< | ( | io::Output & | out, |
const Time & | t | ||
) |
Display a time.
out | Output stream to use. |
t | Time to display. |
References Time::ONE_D, Time::ONE_H, Time::ONE_M, Time::ONE_MS, Time::ONE_S, Time::ONE_Y, and Time::time().
io::Output & operator<< | ( | io::Output & | out, |
const Version & | version | ||
) |
References Version::major(), Version::minor(), and Version::release().
|
inline |
References WAHVector::__dump().
References elm::io::out, and elm::t::ref().
References CString::compare().
References String::compare().
References CString::compare().
References CString::compare().
References String::compare().
References String::compare().
References String::compare().
References String::compare().
References FragTable< T, E, A >::contains().
References CString::compare().
References String::compare().
References CString::compare().
Referenced by AbstractAttribute::operator!=(), and Element::operator!=().
References CString::compare().
References String::compare().
References String::compare().
References String::compare().
References String::compare().
References CString::compare().
References String::compare().
References CString::compare().
References CString::compare().
References String::compare().
References String::compare().
References String::compare().
References String::compare().
References CString::compare().
References String::compare().
References CString::compare().
References CString::compare().
References String::compare().
References String::compare().
References String::compare().
References String::compare().
|
inline |
References str().
|
inline |
References str().
References elm::io::p().
|
inline |
Referenced by SegmentBuilder< K, T, C >::add(), HashMap< elm::CString, void * >::add(), HashMap< elm::CString, void * >::fetch(), XOMUnserializer::flush(), TreeMap< K, T, C, E, A >::get(), mismatch(), TextSerializer::onPointer(), XOMElementSerializer::onPointer(), XOMUnserializer::onPointer(), Pair< const elm::rtti::Type *, const void * >::operator!=(), Pair< const elm::rtti::Type *, const void * >::operator=(), Pair< const elm::rtti::Type *, const void * >::operator==(), Pair< const elm::rtti::Type *, const void * >::operator>(), Pair< const elm::rtti::Type *, const void * >::operator>=(), System::pipe(), AbstractTree::Stack::push(), ListMap< string, Section * >::put(), HashMap< elm::CString, void * >::put(), TreeMap< K, T, C, E, A >::remove(), and EnumOption< T >::Make::val().
|
inline |
Creates a range over items of collection c that satisfies the predicate p.
c | Collection to select items in. |
p | Predicate to select items of c. |
References elm::io::p(), range(), and select_iter().
|
inline |
References elm::io::p().
Referenced by select().
Slice<C> elm::slice | ( | C & | a, |
int | fst, | ||
int | cnt | ||
) |
|
inline |
This function makes easier the construction of optional value with an available value.
Referenced by HashMap< elm::CString, void * >::get(), Map< Pair< K, K >, T, segment_comparator_t >::get(), ListMap< string, Section * >::get(), HashMap< elm::CString, void * >::get_const(), and Element::getAttributeValue().
|
inline |
Referenced by BlockInStream::BlockInStream(), CString::compare(), String::compare(), CString::concat(), String::concat(), CString::endsWith(), String::endsWith(), String::lastIndexOf(), String::make(), StringFormat::operator()(), Fletcher::operator<<(), MD5::operator<<(), elm::xom::operator<<(), AutoStringStartup::operator<<(), operator<<(), CString::operator=(), String::operator=(), Path::operator=(), operator>>(), Output::print(), Fletcher::put(), MD5::put(), BufferedInStream::setStream(), BufferedOutStream::setStream(), CString::startsWith(), String::startsWith(), String::String(), Input::swallow(), and Saver::write().
elm::STRONG_TYPE | ( | inode_t | , |
ino_t | |||
) |
Iterable<I> elm::subiter | ( | const I & | b, |
const I & | e | ||
) |
Referenced by HashMap< elm::CString, void * >::keys(), TreeMap< K, T, C, E, A >::keys(), ListMap< string, Section * >::keys(), Map< Pair< K, K >, T, segment_comparator_t >::keys(), HashMap< elm::CString, void * >::pairs(), ListMap< string, Section * >::pairs(), TreeMap< K, T, C, E, A >::pairs(), and Map< Pair< K, K >, T, segment_comparator_t >::pairs().
void elm::swap | ( | T & | x, |
T & | y | ||
) |
Referenced by quicksort(), and elm::array::reverse().
|
inline |
|
inline |
|
inline |
Referenced by iter::consume(), WAHVector::countOnes(), mod(), and WAHVector::size().
References cerr, and Output::flush().
|
inline |
References _type< T >::_().
UniquePtr<T> elm::unique | ( | T * | p | ) |
References elm::io::p().
|
static |
Referenced by builder::pushLite().
|
static |
|
static |
Referenced by Char::isBin().
|
static |
|
static |
|
static |
Referenced by Char::isDec().
|
static |
Referenced by FileItem::get(), and FileItem::~FileItem().
|
static |
Referenced by fill(), fillCount(), isFill(), isLite(), builder::push(), and builder::pushFill().
|
static |
Referenced by Char::isHex().
|
static |
Referenced by Char::isLetter().
|
static |
Referenced by Char::isLowerCase().
io::Monitor monitor |
|
static |
const OptionalNone none = OptionalNone() |
This special value cause the construction of an optional value without value available.
Referenced by HashMap< elm::CString, void * >::get(), TreeMap< K, T, C, E, A >::get(), Map< Pair< K, K >, T, segment_comparator_t >::get(), ListMap< string, Section * >::get(), HashMap< elm::CString, void * >::get_const(), and Element::getAttributeValue().
|
static |
Referenced by fill(), fillCount(), isOnes(), isZeroes(), and builder::pushFill().
|
static |
|
static |
Referenced by Char::isSpace().
|
static |
Referenced by Char::isUpperCase().
|
static |