ZERO_v Struct Reference
[Utility Library]

#include <stlsoft/util/zero.hpp>

List of all members.


Detailed Description

Represents a type that can be an active replacement for ZERO.

This class can act as a replacement for the ZERO macro, by being validly assigned to or equated with pointer types only, as in

int i = ZERO; // error int *p = ZERO; // OK

if(i == ZERO) {} // error if(ZERO == i) {} // error

if(p == ZERO) {} // OK if(ZERO == p) {} // OK

When used via inclusion of the file stlsoft_zerodef.h, the macro ZERO is redefined as ZERO_v(), such that expressions containing ZERO will be valid against pointers only.

Public Member Functions

 ZERO_v ()
 Default constructor.
 operator ss_sint8_t () const
 A zero (of type ss_sint8_t).
 operator ss_uint8_t () const
 A zero (of type ss_uint8_t).
 operator ss_sint16_t () const
 A zero (of type ss_sint16_t).
 operator ss_uint16_t () const
 A zero (of type ss_uint16_t).
 operator ss_sint32_t () const
 A zero (of type ss_sint32_t).
 operator ss_uint32_t () const
 A zero (of type ss_uint32_t).
 operator float () const
 A zero (of type float).
 operator double () const
 A zero (of type double).
 operator long double () const
 A zero (of type long double).

Static Public Member Functions

static ZERO_v create ()
 Static creation.


Constructor & Destructor Documentation

ZERO_v (  )  [inline]

Default constructor.

Referenced by ZERO_v::create().


Member Function Documentation

operator ss_sint8_t (  )  const [inline]

A zero (of type ss_sint8_t).

operator ss_uint8_t (  )  const [inline]

A zero (of type ss_uint8_t).

operator ss_sint16_t (  )  const [inline]

A zero (of type ss_sint16_t).

operator ss_uint16_t (  )  const [inline]

A zero (of type ss_uint16_t).

operator ss_sint32_t (  )  const [inline]

A zero (of type ss_sint32_t).

operator ss_uint32_t (  )  const [inline]

A zero (of type ss_uint32_t).

operator float (  )  const [inline]

A zero (of type float).

operator double (  )  const [inline]

A zero (of type double).

operator long double (  )  const [inline]

A zero (of type long double).


The documentation for this struct was generated from the following file:

Generated on Thu Jun 10 08:59:04 2010 for STLSoft by  doxygen 1.5.6