|
feisty meow concerns codebase
2.140
|
#include "definitions.h"
Go to the source code of this file.
Namespaces | |
| basis | |
| The guards collection helps in testing preconditions and reporting errors. | |
Functions | |
| template<class type > | |
| type | basis::maximum (type a, type b) |
| minimum returns the lesser of two values. More... | |
| template<class type > | |
| type | basis::minimum (type a, type b) |
| maximum returns the greater of two values. More... | |
| template<class type > | |
| type | basis::absolute_value (type a) |
| Returns a if a is non-negative, and returns -a otherwise. More... | |
| template<class type > | |
| bool | basis::positive (const type &a) |
| positive returns true if "a" is greater than zero, or false otherwise. More... | |
| template<class type > | |
| bool | basis::non_positive (const type a) |
| non_positive returns true if "a" is less than or equal to zero. More... | |
| template<class type > | |
| bool | basis::negative (const type &a) |
| negative returns true if "a" is less than zero. More... | |
| template<class type > | |
| bool | basis::non_negative (const type &a) |
| non_negative returns true if "a" is greater than or equal to zero. More... | |
| template<class T1 , class T2 > | |
| bool | basis::operator!= (const T1 &x, const T2 &y) |
| template<class T1 , class T2 > | |
| bool | basis::operator> (const T1 &x, const T2 &y) |
| template<class T1 , class T2 > | |
| bool | basis::operator<= (const T1 &x, const T2 &y) |
| template<class T1 , class T2 > | |
| bool | basis::operator>= (const T1 &x, const T2 &y) |
| template<class target_type , class source_type > | |
| target_type * | basis::cast_or_throw (source_type &to_cast, const target_type &ignored) |
| dynamically converts a type to a target type, or throws an exception if it cannot. More... | |
| template<class target_type , class source_type > | |
| const target_type * | basis::cast_or_throw (const source_type &to_cast, const target_type &ignored) |
| const version of the cast_or_throw template. More... | |
| template<class type > | |
| bool | basis::range_check (const type &c, const type &low, const type &high) |
| Returns true if "c" is between "low" and "high" inclusive. More... | |
| template<class type > | |
| type | basis::square (const type &a) |
| Returns the square of the object (which is a * a). More... | |
| template<class type > | |
| void | basis::flip_increasing (type &a, type &b) |
| Makes sure that two values are in increasing order (a < b). More... | |
| template<class type > | |
| void | basis::flip_decreasing (type &a, type &b) |
| Makes sure that two values are in decreasing order (a > b). More... | |
| template<class type > | |
| void | basis::swap_values (type &a, type &b) |
| Exchanges the values held by "a" & "b". More... | |
| template<class type > | |
| type | basis::sign (type a) |
| Returns the numerical sign of a number "a". More... | |
| template<class contents > | |
| void | basis::WHACK (contents *&ptr) |
| deletion with clearing of the pointer. More... | |
| template<class type > | |
| type & | basis::bogonic () |
| Returns an object that is defined statically. More... | |
| template<class type > | |
| type | basis::number_of_packets (type message_size, type packet_size) |
| Reports number of packets needed given a total size and the packet size. More... | |
| template<class type > | |
| type | basis::last_packet_size (type message_size, type packet_size) |
| Tells how many bytes are used within last packet. More... | |
Provides a set of useful mini-functions.
Definition in file functions.h.