#include <algorithm>
#include <cstring>
Go to the source code of this file.
|
#define | STREQ(s1, s2) (0 == strcmp(s1, s2)) |
|
#define | FIXW(w) std::fixed << std::setfill('0') << std::setw(w) |
|
#define | RETURN_IF_COMPARED(a, b, member) |
|
|
template<typename T > |
void | swapValues (T &a, T &b) |
|
template<typename T > |
void | sortValues (T &a, T &b) |
|
template<typename TCont > |
bool | hasItem (const TCont &cont, const typename TCont::value_type &key) |
|
template<typename TCont > |
bool | hasKey (const TCont &cont, const typename TCont::key_type &key) |
|
template<typename TCont > |
bool | hasKey (const TCont *cont, const typename TCont::key_type &key) |
|
template<typename TCont > |
bool | insertOnce (TCont &cont, const typename TCont::key_type &key) |
|
template<class TStack , class TFirst , class TSecond > |
void | push (TStack &dst, const TFirst &first, const TSecond &second) |
|
template<class TStack , class TFirst , class TSecond > |
void | push (TStack *dst, const TFirst &first, const TSecond &second) |
|
#define FIXW |
( |
|
w) | |
std::fixed << std::setfill('0') << std::setw(w) |
#define RETURN_IF_COMPARED |
( |
|
a, |
|
|
|
b, |
|
|
|
member |
|
) |
| |
Value:do { \
if (a.member < b.member) \
return true; \
if (b.member < a.member) \
return false; \
} while (0)
Definition at line 32 of file util.hh.
#define STREQ |
( |
|
s1, |
|
|
|
s2 |
|
) |
| (0 == strcmp(s1, s2)) |
bool hasItem |
( |
const TCont & |
cont, |
|
|
const typename TCont::value_type & |
key |
|
) |
| |
bool hasKey |
( |
const TCont & |
cont, |
|
|
const typename TCont::key_type & |
key |
|
) |
| |
bool hasKey |
( |
const TCont * |
cont, |
|
|
const typename TCont::key_type & |
key |
|
) |
| |
bool insertOnce |
( |
TCont & |
cont, |
|
|
const typename TCont::key_type & |
key |
|
) |
| |
void push |
( |
TStack & |
dst, |
|
|
const TFirst & |
first, |
|
|
const TSecond & |
second |
|
) |
| |
void push |
( |
TStack * |
dst, |
|
|
const TFirst & |
first, |
|
|
const TSecond & |
second |
|
) |
| |
void sortValues |
( |
T & |
a, |
|
|
T & |
b |
|
) |
| |
void swapValues |
( |
T & |
a, |
|
|
T & |
b |
|
) |
| |