My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
TextGeneratorOLImpl Class Reference

#include <util.h>

Inheritance diagram for TextGeneratorOLImpl:
TextGeneratorIntf

Public Member Functions

virtual ~TextGeneratorOLImpl ()
 
 TextGeneratorOLImpl (OutputDocInterface &od)
 
void writeString (const char *s, bool keepSpaces) const
 
void writeBreak (int indent) const
 
void writeLink (const char *extRef, const char *file, const char *anchor, const char *text) const
 
- Public Member Functions inherited from TextGeneratorIntf
virtual ~TextGeneratorIntf ()
 

Private Attributes

OutputDocInterfacem_od
 

Detailed Description

Implements TextGeneratorIntf for an OutputDocInterface stream.

Definition at line 77 of file util.h.

Constructor & Destructor Documentation

virtual TextGeneratorOLImpl::~TextGeneratorOLImpl ( )
inlinevirtual

Definition at line 80 of file util.h.

{}
TextGeneratorOLImpl::TextGeneratorOLImpl ( OutputDocInterface od)

Definition at line 97 of file util.cpp.

: m_od(od)
{
}

Member Function Documentation

void TextGeneratorOLImpl::writeBreak ( int  indent) const
virtual

Implements TextGeneratorIntf.

Definition at line 126 of file util.cpp.

References BaseOutputDocInterface::lineBreak(), m_od, and BaseOutputDocInterface::writeNonBreakableSpace().

{
m_od.lineBreak("typebreak");
int i;
for (i=0;i<indent;i++)
{
}
}
void TextGeneratorOLImpl::writeLink ( const char *  extRef,
const char *  file,
const char *  anchor,
const char *  text 
) const
virtual

Implements TextGeneratorIntf.

Definition at line 136 of file util.cpp.

References m_od, and BaseOutputDocInterface::writeObjectLink().

{
//printf("TextGeneratorOlImpl::writeLink('%s')\n",text);
m_od.writeObjectLink(extRef,file,anchor,text);
}
void TextGeneratorOLImpl::writeString ( const char *  s,
bool  keepSpaces 
) const
virtual

Implements TextGeneratorIntf.

Definition at line 101 of file util.cpp.

References BaseOutputDocInterface::docify(), m_od, and BaseOutputDocInterface::writeNonBreakableSpace().

{
if (s==0) return;
//printf("TextGeneratorOlImpl::writeString('%s',%d)\n",s,keepSpaces);
if (keepSpaces)
{
const char *p=s;
if (p)
{
char cs[2];
char c;
cs[1]='\0';
while ((c=*p++))
{
if (c==' ') m_od.writeNonBreakableSpace(1);
else cs[0]=c,m_od.docify(cs);
}
}
}
else
{
m_od.docify(s);
}
}

Member Data Documentation

OutputDocInterface& TextGeneratorOLImpl::m_od
private

Definition at line 88 of file util.h.

Referenced by writeBreak(), writeLink(), and writeString().


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