ROSE  0.11.145.0
Public Member Functions | Protected Attributes | Friends | List of all members
Rose::BinaryAnalysis::AsmFunctionIndex::Footnotes Class Reference

Description

Definition at line 238 of file AsmFunctionIndex.h.

Collaboration diagram for Rose::BinaryAnalysis::AsmFunctionIndex::Footnotes:
Collaboration graph
[legend]

Public Member Functions

size_t add_footnote (const std::string &text)
 Adds a footnote to the table. More...
 
void change_footnote (size_t idx, const std::string &text)
 Change the text associated with a footnote. More...
 
const std::string & get_footnote (size_t idx) const
 Get the string for a footnote. More...
 
size_t size () const
 Returns the number of footnotes. More...
 
void set_footnote_title (const std::string &title)
 Change the footnote title string. More...
 
const std::string & get_footnote_title () const
 Get the footnote title. More...
 
void set_footnote_prefix (const std::string &prefix)
 Set the footnote prefix string. More...
 
const std::string & get_footnote_prefix () const
 Get the footnote prefix string. More...
 
std::string get_footnote_name (size_t idx) const
 Generates a footnote name from a footnote index. More...
 
void print (std::ostream &) const
 Print non-empty footnotes. More...
 

Protected Attributes

std::vector< std::string > footnotes
 List of footnotes. More...
 
std::string footnote_prefix
 String to emit before every footnote line. More...
 

Friends

std::ostream & operator<< (std::ostream &o, const Footnotes *footnotes)
 Print non-empty footnotes. More...
 

Member Function Documentation

size_t Rose::BinaryAnalysis::AsmFunctionIndex::Footnotes::add_footnote ( const std::string &  text)

Adds a footnote to the table.

Footnotes are printed at the end of the table by the ShowFootnotes callback class. Footnotes are numbered starting at one rather than zero, and this function returns the footnote number. Calling this function with an empty text argument will reserve a footnote number but will not print the footnote in the final output.

The first line of the footnote is prefixed by the string "Footnote *N: " and subsequent lines are indented by the length of the prefix.

void Rose::BinaryAnalysis::AsmFunctionIndex::Footnotes::change_footnote ( size_t  idx,
const std::string &  text 
)

Change the text associated with a footnote.

The footnote must already exist, and the footnote idx is the value returned by a previous call to add_footnote(). Setting text to the empty string causes the footnote to not appear in the final output, but other footnotes are not renumbered to close the gap (because their references might have already been printed. See also, add_footnote().

const std::string& Rose::BinaryAnalysis::AsmFunctionIndex::Footnotes::get_footnote ( size_t  idx) const

Get the string for a footnote.

The footnote must already exist and idx is a footnote number returned by a previous call to add_footnote().

size_t Rose::BinaryAnalysis::AsmFunctionIndex::Footnotes::size ( ) const
inline

Returns the number of footnotes.

Footnotes are numbered starting at one. The return value includes empty footnotes that won't be printed by the final output.

Definition at line 265 of file AsmFunctionIndex.h.

References footnotes.

void Rose::BinaryAnalysis::AsmFunctionIndex::Footnotes::set_footnote_title ( const std::string &  title)

Change the footnote title string.

The title string is printed before the first footnote if there are any footnotes with a non-empty string.

const std::string& Rose::BinaryAnalysis::AsmFunctionIndex::Footnotes::get_footnote_title ( ) const

Get the footnote title.

The default title is "== Footnotes ==".

void Rose::BinaryAnalysis::AsmFunctionIndex::Footnotes::set_footnote_prefix ( const std::string &  prefix)
inline

Set the footnote prefix string.

This string is printed before every line of the footnote area. The default is the empty string.

Definition at line 276 of file AsmFunctionIndex.h.

References footnote_prefix.

const std::string& Rose::BinaryAnalysis::AsmFunctionIndex::Footnotes::get_footnote_prefix ( ) const
inline

Get the footnote prefix string.

This string is printed before every line of the footnote area.

Definition at line 279 of file AsmFunctionIndex.h.

References footnote_prefix.

std::string Rose::BinaryAnalysis::AsmFunctionIndex::Footnotes::get_footnote_name ( size_t  idx) const

Generates a footnote name from a footnote index.

The default is to return the index prefixed by an asterisk.

void Rose::BinaryAnalysis::AsmFunctionIndex::Footnotes::print ( std::ostream &  ) const

Print non-empty footnotes.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
const Footnotes footnotes 
)
friend

Print non-empty footnotes.

Definition at line 288 of file AsmFunctionIndex.h.

Member Data Documentation

std::vector<std::string> Rose::BinaryAnalysis::AsmFunctionIndex::Footnotes::footnotes
protected

List of footnotes.

Elmt zero is an optional footnote title string.

Definition at line 294 of file AsmFunctionIndex.h.

Referenced by size().

std::string Rose::BinaryAnalysis::AsmFunctionIndex::Footnotes::footnote_prefix
protected

String to emit before every footnote line.

Definition at line 295 of file AsmFunctionIndex.h.

Referenced by get_footnote_prefix(), and set_footnote_prefix().


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