ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MetricAttribute Class Reference

Attribute corresponding to a metric. More...

#include <AstAttributeMechanism.h>

Inheritance diagram for MetricAttribute:
Collaboration diagram for MetricAttribute:

Public Member Functions

 MetricAttribute ()
 
 MetricAttribute (double value, bool is_derived=false)
 
MetricAttributeoperator+= (const MetricAttribute &other)
 
MetricAttributeoperator-= (const MetricAttribute &other)
 
MetricAttributeoperator*= (const MetricAttribute &other)
 
MetricAttributeoperator/= (const MetricAttribute &other)
 
virtual AstAttributeconstructor ()
 
virtual AstAttributecopy ()
 
virtual std::string attribute_class_name ()
 
virtual int packed_size ()
 
virtual char * packed_data ()
 
virtual void unpacked_data (int size, char *data)
 
virtual bool isDerived () const
 
virtual double getValue () const
 
virtual void setValue (double newVal)
 
virtual std::string toString ()
 
- Public Member Functions inherited from AstAttribute
 AstAttribute ()
 
virtual ~AstAttribute ()
 
AstAttributeconstructor ()
 
std::string attribute_class_name ()
 
virtual std::string additionalNodeOptions ()
 
virtual std::vector
< AttributeEdgeInfo
additionalEdgeInfo ()
 
virtual std::vector
< AttributeNodeInfo
additionalNodeInfo ()
 
virtual bool commentOutNodeInGraph ()
 

Protected Attributes

bool is_derived_
 
double value_
 

Detailed Description

Attribute corresponding to a metric.

A metric attribute represents a numeric value obtained by either dynamic analysis (gprof or hpct) or static analysis (for example number of flop operations in a function) It MetricAttribute can be a raw (observed), or a propagated (derived) count It containes no name-string, because the attribute is stored in an AttributeMechanism-map, where the name is the key

Definition at line 141 of file AstAttributeMechanism.h.

Constructor & Destructor Documentation

MetricAttribute::MetricAttribute ( )
MetricAttribute::MetricAttribute ( double  value,
bool  is_derived = false 
)

Member Function Documentation

MetricAttribute& MetricAttribute::operator+= ( const MetricAttribute other)
MetricAttribute& MetricAttribute::operator-= ( const MetricAttribute other)
MetricAttribute& MetricAttribute::operator*= ( const MetricAttribute other)
MetricAttribute& MetricAttribute::operator/= ( const MetricAttribute other)
virtual AstAttribute* MetricAttribute::constructor ( )
virtual
virtual AstAttribute* MetricAttribute::copy ( )
virtual

Reimplemented from AstAttribute.

virtual std::string MetricAttribute::attribute_class_name ( )
virtual
virtual int MetricAttribute::packed_size ( )
virtual

Reimplemented from AstAttribute.

virtual char* MetricAttribute::packed_data ( )
virtual

Reimplemented from AstAttribute.

virtual void MetricAttribute::unpacked_data ( int  size,
char *  data 
)
virtual

Reimplemented from AstAttribute.

virtual bool MetricAttribute::isDerived ( ) const
virtual
virtual double MetricAttribute::getValue ( ) const
virtual
virtual void MetricAttribute::setValue ( double  newVal)
virtual
virtual std::string MetricAttribute::toString ( )
virtual

This function is used by other components to print the value of an attribute. For example the pdf generation calls this function to print the value of an attribute in the pdf file. The default implementation is to return an empty string.

Reimplemented from AstAttribute.

Member Data Documentation

bool MetricAttribute::is_derived_
protected

Definition at line 167 of file AstAttributeMechanism.h.

double MetricAttribute::value_
protected

Definition at line 168 of file AstAttributeMechanism.h.


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