nidas  v1.2-1520
Public Member Functions | Private Member Functions | Private Attributes | List of all members
nidas::core::XMLFdFormatTarget Class Reference

Extension of xercesc::XMLFormatTarget support writing XML to an open device (socket for example). More...

#include <XMLFdFormatTarget.h>

Inheritance diagram for nidas::core::XMLFdFormatTarget:
Inheritance graph
[legend]

Public Member Functions

 XMLFdFormatTarget (const std::string &n, int f)
 Constructor. More...
 
 ~XMLFdFormatTarget ()
 Destructor. More...
 
void flush () throw (nidas::util::IOException)
 
void writeChars (const XMLByte *const toWrite, const unsigned int count, xercesc::XMLFormatter *const ) throw (nidas::util::IOException)
 Implemention of virtual write method of xercesc::XMLFormatTarget. More...
 

Private Member Functions

void insureCapacity (unsigned int count) throw (nidas::util::IOException)
 
 XMLFdFormatTarget (const XMLFdFormatTarget &)
 No copy. More...
 
XMLFdFormatTargetoperator= (const XMLFdFormatTarget &)
 No assignment. More...
 

Private Attributes

std::string name
 
int fd
 
XMLByte * fDataBuf
 
unsigned int fIndex
 
unsigned int fCapacity
 
bool _isSocket
 

Detailed Description

Extension of xercesc::XMLFormatTarget support writing XML to an open device (socket for example).

Constructor & Destructor Documentation

XMLFdFormatTarget::XMLFdFormatTarget ( const std::string &  n,
int  f 
)

Constructor.

Parameters
nname of device - only used when reporting errors.
funix file descriptor of device that is already open.

References _isSocket, fCapacity, fd, and fDataBuf.

XMLFdFormatTarget::~XMLFdFormatTarget ( )

Destructor.

Does not close file descriptor.

References fDataBuf.

nidas::core::XMLFdFormatTarget::XMLFdFormatTarget ( const XMLFdFormatTarget )
private

No copy.

Member Function Documentation

void XMLFdFormatTarget::flush ( )
throw (nidas::util::IOException
)

References _isSocket, fd, fDataBuf, fIndex, and name.

void XMLFdFormatTarget::insureCapacity ( unsigned int  count)
throw (nidas::util::IOException
)
private
XMLFdFormatTarget& nidas::core::XMLFdFormatTarget::operator= ( const XMLFdFormatTarget )
private

No assignment.

void XMLFdFormatTarget::writeChars ( const XMLByte *const  toWrite,
const unsigned int  count,
xercesc::XMLFormatter * const   
)
throw (nidas::util::IOException
)

Implemention of virtual write method of xercesc::XMLFormatTarget.

Does buffered writes to the file descriptor.

Member Data Documentation

bool nidas::core::XMLFdFormatTarget::_isSocket
private

Referenced by flush(), and XMLFdFormatTarget().

unsigned int nidas::core::XMLFdFormatTarget::fCapacity
private

Referenced by XMLFdFormatTarget().

int nidas::core::XMLFdFormatTarget::fd
private

Referenced by flush(), and XMLFdFormatTarget().

XMLByte* nidas::core::XMLFdFormatTarget::fDataBuf
private
unsigned int nidas::core::XMLFdFormatTarget::fIndex
private

Referenced by flush().

std::string nidas::core::XMLFdFormatTarget::name
private

Referenced by flush().


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