Xalan-C++ API Reference  1.12.0
Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
xalanc::PrintWriter Class Referenceabstract

#include <xalanc/PlatformSupport/PrintWriter.hpp>

Inheritance diagram for xalanc::PrintWriter:
[legend]
Collaboration diagram for xalanc::PrintWriter:
[legend]

Public Member Functions

 PrintWriter (bool fAutoFlush=false, MemoryManager &theManager XALAN_DEFAULT_MEMMGR)
 Constructor. More...
 
MemoryManager & getMemoryManager ()
 
virtual ~PrintWriter ()
 
virtual bool checkError () const =0
 Flush the stream, then check the error status. More...
 
virtual void close ()=0
 Close the stream. More...
 
virtual void flush ()=0
 Flush the stream. More...
 
virtual void write (const char *s, size_t theOffset=0, size_t theLength=npos)=0
 Writes a string. More...
 
virtual void write (const XalanDOMChar *s, XalanDOMString::size_type theOffset=0, XalanDOMString::size_type theLength=XalanDOMString::npos)=0
 Writes a string. More...
 
virtual void write (XalanDOMChar c)=0
 Writes a character. More...
 
virtual void write (const XalanDOMString &s, XalanDOMString::size_type theOffset=0, XalanDOMString::size_type theLength=XalanDOMString::npos)=0
 Writes a string. More...
 
virtual void print (bool b)=0
 
virtual void print (char c)=0
 
virtual void print (const char *s, size_t theLength=npos)=0
 
virtual void print (const XalanDOMChar *s, XalanDOMString::size_type theLength=XalanDOMString::npos)=0
 
virtual void print (double d)=0
 
virtual void print (XMLInt32 i)=0
 
virtual void print (XMLInt64 l)=0
 
virtual void print (const XalanDOMString &s)=0
 
virtual void println ()=0
 
virtual void println (bool b)=0
 
virtual void println (char x)=0
 
virtual void println (const char *s, size_t theLength=npos)=0
 
virtual void println (const XalanDOMChar *s, XalanDOMString::size_type theLength=XalanDOMString::npos)=0
 
virtual void println (double x)=0
 
virtual void println (XMLInt32 x)=0
 
virtual void println (XMLInt64 x)=0
 
virtual void println (const XalanDOMString &s)=0
 
- Public Member Functions inherited from xalanc::Writer
 Writer ()
 
virtual ~Writer ()
 
virtual XalanOutputStreamgetStream ()
 Get the stream associated with the writer... More...
 
virtual const XalanOutputStreamgetStream () const
 Get the stream associated with the writer... More...
 

Protected Attributes

const bool m_fAutoFlush
 
MemoryManager & m_memoryManager
 

Static Protected Attributes

static const XalanDOMChar s_trueString []
 
static const XalanDOMChar s_falseString []
 
static const XalanDOMChar s_newlineString []
 

Additional Inherited Members

- Static Public Attributes inherited from xalanc::Writer
static const size_t npos
 

Detailed Description

Definition at line 37 of file PrintWriter.hpp.

Constructor & Destructor Documentation

◆ PrintWriter()

xalanc::PrintWriter::PrintWriter ( bool  fAutoFlush = false,
MemoryManager &theManager  XALAN_DEFAULT_MEMMGR 
)

Constructor.

Parameters
fAutoFlushif true, the output will not be buffered

◆ ~PrintWriter()

virtual xalanc::PrintWriter::~PrintWriter ( )
virtual

Member Function Documentation

◆ checkError()

virtual bool xalanc::PrintWriter::checkError ( ) const
pure virtual

Flush the stream, then check the error status.

Returns
true if no errors

Implemented in xalanc::XalanOutputStreamPrintWriter, xalanc::DOMStringPrintWriter, and xalanc::NullPrintWriter.

◆ close()

virtual void xalanc::PrintWriter::close ( )
pure virtual

◆ flush()

virtual void xalanc::PrintWriter::flush ( )
pure virtual

◆ getMemoryManager()

MemoryManager& xalanc::PrintWriter::getMemoryManager ( )
inline

Definition at line 49 of file PrintWriter.hpp.

◆ print() [1/8]

virtual void xalanc::PrintWriter::print ( bool  b)
pure virtual

◆ print() [2/8]

virtual void xalanc::PrintWriter::print ( char  c)
pure virtual

◆ print() [3/8]

virtual void xalanc::PrintWriter::print ( const char *  s,
size_t  theLength = npos 
)
pure virtual

◆ print() [4/8]

virtual void xalanc::PrintWriter::print ( const XalanDOMChar *  s,
XalanDOMString::size_type  theLength = XalanDOMString::npos 
)
pure virtual

◆ print() [5/8]

virtual void xalanc::PrintWriter::print ( const XalanDOMString s)
pure virtual

◆ print() [6/8]

virtual void xalanc::PrintWriter::print ( double  d)
pure virtual

◆ print() [7/8]

virtual void xalanc::PrintWriter::print ( XMLInt32  i)
pure virtual

◆ print() [8/8]

virtual void xalanc::PrintWriter::print ( XMLInt64  l)
pure virtual

◆ println() [1/9]

virtual void xalanc::PrintWriter::println ( )
pure virtual

◆ println() [2/9]

virtual void xalanc::PrintWriter::println ( bool  b)
pure virtual

◆ println() [3/9]

virtual void xalanc::PrintWriter::println ( char  x)
pure virtual

◆ println() [4/9]

virtual void xalanc::PrintWriter::println ( const char *  s,
size_t  theLength = npos 
)
pure virtual

◆ println() [5/9]

virtual void xalanc::PrintWriter::println ( const XalanDOMChar *  s,
XalanDOMString::size_type  theLength = XalanDOMString::npos 
)
pure virtual

◆ println() [6/9]

virtual void xalanc::PrintWriter::println ( const XalanDOMString s)
pure virtual

◆ println() [7/9]

virtual void xalanc::PrintWriter::println ( double  x)
pure virtual

◆ println() [8/9]

virtual void xalanc::PrintWriter::println ( XMLInt32  x)
pure virtual

◆ println() [9/9]

virtual void xalanc::PrintWriter::println ( XMLInt64  x)
pure virtual

◆ write() [1/4]

virtual void xalanc::PrintWriter::write ( const char *  s,
size_t  theOffset = 0,
size_t  theLength = npos 
)
pure virtual

Writes a string.

Parameters
sstring to write
theOffsetstarting offset in string to begin writing, default 0
theLengthnumber of characters to write. If the length is npos, then the array is assumed to be null-terminated.

Implements xalanc::Writer.

Implemented in xalanc::XalanOutputStreamPrintWriter, xalanc::DOMStringPrintWriter, and xalanc::NullPrintWriter.

◆ write() [2/4]

virtual void xalanc::PrintWriter::write ( const XalanDOMChar *  s,
XalanDOMString::size_type  theOffset = 0,
XalanDOMString::size_type  theLength = XalanDOMString::npos 
)
pure virtual

Writes a string.

Parameters
sstring to write
theOffsetstarting offset in string to begin writing, default 0
theLengthnumber of characters to write. If the length is XalanDOMString::npos, then the array is assumed to be null-terminated.

Implements xalanc::Writer.

Implemented in xalanc::XalanOutputStreamPrintWriter, xalanc::DOMStringPrintWriter, and xalanc::NullPrintWriter.

◆ write() [3/4]

virtual void xalanc::PrintWriter::write ( const XalanDOMString s,
XalanDOMString::size_type  theOffset = 0,
XalanDOMString::size_type  theLength = XalanDOMString::npos 
)
pure virtual

Writes a string.

Parameters
sstring to write
theOffsetstarting offset in string to begin writing, default 0
theLengthnumber of characters to write. If the length is XalanDOMString::npos, then the entire string is printed.

Implements xalanc::Writer.

Implemented in xalanc::XalanOutputStreamPrintWriter, xalanc::DOMStringPrintWriter, and xalanc::NullPrintWriter.

◆ write() [4/4]

virtual void xalanc::PrintWriter::write ( XalanDOMChar  c)
pure virtual

Writes a character.

Parameters
ccharacter to write

Implements xalanc::Writer.

Implemented in xalanc::XalanOutputStreamPrintWriter, xalanc::DOMStringPrintWriter, and xalanc::NullPrintWriter.

Member Data Documentation

◆ m_fAutoFlush

const bool xalanc::PrintWriter::m_fAutoFlush
protected

Definition at line 164 of file PrintWriter.hpp.

◆ m_memoryManager

MemoryManager& xalanc::PrintWriter::m_memoryManager
protected

Definition at line 166 of file PrintWriter.hpp.

◆ s_falseString

const XalanDOMChar xalanc::PrintWriter::s_falseString[]
staticprotected

Definition at line 171 of file PrintWriter.hpp.

◆ s_newlineString

const XalanDOMChar xalanc::PrintWriter::s_newlineString[]
staticprotected

Definition at line 173 of file PrintWriter.hpp.

◆ s_trueString

const XalanDOMChar xalanc::PrintWriter::s_trueString[]
staticprotected

Definition at line 169 of file PrintWriter.hpp.


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