lean cpp library
A lean C++ library providing efficient utility classes for high-performance C++ applications.
Namespaces | Classes | Typedefs | Functions
lean::types Namespace Reference

Defines fixed-width and other standard types. More...

Namespaces

namespace  sign_class
 

Sign classes enumeration.


Classes

struct  type_info
 Enhanced type info. More...
struct  int_type
 Provides an integer type of the given class and size. More...
struct  char_type
 Provides a character type of the given size. More...
struct  float_type
 Provides a floating-point type of the given size. More...
struct  ieee_float_desc
 Describes the given float type. More...
struct  ieee_float
 Provides utility methods for floating-point values of the given type. More...
struct  size_info
 Provides enhanced type size information. More...

Typedefs

typedef int_type
< sign_class::sign, 1 >::type 
int1
 1 byte unsigned integer.
typedef int_type
< sign_class::sign, 2 >::type 
int2
 2 byte unsigned integer.
typedef int_type
< sign_class::sign, 4 >::type 
int4
 4 byte unsigned integer.
typedef int_type
< sign_class::sign, 8 >::type 
int8
 8 byte unsigned integer.
typedef int_type
< sign_class::no_sign, 1 >
::type 
uint1
 1 byte unsigned integer.
typedef int_type
< sign_class::no_sign, 2 >
::type 
uint2
 2 byte unsigned integer.
typedef int_type
< sign_class::no_sign, 4 >
::type 
uint4
 4 byte unsigned integer.
typedef int_type
< sign_class::no_sign, 8 >
::type 
uint8
 8 byte unsigned integer.
typedef int1 tristate
 Tristate.
typedef char_type< 1 >::type char1
 Character type.
typedef char_type< 2 >::type char2
 Character type.
typedef char_type< 4 >::type char4
 Character type.
typedef char1 utf8_t
 Character type.
typedef char2 utf16_t
 Character type.
typedef char4 utf32_t
 Character type.
typedef float_type< 4 >::type float4
 4 byte float.
typedef float_type< 8 >::type float8
 8 byte float.

Functions

template<class Type >
const type_infoget_type_info ()
 Gets a type info object for the given type.
template<class Type >
LEAN_INLINE bool is_type (const std::type_info &type)
 Checks if the given type info matches the given type.
template<class Value >
LEAN_INLINE Value * to_type (const std::type_info &type, void *value)
 Gets a pointer to a value of the given type, if the given types match.
template<class Value >
LEAN_INLINE const Value * to_type (const std::type_info &type, const void *value)
 Gets a pointer to a value of the given type, if the given types match.
template<class Value >
LEAN_INLINE volatile Value * to_type (const std::type_info &type, volatile void *value)
 Gets a pointer to a value of the given type, if the given types match.
template<class Value >
LEAN_INLINE const volatile Value * to_type (const std::type_info &type, const volatile void *value)
 Gets a pointer to a value of the given type, if the given types match.
LEAN_INLINE void * get_element (size_t stride, void *value, size_t offset)
 Gets a pointer to the offset-th element in the given array.
LEAN_INLINE const void * get_element (size_t stride, const void *value, size_t offset)
 Gets a pointer to the offset-th element in the given array.
LEAN_INLINE volatile void * get_element (size_t stride, volatile void *value, size_t offset)
 Gets a pointer to the offset-th element in the given array.
LEAN_INLINE const volatile void * get_element (size_t stride, const volatile void *value, size_t offset)
 Gets a pointer to the offset-th element in the given array.

Detailed Description

Defines fixed-width and other standard types.