ROSE  0.11.96.11
Public Types | Public Member Functions | Protected Attributes | List of all members
RangeMapValue< R, T > Class Template Reference

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 678 of file rangemap.h.

#include <rangemap.h>

Collaboration diagram for RangeMapValue< R, T >:
Collaboration graph
[legend]

Public Types

typedef R Range
 
typedef T Value
 

Public Member Functions

 RangeMapValue ()
 Constructor creates object whose underlying value is default constructed.
 
 RangeMapValue (const Value &v)
 Constructor creates object with specified value.
 
virtual void removing (const Range &my_range)
 Called when this value is being removed from a RangeMap.
 
virtual void truncate (const Range &my_range, const typename Range::Value &new_end)
 Called when removing part of a value from a RangeMap.
 
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.
 
virtual Value get () const
 Accessor for the value actually stored here.
 

Protected Attributes

Value value
 
virtual void print (std::ostream &o) const
 Print a RangeMap value.
 

Member Function Documentation

◆ merge()

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 719 of file rangemap.h.


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