Evo C++ Library v0.5.1
|
#include <evo/type.h>
Nullable primitive character base type.
T | Character type (char) |
Character types:
Examples:
Public Types | |
enum | Category { cNONE =0, cSPACE, cSYMBOL, cALPHANUM, cDIGIT, cALPHA, cALPHA_U, cALPHA_L } |
Character category. More... | |
enum | Digit { dNONE =0, dBASE36, dHEX, dDECIMAL, dOCTAL } |
Character digit type. More... | |
typedef void | EvoNullableType |
Identify as nullable type. More... | |
typedef CharT< T > | This |
This non-POD type More... | |
typedef T | Type |
Wrapped POD type. More... | |
Public Member Functions | |
CharT () | |
Constructor. More... | |
CharT (const CharT< T > &val) | |
Copy constructor. More... | |
CharT (T val) | |
Constructor. More... | |
int | compare (const Nullable< T > &val) const |
Comparison. More... | |
int | compare (T val) const |
Comparison. More... | |
T & | denull () |
Clears null flag and returns value reference. More... | |
bool | null () const |
Get whether null. More... | |
operator SafeBoolType () const | |
Safe (explicit) evaluation as bool type. More... | |
bool | operator! () const |
Negation operator returns whether null or 0. More... | |
bool | operator!= (const Nullable< T > &val) const |
Inequality operator. More... | |
bool | operator!= (T val) const |
Inequality operator. More... | |
const T & | operator* () const |
Dereference for explicit conversion to underlying type (const). More... | |
T & | operator* () |
Dereference for explicit conversion to underlying type. More... | |
bool | operator< (const Nullable< T > &val) const |
Less than operator. More... | |
bool | operator< (T val) const |
Less than operator. More... | |
bool | operator<= (const Nullable< T > &val) const |
Less than or equal operator. More... | |
bool | operator<= (T val) const |
Less than or equal operator. More... | |
CharT< T > & | operator= (const CharT< char > &val) |
Assignment operator. More... | |
CharT< T > & | operator= (char val) |
Assignment operator. More... | |
CharT< T > & | operator= (ValNull) |
Assignment operator to set as null by passing vNULL. More... | |
bool | operator== (const Nullable< T > &val) const |
Equality operator. More... | |
bool | operator== (T val) const |
Equality operator. More... | |
bool | operator> (const Nullable< T > &val) const |
Greater than operator. More... | |
bool | operator> (T val) const |
Greater than operator. More... | |
bool | operator>= (const Nullable< T > &val) const |
Greater than or equal operator. More... | |
bool | operator>= (T val) const |
Greater than or equal operator. More... | |
Nullable< T > & | set () |
Set as null. More... | |
Nullable< T > & | set (const Nullable< T > &src) |
Set as copy of given value. More... | |
Nullable< T > & | set (T src) |
Set as given value. More... | |
bool | valid () const |
Get whether valid (not null). More... | |
const T & | value () const |
Get underlying value (const). More... | |
T & | value () |
Get underlying value. More... | |
Static Public Attributes | |
static const int | BITS = BYTES * CHAR_BIT |
Type size in bits (8) More... | |
static const int | BYTES = sizeof(T) |
Type size in bytes, usually 1. More... | |
|
inherited |
Identify as nullable type.
typedef T Type |
Wrapped POD type.
enum Category |
Character category.
enum Digit |
Character digit type.
Enumerator | |
---|---|
dNONE | Not a digit. |
dBASE36 | Base 36 character. |
dHEX | Hexadecimal character. |
dDECIMAL | Decimal character. |
dOCTAL | Octal character. |
|
inline |
Constructor.
|
inline |
Constructor.
val | Value to set |
|
inlineinherited |
Comparison.
val | Value to compare to |
|
inlineinherited |
Comparison.
val | Value to compare to |
|
inlineinherited |
Clears null flag and returns value reference.
Nullable<bool>
template specialization returns by value instead of reference
|
inlineinherited |
Get whether null.
|
inlineinherited |
Safe (explicit) evaluation as bool type.
|
inlineinherited |
Negation operator returns whether null or 0.
Inequality operator.
val | Value to compare to |
|
inlineinherited |
Inequality operator.
val | Value to compare to |
|
inlineinherited |
Dereference for explicit conversion to underlying type (const).
Alternative to value().
|
inlineinherited |
Dereference for explicit conversion to underlying type.
Alternative to value().
|
inlineinherited |
Less than operator.
val | Value to compare to |
val
|
inlineinherited |
Less than operator.
val | Value to compare to |
val
|
inlineinherited |
Less than or equal operator.
val | Value to compare to |
val
, true if null
|
inlineinherited |
Less than or equal operator.
val | Value to compare to |
val
, true if null Assignment operator.
val | Value to copy |
|
inline |
Assignment operator.
val | Value to set |
Assignment operator to set as null by passing vNULL.
|
inlineinherited |
Equality operator.
val | Value to compare to |
|
inlineinherited |
Equality operator.
val | Value to compare to |
|
inlineinherited |
Greater than operator.
val | Value to compare to |
val
, false if null
|
inlineinherited |
Greater than operator.
val | Value to compare to |
val
, false if null
|
inlineinherited |
Greater than or equal operator.
val | Value to compare to |
val
|
inlineinherited |
Greater than or equal operator.
val | Value to compare to |
val
|
inlineinherited |
Set as null.
Set as copy of given value.
src | Source to copy |
|
inlineinherited |
Set as given value.
src | Source to set |
|
inlineinherited |
Get whether valid (not null).
|
inlineinherited |
|
inlineinherited |
|
static |
Type size in bits (8)
|
static |
Type size in bytes, usually 1.