Elm
1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
Namespaces | |
array | |
avl | |
block | |
checksum | |
color | |
concept | |
datastruct | |
genstruct | |
imm | |
inhstruct | |
ini | |
io | |
log | |
net | |
option | |
serial | |
serial2 | |
stree | |
sys | |
t | |
util | |
win | |
xom | |
Typedefs | |
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 elm::scalar_t | scalar_t |
typedef elm::ptr_t | ptr_t |
typedef elm::ref_t | ref_t |
typedef elm::enum_t | enum_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 > | |
const T & | max (const T &x, const T &y) |
void | trace (CString file, int line, CString fun) |
template<class T > | |
T | elm_spy (cstring comment, T value) |
int | msb (t::uint32 i) |
int | msb (t::int32 i) |
int | msb (t::uint64 i) |
int | msb (t::int64 i) |
int | ones (t::uint8 i) |
int | ones (t::uint16 i) |
int | ones (t::uint32 i) |
int | ones (t::uint64 i) |
t::uint32 | roundup (t::uint32 v, t::uint32 m) |
t::uint32 | rounddown (t::uint32 v, t::uint32 m) |
t::uint32 | abs (t::int32 v) |
t::uint32 | leastUpperPowerOf2 (t::uint32 v) |
t::uint64 | leastUpperPowerOf2 (t::uint64 v) |
t::uint32 | mult (t::uint32 a, t::uint32, bool &over) |
t::uint64 | mult (t::uint64 a, t::uint64, bool &over) |
value_t | value (CString name, int value) |
template<class T > | |
Field< T > | field (CString name, T &value) |
template<class T > | |
DefaultField< T > | field (CString name, 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) |
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 String &s1, const CString s2) |
String | operator+ (const String &s1, const char *s2) |
String | operator+ (const String &s1, const String &s2) |
String | operator+ (const char *s1, const CString s2) |
String | operator+ (const char *s1, const String &s2) |
io::Output & | operator<< (io::Output &out, const BitVector &bvec) |
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) |
bool | hash_equals (const void *p1, const void *p2, int size) |
template<class T > | |
void | swap (T &x, T &y) |
template<class T > | |
Option< T > | some (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, Pair< T1, T2 > &p) |
template<class T1 , class T2 > | |
RefPair< T1, T2 > | let (T1 &v1, T2 &v2) |
template<class T > | |
Output & | operator<< (Output &out, const Ref< T > &ref) |
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) |
io::Output | cout (io::out) |
io::Output | cerr (io::err) |
STRONG_TYPE (inode_t, ino_t) | |
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 genstruct::HashTable < inode_t, sys::FileItem * > * | files = 0 |
static BitCounter | bit_counter |
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 CString elm::cstring |
typedef struct elm::default_t elm::default_t |
typedef elm::enum_t elm::enum_t |
typedef enum elm::error_level_t elm::error_level_t |
typedef elm::sys::Path elm::Path |
typedef elm::ptr_t elm::ptr_t |
typedef elm::ref_t elm::ref_t |
typedef elm::scalar_t elm::scalar_t |
typedef String elm::string |
typedef elm::type_t elm::type_t |
typedef WAHVector::word_t elm::word_t |
typedef xom::String elm::xstring |
enum elm::error_level_t |
CString elm::_unqualify | ( | CString | name | ) |
References elm::CString::lastIndexOf(), and elm::CString::substring().
t::uint32 elm::abs | ( | t::int32 | v | ) |
Referenced by elm::io::Output::print().
void elm::crash | ( | void | ) |
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 elm::CrashHandler::crash().
int elm::div | ( | int | v | ) |
Referenced by elm::WAHVector::clear(), mod(), elm::WAHVector::set(), and elm::WAHVector::WAHVector().
T elm::elm_spy | ( | cstring | comment, |
T | value | ||
) |
References cerr, elm::io::endl, and value().
DefaultField<T> elm::field | ( | CString | name, |
T & | value, | ||
const T & | def | ||
) |
References value().
word_t elm::fill | ( | int | size, |
bool | init | ||
) |
Referenced by elm::WAHVector::clear(), elm::WAHVector::set(), and elm::WAHVector::WAHVector().
|
static |
References elm::CrashHandler::crash().
Referenced by elm::CrashHandler::setup().
|
static |
References elm::CrashHandler::crash().
Referenced by elm::CrashHandler::setup().
|
static |
References elm::CrashHandler::crash().
Referenced by elm::CrashHandler::setup().
|
static |
References elm::CrashHandler::crash().
Referenced by elm::CrashHandler::setup().
|
static |
References elm::CrashHandler::crash().
Referenced by elm::CrashHandler::setup().
t::hash elm::hash_cstring | ( | const char * | chars | ) |
Use a classical compiler string hashing algorithm (see "The Compilers" by Aho, Sethi, Ullman).
Referenced by elm::HashKey< CString >::hash().
bool elm::hash_equals | ( | const void * | p1, |
const void * | p2, | ||
int | size | ||
) |
Test equality of two memory blocks.
p1 | First memory block. |
p2 | Second memory block. |
size | Block size. |
Referenced by elm::HashKey< T >::equals(), elm::HashKey< const T & >::equals(), and elm::HashKey< T & >::equals().
t::hash elm::hash_jenkins | ( | const void * | block, |
int | size | ||
) |
Perform hashing according Jenkins approach (http://www.burtleburtle.net/bob/hash/doobs.html).
Referenced by elm::HashKey< T >::hash(), elm::HashKey< const T & >::hash(), and elm::HashKey< T & >::hash().
t::hash elm::hash_string | ( | const char * | chars, |
int | length | ||
) |
Use a classical compiler string hashing algorithm (see "The Compilers" by Aho, Sethi, Ullman).
Referenced by elm::HashKey< String >::hash().
bool elm::isFill | ( | word_t | w | ) |
References FILL.
bool elm::isLite | ( | word_t | w | ) |
References FILL.
bool elm::isOnes | ( | word_t | w | ) |
References ONES.
Referenced by elm::WAHVector::isFull().
bool elm::isZeroes | ( | word_t | w | ) |
References ONES.
Referenced by elm::WAHVector::isEmpty().
RefPair<T1, T2> elm::let | ( | T1 & | v1, |
T2 & | v2 | ||
) |
word_t elm::lite | ( | word_t | w | ) |
Referenced by elm::WAHVector::clear(), and elm::WAHVector::set().
word_t elm::mask | ( | int | n | ) |
Referenced by elm::WAHVector::countOnes().
const T& elm::max | ( | const T & | x, |
const T & | y | ||
) |
Referenced by elm::StackAllocator::allocate(), elm::io::Output::print(), and elm::genstruct::quicksort().
const T& elm::min | ( | const T & | x, |
const T & | y | ||
) |
Referenced by elm::WAHVector::includes(), and elm::checksum::MD5::put().
int elm::mod | ( | int | v | ) |
References div(), and times().
Referenced by elm::WAHVector::bit(), elm::WAHVector::clear(), elm::sys::System::getUnitPath(), and elm::WAHVector::set().
int elm::msb | ( | t::int32 | i | ) |
References msb().
int elm::msb | ( | t::int64 | i | ) |
References msb().
int elm::ones | ( | t::uint32 | i | ) |
Count the number of ones in the given word.
i | Word to count ones in. |
References ones().
bool elm::operator!= | ( | const CString & | s1, |
const CString & | s2 | ||
) |
References elm::CString::compare().
bool elm::operator!= | ( | const String & | s1, |
const CString | s2 | ||
) |
References elm::String::compare().
bool elm::operator!= | ( | const String & | s1, |
const String & | s2 | ||
) |
References elm::String::compare().
bool elm::operator!= | ( | const CString | s1, |
const String & | s2 | ||
) |
References elm::String::compare().
bool elm::operator!= | ( | const String & | s1, |
const char * | s2 | ||
) |
References elm::String::compare().
bool elm::operator!= | ( | const CString | s1, |
const char * | s2 | ||
) |
References elm::CString::compare().
bool elm::operator!= | ( | const char * | s1, |
const CString | s2 | ||
) |
References elm::CString::compare().
bool elm::operator!= | ( | const char * | s1, |
const String & | s2 | ||
) |
References elm::String::compare().
String elm::operator+ | ( | const CString | s1, |
const CString | s2 | ||
) |
References elm::CString::concat().
String elm::operator+ | ( | const CString | s1, |
const char * | s2 | ||
) |
References elm::CString::concat().
String elm::operator+ | ( | const CString | s1, |
const String & | s2 | ||
) |
References elm::CString::concat().
String elm::operator+ | ( | const String & | s1, |
const CString | s2 | ||
) |
String elm::operator+ | ( | const String & | s1, |
const char * | s2 | ||
) |
String elm::operator+ | ( | const String & | s1, |
const String & | s2 | ||
) |
String elm::operator+ | ( | const char * | s1, |
const CString | s2 | ||
) |
References elm::CString::concat().
String elm::operator+ | ( | const char * | s1, |
const String & | s2 | ||
) |
References elm::CString::concat().
bool elm::operator< | ( | const CString | s1, |
const CString | s2 | ||
) |
References elm::CString::compare().
bool elm::operator< | ( | const String & | s1, |
const CString | s2 | ||
) |
References elm::String::compare().
bool elm::operator< | ( | const String & | s1, |
const String & | s2 | ||
) |
References elm::String::compare().
bool elm::operator< | ( | const CString | s1, |
const String & | s2 | ||
) |
References elm::String::compare().
bool elm::operator< | ( | const String & | s1, |
const char * | s2 | ||
) |
References elm::String::compare().
bool elm::operator< | ( | const CString | s1, |
const char * | s2 | ||
) |
References elm::CString::compare().
bool elm::operator< | ( | const char * | s1, |
const CString | s2 | ||
) |
References elm::CString::compare().
bool elm::operator< | ( | const char * | s1, |
const String & | s2 | ||
) |
References elm::String::compare().
Output& elm::operator<< | ( | Output & | out, |
const Ref< T > & | ref | ||
) |
References elm::io::out.
io::Output& elm::operator<< | ( | io::Output & | out, |
Pair< T1, T2 > & | p | ||
) |
References elm::io::out.
io::Output & elm::operator<< | ( | io::Output & | out, |
const Version & | version | ||
) |
References elm::Version::major(), elm::Version::minor(), elm::io::out, and elm::Version::release().
AutoString& elm::operator<< | ( | CString | str, |
const T & | value | ||
) |
AutoString& elm::operator<< | ( | const String & | str, |
const T & | value | ||
) |
io::Output& elm::operator<< | ( | io::Output & | out, |
const WAHVector & | v | ||
) |
References elm::WAHVector::__dump(), and elm::io::out.
io::Output& elm::operator<< | ( | io::Output & | out, |
const BitVector & | bvec | ||
) |
References elm::io::out, and elm::BitVector::print().
bool elm::operator<= | ( | const CString | s1, |
const CString | s2 | ||
) |
References elm::CString::compare().
bool elm::operator<= | ( | const String & | s1, |
const CString | s2 | ||
) |
References elm::String::compare().
bool elm::operator<= | ( | const String & | s1, |
const String & | s2 | ||
) |
References elm::String::compare().
bool elm::operator<= | ( | const CString | s1, |
const String & | s2 | ||
) |
References elm::String::compare().
bool elm::operator<= | ( | const String & | s1, |
const char * | s2 | ||
) |
References elm::String::compare().
bool elm::operator<= | ( | const CString | s1, |
const char * | s2 | ||
) |
References elm::CString::compare().
bool elm::operator<= | ( | const char * | s1, |
const CString | s2 | ||
) |
References elm::CString::compare().
bool elm::operator<= | ( | const char * | s1, |
const String & | s2 | ||
) |
References elm::String::compare().
bool elm::operator== | ( | const CString & | s1, |
const CString & | s2 | ||
) |
References elm::CString::compare().
bool elm::operator== | ( | const String & | s1, |
const CString | s2 | ||
) |
References elm::String::compare().
bool elm::operator== | ( | const String & | s1, |
const String & | s2 | ||
) |
References elm::String::compare().
bool elm::operator== | ( | const CString | s1, |
const String & | s2 | ||
) |
References elm::String::compare().
bool elm::operator== | ( | const String & | s1, |
const char * | s2 | ||
) |
References elm::String::compare().
bool elm::operator== | ( | const CString | s1, |
const char * | s2 | ||
) |
References elm::CString::compare().
bool elm::operator== | ( | const char * | s1, |
const CString | s2 | ||
) |
References elm::CString::compare().
bool elm::operator== | ( | const char * | s1, |
const String & | s2 | ||
) |
References elm::String::compare().
bool elm::operator> | ( | const CString | s1, |
const CString | s2 | ||
) |
References elm::CString::compare().
bool elm::operator> | ( | const String & | s1, |
const CString | s2 | ||
) |
References elm::String::compare().
bool elm::operator> | ( | const String & | s1, |
const String & | s2 | ||
) |
References elm::String::compare().
bool elm::operator> | ( | const CString | s1, |
const String & | s2 | ||
) |
References elm::String::compare().
bool elm::operator> | ( | const String & | s1, |
const char * | s2 | ||
) |
References elm::String::compare().
bool elm::operator> | ( | const CString | s1, |
const char * | s2 | ||
) |
References elm::CString::compare().
bool elm::operator> | ( | const char * | s1, |
const CString | s2 | ||
) |
References elm::CString::compare().
bool elm::operator> | ( | const char * | s1, |
const String & | s2 | ||
) |
References elm::String::compare().
bool elm::operator>= | ( | const CString | s1, |
const CString | s2 | ||
) |
References elm::CString::compare().
bool elm::operator>= | ( | const String & | s1, |
const CString | s2 | ||
) |
References elm::String::compare().
bool elm::operator>= | ( | const String & | s1, |
const String & | s2 | ||
) |
References elm::String::compare().
bool elm::operator>= | ( | const CString | s1, |
const String & | s2 | ||
) |
References elm::String::compare().
bool elm::operator>= | ( | const String & | s1, |
const char * | s2 | ||
) |
References elm::String::compare().
bool elm::operator>= | ( | const CString | s1, |
const char * | s2 | ||
) |
References elm::CString::compare().
bool elm::operator>= | ( | const char * | s1, |
const CString | s2 | ||
) |
References elm::CString::compare().
bool elm::operator>= | ( | const char * | s1, |
const String & | s2 | ||
) |
References elm::String::compare().
io::StringInput elm::operator>> | ( | const string & | str, |
T & | val | ||
) |
References elm::io::in.
io::StringInput elm::operator>> | ( | cstring | str, |
T & | val | ||
) |
References elm::io::in.
Pair<T1, T2> elm::pair | ( | const T1 & | v1, |
const T2 & | v2 | ||
) |
Referenced by elm::stree::SegmentBuilder< K, T, C >::add(), elm::avl::GenTree< T, IdAdapter< T >, C >::copy(), elm::option::Manager::displayHelp(), elm::serial2::XOMUnserializer::flush(), elm::genstruct::AssocList< string, Section * >::get(), elm::genstruct::AssocList< string, Section * >::hasKey(), elm::genstruct::HashTable< K, T, H >::PairIterator::item(), elm::serial2::TextSerializer::onPointer(), elm::serial2::XOMUnserializer::onPointer(), elm::serial2::XOMSerializer::onPointer(), elm::sys::System::pipe(), elm::genstruct::AssocList< string, Section * >::put(), and elm::genstruct::AssocList< string, Section * >::remove().
Option<T> elm::some | ( | T | val | ) |
elm::STRONG_TYPE | ( | inode_t | , |
ino_t | |||
) |
void elm::swap | ( | T & | x, |
T & | y | ||
) |
Referenced by elm::genstruct::quicksort().
int elm::times | ( | int | v | ) |
Referenced by elm::WAHVector::countOnes(), mod(), and elm::WAHVector::size().
void elm::trace | ( | CString | file, |
int | line, | ||
CString | fun | ||
) |
References cerr, and elm::io::Output::flush().
value_t elm::value | ( | CString | name, |
int | value | ||
) |
Referenced by elm::genstruct::FragTable< T >::add(), elm::genstruct::Vector< T >::add(), elm::xom::Attribute::Attribute(), elm::genstruct::DLList< T, E >::contains(), elm_spy(), field(), elm::genstruct::DLList< T, E >::first(), elm::genstruct::Vector< T >::insert(), elm::genstruct::DLList< T, E >::last(), elm::io::IntFormat::operator()(), elm::AutoString::operator<<(), elm::AutoStringStartup::operator<<(), operator<<(), elm::option::EnumOption< T >::operator=(), elm::io::Output::print(), elm::genstruct::VectorQueue< T, E >::put(), elm::genstruct::HashTable< const void *, int >::put(), elm::serial::XOMUnserializer::readEnum(), elm::genstruct::DLList< T, E >::remove(), elm::genstruct::Vector< elm::xom::Node * >::remove(), elm::genstruct::SLList< pair_t, CompareEquiv< pair_t, DelegateComparator< pair_t, AssocComparator< string, string, C > > > >::remove(), elm::genstruct::GenSortedBinTree< value_t, PairAdapter< elm::String, elm::option::Option * >, C >::remove(), elm::io::Input::scanDouble(), elm::option::SwitchOption::set(), elm::option::ListOption< T >::set(), elm::genstruct::Table< elm::String >::set(), elm::option::EnumOption< T >::set(), elm::genstruct::Vector< T >::set(), elm::avl::Map< K, T, C >::MutableIterator::set(), elm::genstruct::FragTable< T >::set(), and elm::genstruct::DAGNode< T >::useValue().
|
static |
|
static |
|
static |
Referenced by elm::BitVector::countBits().
|
static |
Referenced by elm::sys::FileItem::get(), and elm::sys::FileItem::release().
|
static |
Referenced by fill(), fillCount(), isFill(), and isLite().
io::Monitor elm::monitor |
const OptionalNone elm::none = OptionalNone() |
This special value cause the construction of an optional value without value available.
Referenced by elm::genstruct::AVLMap< K, T, C >::get(), elm::avl::Map< Pair< K, K >, T, segment_comparator_t >::get(), elm::genstruct::SortedBinMap< char, elm::option::Option * >::get(), elm::genstruct::AssocList< string, Section * >::get(), and elm::xom::Element::getAttributeValue().
|
static |
Referenced by fill(), fillCount(), isOnes(), and isZeroes().
|
static |