Doxygen
Loading...
Searching...
No Matches
outputgen.h File Reference
#include <memory>
#include "construct.h"
#include "docparser.h"
#include "index.h"
#include "section.h"
#include "textstream.h"
#include "types.h"
Include dependency graph for outputgen.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  DocLinkInfo
struct  SourceLinkInfo
class  OutputCodeIntf
 Base class for code generators. More...
class  OutputGenerator
 Base class for shared implementation for all output generators. More...
class  OutputGenIntf
 Abstract interface for output generators. More...

Enumerations

enum class  OutputType {
  List , Html , Latex , Man ,
  RTF , Docbook , XML , Null ,
  Extension , Recorder
}

Functions

size_t updateColumnCount (const char *s, size_t col)

Enumeration Type Documentation

◆ OutputType

enum class OutputType
strong
Enumerator
List 
Html 
Latex 
Man 
RTF 
Docbook 
XML 
Null 
Extension 
Recorder 

Definition at line 56 of file outputgen.h.

Function Documentation

◆ updateColumnCount()

size_t updateColumnCount ( const char * s,
size_t col )

Definition at line 58 of file outputgen.cpp.

59{
60 if (s)
61 {
62 const int tabSize = Config_getInt(TAB_SIZE);
63 char c;
64 while ((c=*s++))
65 {
66 switch(c)
67 {
68 case '\t': col+=tabSize - (col%tabSize);
69 break;
70 case '\n': col=0;
71 break;
72 default:
73 col++;
74 if (c<0) // multi-byte character
75 {
76 int numBytes = getUTF8CharNumBytes(c);
77 for (int i=0;i<numBytes-1 && (c=*s++);i++) {} // skip over extra chars
78 if (c==0) return col; // end of string half way a multibyte char
79 }
80 break;
81 }
82 }
83 }
84 return col;
85}
#define Config_getInt(name)
Definition config.h:34
uint8_t getUTF8CharNumBytes(char c)
Returns the number of bytes making up a single UTF8 character given the first byte in the sequence.
Definition utf8.cpp:27

References Config_getInt, and getUTF8CharNumBytes().

Referenced by HtmlCodeGenerator::codify(), LatexCodeGenerator::codify(), ManCodeGenerator::codify(), RTFCodeGenerator::codify(), OutputGenIntf::endEmbeddedDoc(), writeDocbookCodeString(), and writeXMLCodeString().