ROSE
0.9.6a
|
Pointer structure annotation. More...
#include <structure.h>
Public Member Functions | |
structureAnn (annVariable *source, annVariable *target, const std::string *field_name, const int line) | |
annVariable * | source () const |
annVariable * | target () 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) |
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.
structureAnn::structureAnn | ( | annVariable * | source, |
annVariable * | target, | ||
const std::string * | field_name, | ||
const int | line | ||
) |
|
inline |
Definition at line 132 of file structure.h.
References _source.
|
inline |
Definition at line 133 of file structure.h.
References _target.
|
inline |
Definition at line 134 of file structure.h.
References _field_name.
void structureAnn::print | ( | std::ostream & | o) | const |
|
friend |
Definition at line 138 of file structure.h.
|
private |
Definition at line 120 of file structure.h.
Referenced by source().
|
private |
Definition at line 121 of file structure.h.
Referenced by target().
|
private |
Definition at line 122 of file structure.h.
Referenced by field_name().