nidas v1.2.3
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.
 
 ~XMLFdFormatTarget ()
 Destructor.
 
void flush ()
 
void writeChars (const XMLByte *const toWrite, const XMLSize_t count, xercesc::XMLFormatter *const)
 Implemention of virtual write method of xercesc::XMLFormatTarget.
 

Private Member Functions

void insureCapacity (unsigned int count)
 
 XMLFdFormatTarget (const XMLFdFormatTarget &)
 No copy.
 
XMLFdFormatTargetoperator= (const XMLFdFormatTarget &)
 No assignment.
 

Private Attributes

std::string name
 
int fd
 
XMLBytefDataBuf
 
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() [1/2]

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, fDataBuf, and nidas::core::getSample().

◆ ~XMLFdFormatTarget()

XMLFdFormatTarget::~XMLFdFormatTarget ( )

Destructor.

Does not close file descriptor.

References fDataBuf.

◆ XMLFdFormatTarget() [2/2]

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

No copy.

Member Function Documentation

◆ flush()

void XMLFdFormatTarget::flush ( )

◆ insureCapacity()

void XMLFdFormatTarget::insureCapacity ( unsigned int count)
private

◆ operator=()

XMLFdFormatTarget & nidas::core::XMLFdFormatTarget::operator= ( const XMLFdFormatTarget & )
private

No assignment.

◆ writeChars()

void XMLFdFormatTarget::writeChars ( const XMLByte *const toWrite,
const XMLSize_t count,
xercesc::XMLFormatter * const  )

Implemention of virtual write method of xercesc::XMLFormatTarget.

Does buffered writes to the file descriptor.

References fDataBuf, fIndex, nidas::core::getSample(), and insureCapacity().

Member Data Documentation

◆ _isSocket

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

Referenced by flush(), and XMLFdFormatTarget().

◆ fCapacity

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

◆ fd

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

Referenced by flush(), and XMLFdFormatTarget().

◆ fDataBuf

XMLByte* nidas::core::XMLFdFormatTarget::fDataBuf
private

◆ fIndex

unsigned int nidas::core::XMLFdFormatTarget::fIndex
private

Referenced by flush(), insureCapacity(), and writeChars().

◆ name

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

Referenced by flush().


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