ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RangeMapNumeric< R, T > Class Template Reference

Scalar value type for a RangeMap. More...

#include <rangemap.h>

Public Types

typedef R Range
 
typedef T Value
 

Public Member Functions

 RangeMapNumeric ()
 Constructor creates object whose underlying value is zero. More...
 
 RangeMapNumeric (Value v)
 Constructor creates object with specified value. More...
 
void removing (const Range &my_range)
 Called when this value is being removed from a RangeMap. More...
 
void truncate (const Range &my_range, const typename Range::Value &new_end)
 Called when removing part of a value from a RangeMap. More...
 
bool merge (const Range &my_range, const Range &other_range, RangeMapNumeric other_value)
 Called to merge two RangeMap values. More...
 
RangeMapNumeric split (const Range &my_range, typename Range::Value new_end)
 Split a RangeMap value into two parts. More...
 
void set (Value v)
 Accessor for the value actually stored here. More...
 
virtual Value get () const
 Accessor for the value actually stored here. More...
 

Private Attributes

Value value
 
void print (std::ostream &o) const
 Print a RangeMap value. More...
 
std::ostream & operator<< (std::ostream &o, const RangeMapNumeric &x)
 Print a RangeMap value. More...
 

Detailed Description

template<class R, class T>
class RangeMapNumeric< R, T >

Scalar value type for a RangeMap.

Values can be merged if they compare equal; splitting a value is done by copying it. The removing() and truncate() methods are no-ops. See the RangeMapVoid class for full documentation.

Definition at line 597 of file rangemap.h.

Member Typedef Documentation

template<class R , class T >
typedef R RangeMapNumeric< R, T >::Range

Definition at line 599 of file rangemap.h.

template<class R , class T >
typedef T RangeMapNumeric< R, T >::Value

Definition at line 600 of file rangemap.h.

Constructor & Destructor Documentation

template<class R , class T >
RangeMapNumeric< R, T >::RangeMapNumeric ( )
inline

Constructor creates object whose underlying value is zero.

Definition at line 603 of file rangemap.h.

template<class R , class T >
RangeMapNumeric< R, T >::RangeMapNumeric ( Value  v)
inline

Constructor creates object with specified value.

Definition at line 606 of file rangemap.h.

Member Function Documentation

template<class R , class T >
void RangeMapNumeric< R, T >::set ( Value  v)
inline

Accessor for the value actually stored here.

Definition at line 610 of file rangemap.h.

References RangeMapNumeric< R, T >::value.

template<class R , class T >
virtual Value RangeMapNumeric< R, T >::get ( ) const
inlinevirtual

Accessor for the value actually stored here.

Definition at line 613 of file rangemap.h.

References RangeMapNumeric< R, T >::value.

Referenced by RangeMapNumeric< R, T >::merge().

template<class R , class T >
void RangeMapNumeric< R, T >::removing ( const Range my_range)
inline

Called when this value is being removed from a RangeMap.

Definition at line 620 of file rangemap.h.

template<class R , class T >
void RangeMapNumeric< R, T >::truncate ( const Range my_range,
const typename Range::Value new_end 
)
inline

Called when removing part of a value from a RangeMap.

Definition at line 625 of file rangemap.h.

template<class R , class T >
bool RangeMapNumeric< R, T >::merge ( const Range my_range,
const Range other_range,
RangeMapNumeric< R, T >  other_value 
)
inline

Called to merge two RangeMap values.

The values can be merged only if they compare equal.

Definition at line 630 of file rangemap.h.

References RangeMapNumeric< R, T >::get().

template<class R , class T >
RangeMapNumeric RangeMapNumeric< R, T >::split ( const Range my_range,
typename Range::Value  new_end 
)
inline

Split a RangeMap value into two parts.

Definition at line 636 of file rangemap.h.

template<class R , class T >
void RangeMapNumeric< R, T >::print ( std::ostream &  o) const
inline

Print a RangeMap value.

Definition at line 643 of file rangemap.h.

References RangeMapNumeric< R, T >::value.

Friends And Related Function Documentation

template<class R , class T >
std::ostream& operator<< ( std::ostream &  o,
const RangeMapNumeric< R, T > &  x 
)
friend

Print a RangeMap value.

Definition at line 646 of file rangemap.h.

Member Data Documentation

template<class R , class T >
Value RangeMapNumeric< R, T >::value
private

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