Generated on: Thu Mar 29 07:46:58 PDT 2012 for custom file set
// doxy/ or-tools/ src/ base/

IntType< IntTypeName, _ValueType > Class Template Reference

Holds a integral value (of type ValueType) and behaves as a ValueType by exposing assignment, unary, comparison, and arithmetic operators. More...

#include <int-type.h>

List of all members.

Public Types

typedef _ValueType ValueType
 for non-member operators
typedef IntType< IntTypeName,
ValueType
ThisType
 Syntactic sugar.

Public Member Functions

 IntType ()
 Default c'tor initializing value_ to 0.
 IntType (ValueType value)
 C'tor explicitly initializing from a ValueType.
ValueType value () const
 IntType uses the default copy constructor and destructor.
template<typename ValType>
ValType value () const
ThisTypeoperator++ ()
 -- UNARY OPERATORS --------------------------------------------------------
const ThisType operator++ (int v)
ThisTypeoperator-- ()
const ThisType operator-- (int v)
bool operator! () const
const ThisType operator+ () const
const ThisType operator- () const
const ThisType operator~ () const
 INT_TYPE_ASSIGNMENT_OP (=)
 INT_TYPE_ASSIGNMENT_OP (+=)
 INT_TYPE_ASSIGNMENT_OP (-=)
INT_TYPE_ASSIGNMENT_OP * INT_TYPE_ASSIGNMENT_OP (/=);INT_TYPE_ASSIGNMENT_OP(<<=
 NOLINT.
 INT_TYPE_ASSIGNMENT_OP (>>=)
 NOLINT.
 INT_TYPE_ASSIGNMENT_OP (%=)


Detailed Description

template<typename IntTypeName, typename _ValueType>
class IntType< IntTypeName, _ValueType >

Holds a integral value (of type ValueType) and behaves as a ValueType by exposing assignment, unary, comparison, and arithmetic operators.

The template parameter IntTypeName defines the name for the int type and must be unique within a binary (the convenient DEFINE_INT_TYPE macro at the end of the file generates a unique IntTypeName). The parameter ValueType defines the integer type value (see supported list above).

This class is NOT thread-safe.

Definition at line 175 of file int-type.h.


Member Typedef Documentation

template<typename IntTypeName, typename _ValueType>
typedef _ValueType IntType< IntTypeName, _ValueType >::ValueType

for non-member operators

Definition at line 177 of file int-type.h.

template<typename IntTypeName, typename _ValueType>
typedef IntType<IntTypeName, ValueType> IntType< IntTypeName, _ValueType >::ThisType

Syntactic sugar.

Definition at line 178 of file int-type.h.


Constructor & Destructor Documentation

template<typename IntTypeName, typename _ValueType>
IntType< IntTypeName, _ValueType >::IntType (  )  [inline]

Default c'tor initializing value_ to 0.

Definition at line 182 of file int-type.h.

template<typename IntTypeName, typename _ValueType>
IntType< IntTypeName, _ValueType >::IntType ( ValueType  value  )  [inline, explicit]

C'tor explicitly initializing from a ValueType.

Definition at line 184 of file int-type.h.


Member Function Documentation

template<typename IntTypeName, typename _ValueType>
ValueType IntType< IntTypeName, _ValueType >::value (  )  const [inline]

IntType uses the default copy constructor and destructor.

-- ACCESSORS -------------------------------------------------------------- The class provides a value() accessor returning the stored ValueType value_ as well as a templatized accessor that is just a syntactic sugar for static_cast<T>(var.value());

Definition at line 191 of file int-type.h.

template<typename IntTypeName, typename _ValueType>
template<typename ValType>
ValType IntType< IntTypeName, _ValueType >::value (  )  const [inline]

Definition at line 194 of file int-type.h.

template<typename IntTypeName, typename _ValueType>
ThisType& IntType< IntTypeName, _ValueType >::operator++ (  )  [inline]

-- UNARY OPERATORS --------------------------------------------------------

Definition at line 197 of file int-type.h.

template<typename IntTypeName, typename _ValueType>
const ThisType IntType< IntTypeName, _ValueType >::operator++ ( int  v  )  [inline]

Definition at line 201 of file int-type.h.

template<typename IntTypeName, typename _ValueType>
ThisType& IntType< IntTypeName, _ValueType >::operator-- (  )  [inline]

Definition at line 206 of file int-type.h.

template<typename IntTypeName, typename _ValueType>
const ThisType IntType< IntTypeName, _ValueType >::operator-- ( int  v  )  [inline]

Definition at line 210 of file int-type.h.

template<typename IntTypeName, typename _ValueType>
bool IntType< IntTypeName, _ValueType >::operator! (  )  const [inline]

Definition at line 216 of file int-type.h.

template<typename IntTypeName, typename _ValueType>
const ThisType IntType< IntTypeName, _ValueType >::operator+ (  )  const [inline]

Definition at line 217 of file int-type.h.

template<typename IntTypeName, typename _ValueType>
const ThisType IntType< IntTypeName, _ValueType >::operator- (  )  const [inline]

Definition at line 218 of file int-type.h.

template<typename IntTypeName, typename _ValueType>
const ThisType IntType< IntTypeName, _ValueType >::operator~ (  )  const [inline]

Definition at line 219 of file int-type.h.

template<typename IntTypeName, typename _ValueType>
IntType< IntTypeName, _ValueType >::INT_TYPE_ASSIGNMENT_OP (  ) 

template<typename IntTypeName, typename _ValueType>
IntType< IntTypeName, _ValueType >::INT_TYPE_ASSIGNMENT_OP (  ) 

template<typename IntTypeName, typename _ValueType>
IntType< IntTypeName, _ValueType >::INT_TYPE_ASSIGNMENT_OP (  ) 

template<typename IntTypeName, typename _ValueType>
INT_TYPE_ASSIGNMENT_OP* IntType< IntTypeName, _ValueType >::INT_TYPE_ASSIGNMENT_OP (  ) 

NOLINT.

template<typename IntTypeName, typename _ValueType>
IntType< IntTypeName, _ValueType >::INT_TYPE_ASSIGNMENT_OP ( >>   ) 

NOLINT.

template<typename IntTypeName, typename _ValueType>
IntType< IntTypeName, _ValueType >::INT_TYPE_ASSIGNMENT_OP (  ) 


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