Functions
xmlcode.h File Reference
#include "types.h"

Go to the source code of this file.

Functions

void parseXmlCode (CodeOutputInterface &, const char *, const QCString &, bool, const char *, FileDef *fd, int startLine, int endLine, bool inlineFragment, MemberDef *memberDef, bool showLineNumbers, Definition *searchCtx, bool collectXRefs)
 
void resetXmlCodeParserState ()
 

Function Documentation

void parseXmlCode ( CodeOutputInterface ,
const char *  ,
const QCString ,
bool  ,
const char *  ,
FileDef fd,
int  startLine,
int  endLine,
bool  inlineFragment,
MemberDef memberDef,
bool  showLineNumbers,
Definition searchCtx,
bool  collectXRefs 
)

Definition at line 2081 of file xmlcode.cpp.

2095 {
2096  if (s.isEmpty()) return;
2097 
2099 
2100  g_code = &od;
2101  g_inputString = s;
2102  g_inputPosition = 0;
2103  g_currentFontClass = 0;
2105  g_searchCtx=searchCtx;
2106 
2107  if (endLine!=-1)
2108  g_inputLines = endLine+1;
2109  else
2111 
2112  if (startLine!=-1)
2113  g_yyLineNr = startLine;
2114  else
2115  g_yyLineNr = 1;
2116 
2117  g_exampleName = exName;
2118  g_sourceFileDef = fd;
2119 
2120  bool cleanupSourceDef = FALSE;
2121 
2122  if (fd==0)
2123  {
2124  // create a dummy filedef for the example
2125  g_sourceFileDef = new FileDef("",(exName?exName:"generated"));
2126  cleanupSourceDef = TRUE;
2127  }
2128 
2129  if (g_sourceFileDef)
2130  {
2131  setCurrentDoc("l00001");
2132  }
2133 
2134  // Starts line 1 on the output
2135  startCodeLine();
2136 
2138 
2139  xmlcodeYYlex();
2140 
2141  if (g_needsTermination)
2142  {
2143  endCodeLine();
2144  }
2145  if (fd)
2146  {
2148  }
2149  if (cleanupSourceDef)
2150  {
2151  // delete the temporary file definition used for this example
2152  delete g_sourceFileDef;
2153  g_sourceFileDef=0;
2154  }
2155 
2156  return;
2157 }
bool isEmpty() const
Definition: qcstring.h:189
static void setCurrentDoc(const QCString &anchor)
Definition: xmlcode.cpp:580
static Definition * g_searchCtx
Definition: xmlcode.cpp:557
const bool FALSE
Definition: qglobal.h:370
static void endCodeLine()
Definition: xmlcode.cpp:651
static const char * g_currentFontClass
Definition: xmlcode.cpp:573
void clearTooltips()
Definition: tooltip.cpp:54
static int g_inputPosition
read offset during parsing
Definition: xmlcode.cpp:553
void xmlcodeYYrestart(FILE *input_file)
Definition: xmlcode.cpp:1528
static CodeOutputInterface * g_code
Definition: xmlcode.cpp:548
static void startCodeLine()
Definition: xmlcode.cpp:599
FILE * xmlcodeYYin
Definition: xmlcode.cpp:359
static QCString g_exampleName
Definition: xmlcode.cpp:559
static int g_yyLineNr
current line number
Definition: xmlcode.cpp:555
void writeTooltips(CodeOutputInterface &ol)
Definition: tooltip.cpp:93
int xmlcodeYYlex(void)
static int g_inputLines
number of line in the code fragment
Definition: xmlcode.cpp:554
static TooltipManager * instance()
Definition: tooltip.cpp:45
static const char * g_inputString
the code fragment as text
Definition: xmlcode.cpp:552
static bool g_needsTermination
Definition: xmlcode.cpp:556
static int countLines()
Definition: xmlcode.cpp:703
static QCString * s
Definition: config.cpp:1042
const bool TRUE
Definition: qglobal.h:371
static FileDef * g_sourceFileDef
Definition: xmlcode.cpp:569
void resetXmlCodeParserState ( )

Definition at line 2159 of file xmlcode.cpp.

2160 {
2161  g_currentDefinition = 0;
2162  g_currentMemberDef = 0;
2163 }
static Definition * g_currentDefinition
Definition: xmlcode.cpp:570
static MemberDef * g_currentMemberDef
Definition: xmlcode.cpp:571