CCCC - C and C++ Code Counter  9999-git
CCCC Development version (post-3.1.4)
Public Member Functions | Private Attributes | List of all members
Source_Anchor Class Reference

#include <cccc_htm.h>

Collaboration diagram for Source_Anchor:
[legend]

Public Member Functions

 Source_Anchor ()
 
 Source_Anchor (string file, int line)
 
string get_file () const
 
int get_line () const
 
string key () const
 
void Emit_HREF (ofstream &fstr)
 
void Emit_NAME (ofstream &fstr)
 
void Emit_SPACE (ofstream &fstr)
 

Private Attributes

string file_
 
int line_
 

Detailed Description

Definition at line 116 of file cccc_htm.h.

Constructor & Destructor Documentation

Source_Anchor::Source_Anchor ( )
inline

Definition at line 126 of file cccc_htm.h.

126 :line_(0) {}
Source_Anchor::Source_Anchor ( string  file,
int  line 
)
inline

Definition at line 127 of file cccc_htm.h.

127 : file_(file), line_(line) {}
string file_
Definition: cccc_htm.h:123

Member Function Documentation

void Source_Anchor::Emit_HREF ( ofstream &  fstr)

Definition at line 1486 of file cccc_htm.cc.

1487 {
1488  string anchor_key=key();
1489 
1490  fstr << "<CODE><A HREF=\"cccc_src.html#" << anchor_key.c_str() << "\">"
1491  << file_.c_str() << ":" << line_
1492  << "</A></CODE>";
1493 }
string file_
Definition: cccc_htm.h:123
string key() const
Definition: cccc_htm.cc:1476

Here is the call graph for this function:

void Source_Anchor::Emit_NAME ( ofstream &  fstr)

Definition at line 1495 of file cccc_htm.cc.

1496 {
1497  string anchor_key=key();
1498  char ln_buf[32];
1499  sprintf(ln_buf,"%d",line_);
1500  string ln_string=pad_string(8,ln_buf,"&nbsp;");
1501  string space_string=pad_string(2,"","&nbsp;");
1502  fstr << "<A NAME=\"" << anchor_key.c_str() << "\">"
1503  << ln_string.c_str() << space_string.c_str() << "</A>";
1504 }
static string pad_string(int target_width, string the_string, string padding)
Definition: cccc_htm.cc:1463
string key() const
Definition: cccc_htm.cc:1476

Here is the call graph for this function:

void Source_Anchor::Emit_SPACE ( ofstream &  fstr)

Definition at line 1506 of file cccc_htm.cc.

1507 {
1508  string space_string=pad_string(10,"","&nbsp;");
1509  fstr << space_string.c_str();
1510 }
static string pad_string(int target_width, string the_string, string padding)
Definition: cccc_htm.cc:1463

Here is the call graph for this function:

string Source_Anchor::get_file ( ) const
inline

Definition at line 129 of file cccc_htm.h.

129 { return file_; }
string file_
Definition: cccc_htm.h:123

Here is the caller graph for this function:

int Source_Anchor::get_line ( ) const
inline

Definition at line 130 of file cccc_htm.h.

130 { return line_; }
string Source_Anchor::key ( ) const

Definition at line 1476 of file cccc_htm.cc.

1477 {
1478  string retval;
1479  char linebuf[16];
1480  sprintf(linebuf,"%d",line_);
1481  retval=file_+":"+pad_string(10,linebuf," ");
1482  return retval;
1483 }
static string pad_string(int target_width, string the_string, string padding)
Definition: cccc_htm.cc:1463
string file_
Definition: cccc_htm.h:123

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

string Source_Anchor::file_
private

Definition at line 123 of file cccc_htm.h.

int Source_Anchor::line_
private

Definition at line 124 of file cccc_htm.h.


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