bpp-core  2.2.0
bpp::Number< T > Class Template Reference

The Number object template class. More...

#include <Bpp/Numeric/Number.h>

+ Inheritance diagram for bpp::Number< T >:
+ Collaboration diagram for bpp::Number< T >:

Public Member Functions

 Number (const T &value=0)
 Build a new Number object with a specific value. More...
 
virtual ~Number ()
 
Number< T > & operator= (const T &t)
 
getValue () const
 Get the value of this number. More...
 
std::string toString () const
 
The Clonable interface.
Number< T > * clone () const
 Create a copy of this object and send a pointer to it. More...
 

Protected Attributes

value_
 The value of this parameter. More...
 

Detailed Description

template<class T>
class bpp::Number< T >

The Number object template class.

This template class may be used to deal with number in an object way.

Definition at line 98 of file Number.h.

Constructor & Destructor Documentation

◆ Number()

template<class T>
bpp::Number< T >::Number ( const T &  value = 0)
inline

Build a new Number object with a specific value.

Parameters
valueThe value that the Number must have.

Definition at line 111 of file Number.h.

◆ ~Number()

template<class T>
virtual bpp::Number< T >::~Number ( )
inlinevirtual

Definition at line 113 of file Number.h.

Member Function Documentation

◆ clone()

template<class T>
Number<T>* bpp::Number< T >::clone ( ) const
inlinevirtual

Create a copy of this object and send a pointer to it.

Returns
A pointer toward the copy object.

Implements bpp::BppNumberI.

Definition at line 128 of file Number.h.

◆ getValue()

template<class T>
T bpp::Number< T >::getValue ( ) const
inline

Get the value of this number.

Returns
The value of this number.

Definition at line 138 of file Number.h.

◆ operator=()

template<class T>
Number<T>& bpp::Number< T >::operator= ( const T &  t)
inline

Definition at line 115 of file Number.h.

◆ toString()

template<class T>
std::string bpp::Number< T >::toString ( ) const
inlinevirtual

Implements bpp::BppNumberI.

Definition at line 140 of file Number.h.

Member Data Documentation

◆ value_

template<class T>
T bpp::Number< T >::value_
protected

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