org::xmlBlaster::util::XmlQoSBase Class Reference

In good old C days this would have been named a 'flag' (with bit wise setting)
But this allows to specify QoS (quality of service) in XML syntax. More...

Inheritance diagram for org::xmlBlaster::util::XmlQoSBase:

Inheritance graph
[legend]
Collaboration diagram for org::xmlBlaster::util::XmlQoSBase:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 XmlQoSBase (org::xmlBlaster::util::Global &global)
 Constructs an un initialized QoS (quality of service) object.
void startElement (std::string &name, parser::AttributeMap &attrs)
 Start element.
void endElement (std::string &name)
 End element.

Protected Member Functions

bool isEmpty (std::string &qos)
 To avoid SAX parsing (which costs many CPU cycles) check the QoS std::string here if it contains anything useful.
bool startElementBase (std::string &name, parser::AttributeMap &)
 Start element callback, does handling of tag <qos>.
bool endElementBase (std::string &name)
 End element callback, does handling of tag <qos>.

Protected Attributes

bool inQos_

Detailed Description

In good old C days this would have been named a 'flag' (with bit wise setting)
But this allows to specify QoS (quality of service) in XML syntax.

With XML there are no problems to extend the services of the xmlBlaster in unlimited ways.
The xml std::string is parsed with a SAX parser, since no persistent DOM tree is needed and SAX is much faster.

You may use this as a base class for your specialized QoS.
The <qos> tag is parsed here, and you provide the parsing of the inner tags.

Definition at line 31 of file XmlQoSBase.h.


Constructor & Destructor Documentation

org::xmlBlaster::util::XmlQoSBase::XmlQoSBase ( org::xmlBlaster::util::Global global  ) 

Constructs an un initialized QoS (quality of service) object.

You need to call the init() method to parse the XML std::string.

Definition at line 19 of file XmlQoSBase.cpp.

References inQos_.


Member Function Documentation

bool org::xmlBlaster::util::XmlQoSBase::isEmpty ( std::string &  qos  )  [protected]

To avoid SAX parsing (which costs many CPU cycles) check the QoS std::string here if it contains anything useful.

Parameters:
qos The literal ASCII xml std::string

bool org::xmlBlaster::util::XmlQoSBase::startElementBase ( std::string &  name,
parser::AttributeMap  
) [protected]

Start element callback, does handling of tag <qos>.

You may include this into your derived startElement() method like this:

  if (util::XmlQoSBase::startElementBase(name, attrs)) return;
 
Returns:
true if the tag is parsed here, the derived class doesn't need to look at this tag anymore false this tag is not handled by this Base class

void org::xmlBlaster::util::XmlQoSBase::startElement ( std::string &  name,
parser::AttributeMap attrs 
)

Start element.

Default implementation, knows how to parse <qos> but knows nothing about the tags inside of qos

Reimplemented in org::xmlBlaster::util::qos::SessionQosFactory.

bool org::xmlBlaster::util::XmlQoSBase::endElementBase ( std::string &  name  )  [protected]

End element callback, does handling of tag <qos>.

You may include this into your derived endElement() method like this:

  if (SaxHandlerBase::endElementBase(name) == true)
     return;
 
Returns:
true if the tag is parsed here, the derived class doesn't need to look at this tag anymore false this tag is not handled by this Base class

void org::xmlBlaster::util::XmlQoSBase::endElement ( std::string &  name  ) 

End element.

Default implementation, knows how to parse <qos> but knows nothing about the tags inside of qos

Reimplemented in org::xmlBlaster::util::qos::SessionQosFactory.


Member Data Documentation

bool org::xmlBlaster::util::XmlQoSBase::inQos_ [protected]

Definition at line 43 of file XmlQoSBase.h.

Referenced by XmlQoSBase().


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