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

Scalar value type for a RangeMap. More...

#include <rangemap.h>

Inheritance diagram for RangeMapValue< R, T >:
Collaboration diagram for RangeMapValue< R, T >:

Public Types

typedef R Range
 
typedef T Value
 

Public Member Functions

 RangeMapValue ()
 Constructor creates object whose underlying value is default constructed. More...
 
 RangeMapValue (const Value &v)
 Constructor creates object with specified value. More...
 
virtual ~RangeMapValue ()
 
virtual void removing (const Range &my_range)
 Called when this value is being removed from a RangeMap. More...
 
virtual 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, const RangeMapValue &other_value)
 Called to merge two RangeMap values. More...
 
virtual void set (const Value &v)
 Accessor for the value actually stored here. More...
 
virtual Value get () const
 Accessor for the value actually stored here. More...
 

Protected Attributes

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

Detailed Description

template<class R, class T>
class RangeMapValue< 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. This class is often used as a base class for other more sophisticated range maps. See the RangeMapVoid class for full documentation.

Definition at line 664 of file rangemap.h.

Member Typedef Documentation

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

Definition at line 666 of file rangemap.h.

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

Definition at line 667 of file rangemap.h.

Constructor & Destructor Documentation

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

Constructor creates object whose underlying value is default constructed.

Definition at line 670 of file rangemap.h.

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

Constructor creates object with specified value.

Definition at line 673 of file rangemap.h.

template<class R, class T>
virtual RangeMapValue< R, T >::~RangeMapValue ( )
inlinevirtual

Definition at line 678 of file rangemap.h.

Member Function Documentation

template<class R, class T>
virtual void RangeMapValue< R, T >::set ( const Value v)
inlinevirtual

Accessor for the value actually stored here.

Definition at line 683 of file rangemap.h.

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

Accessor for the value actually stored here.

Definition at line 686 of file rangemap.h.

Referenced by RangeMapValue< Extent, Function * >::merge().

template<class R, class T>
virtual void RangeMapValue< R, T >::removing ( const Range my_range)
inlinevirtual

Called when this value is being removed from a RangeMap.

Definition at line 693 of file rangemap.h.

template<class R, class T>
virtual void RangeMapValue< R, T >::truncate ( const Range my_range,
const typename Range::Value new_end 
)
inlinevirtual

Called when removing part of a value from a RangeMap.

Definition at line 698 of file rangemap.h.

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

Called to merge two RangeMap values.

The values can be merged only if they compare equal.

Definition at line 703 of file rangemap.h.

template<class R, class T>
virtual void RangeMapValue< R, T >::print ( std::ostream &  o) const
inlinevirtual

Print a RangeMap value.

Reimplemented in Partitioner::DataRangeMapValue, and Partitioner::FunctionRangeMapValue.

Definition at line 718 of file rangemap.h.

Friends And Related Function Documentation

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

Print a RangeMap value.

Definition at line 721 of file rangemap.h.

Member Data Documentation


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