Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

util::Number::IntegerTemplate< T > Class Template Reference

#include <Number.h>

Inheritance diagram for util::Number::IntegerTemplate< T >:

util::Number util::PrimitiveType util::Computable util::Object List of all members.

Detailed Description

template<class T>
class util::Number::IntegerTemplate< T >

A template for non-floating point numbers.

Public Methods

 IntegerTemplate (T value=0)
 Create a new number that holds the given value.

 IntegerTemplate (const IntegerTemplate &other)
 Copy another number of the same type.

 IntegerTemplate (const Number &other)
 Copy any number.

char charValue () const
short shortValue () const
int intValue () const
long longValue () const
float floatValue () const
double doubleValue () const
Objectclone () const throw (NotCloneableException&)
 Create a clone of this object.

std::string toString () const
 Convert object to a string.

SmartPtr< Computablenegate () const throw (ComputationException&)
 If a negation can be defined for this, then return it.

SmartPtr< Computableoperator- () const
 Negation operator calls negate().

Member Function Documentation

template<class T>
Object* util::Number::IntegerTemplate< T >::clone   const throw (NotCloneableException&) [inline, virtual]

Create a clone of this object.

Each cloneable class should make this method to return an exact copy of itself. The default implementation throws a NotCloneableException.

Reimplemented from util::Object.

The documentation for this class was generated from the following file:
Documentation generated on 11.09.2003 with Doxygen.
The documentation is copyrighted material.
Copyright © Topi Mäenpää 2003. All rights reserved.