CCCC - C and C++ Code Counter  9999-git
CCCC Development version (post-3.1.4)
Classes | Functions
cccc_xml.h File Reference
#include "cccc.h"
#include <fstream>
#include <time.h>
#include "cccc_db.h"
#include "cccc_met.h"
#include "cccc_htm.h"
Include dependency graph for cccc_xml.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CCCC_Xml_Stream
 

Functions

CCCC_Xml_Streamoperator<< (CCCC_Xml_Stream &os, const string &stg)
 
CCCC_Xml_Streamoperator<< (CCCC_Xml_Stream &os, const CCCC_Metric &mtc)
 
CCCC_Xml_Streamoperator<< (CCCC_Xml_Stream &os, const CCCC_Extent &ext)
 

Function Documentation

CCCC_Xml_Stream& operator<< ( CCCC_Xml_Stream os,
const string &  stg 
)

Definition at line 615 of file cccc_xml.cc.

616 {
617  // initialise a character pointer to the start of the string's buffer
618  const char *cptr=stg.c_str();
619  while(*cptr!='\000') {
620  char c=*cptr;
621 
622  // the purpose of this is to filter out the characters which
623  // must be escaped in HTML
624  switch(c) {
625  case '>': os.fstr << "&gt;" ; break;
626  case '<': os.fstr << "&lt;" ; break;
627  case '&': os.fstr << "&amp;"; break;
628  default : os.fstr << c;
629  }
630  cptr++;
631  }
632  return os;
633 }
ofstream fstr
Definition: cccc_xml.h:47
CCCC_Xml_Stream& operator<< ( CCCC_Xml_Stream os,
const CCCC_Metric mtc 
)

Definition at line 635 of file cccc_xml.cc.

636 {
637  // by writing to the underlying ostream object, we avoid the escape
638  // functionality
639  os.fstr << ltrim(mtc.value_string()) ;
640  return os;
641 }
static string ltrim(string value)
Definition: cccc_xml.cc:136
string value_string() const
Definition: cccc_met.cc:116
ofstream fstr
Definition: cccc_xml.h:47

Here is the call graph for this function:

CCCC_Xml_Stream& operator<< ( CCCC_Xml_Stream os,
const CCCC_Extent ext 
)