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

Pointer structure annotation. More...

#include <structure.h>

Inheritance diagram for structureAnn:
Collaboration diagram for structureAnn:

Public Member Functions

 structureAnn (annVariable *source, annVariable *target, const std::string *field_name, const int line)
 
annVariablesource () const
 
annVariabletarget () const
 
const std::string & field_name () const
 
void print (std::ostream &o) const
 
- Public Member Functions inherited from Ann
 Ann (int line)
 
int line () const
 

Private Attributes

REF annVariable_source
 
REF annVariable_target
 
std::string _field_name
 

Friends

std::ostream & operator<< (std::ostream &o, const structureAnn &sa)
 

Detailed Description

Pointer structure annotation.

This class represents a single structure annotation (either on_entry or on_exit). It handles both the "dot" operator and the "arrow" operator, depending on whether the field_name is used. The actual annotation syntax is decomposed into a list of these objects. For example:

on_entry { A –> B { width, height, data –> data1, more { stuff, things } } }

This introduces the following series of structure annotations:

Source Operator Target A –> B B .width B.width B .height B.height B .data B.data B.data –> data1 B .more B.more B.more .stuff B.more.stuff B.more .things B.more.things

This naming scheme is convenient because we can bind the names to actual memory blocks during the processing of the on_entry annotations, and then we never have to explicity process the "dot" operator because it's built into the name.

Definition at line 116 of file structure.h.

Constructor & Destructor Documentation

structureAnn::structureAnn ( annVariable source,
annVariable target,
const std::string *  field_name,
const int  line 
)

Member Function Documentation

annVariable* structureAnn::source ( ) const
inline

Definition at line 132 of file structure.h.

References _source.

annVariable* structureAnn::target ( ) const
inline

Definition at line 133 of file structure.h.

References _target.

const std::string& structureAnn::field_name ( ) const
inline

Definition at line 134 of file structure.h.

References _field_name.

void structureAnn::print ( std::ostream &  o) const

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
const structureAnn sa 
)
friend

Definition at line 138 of file structure.h.

Member Data Documentation

REF annVariable* structureAnn::_source
private

Definition at line 120 of file structure.h.

Referenced by source().

REF annVariable* structureAnn::_target
private

Definition at line 121 of file structure.h.

Referenced by target().

std::string structureAnn::_field_name
private

Definition at line 122 of file structure.h.

Referenced by field_name().


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