util/qos/address/AddressFactory.h

Go to the documentation of this file.
00001 /*------------------------------------------------------------------------------
00002 Name:      AddressFactory.h
00003 Project:   xmlBlaster.org
00004 Copyright: xmlBlaster.org, see xmlBlaster-LICENSE file
00005 Comment:   Factory Object for parsing org::xmlBlaster::util::qos::address::Address objects.
00006 Author:    laghi
00007 ------------------------------------------------------------------------------*/
00008 
00018 #ifndef _UTIL_CFG_ADDRESSFACTORY_H
00019 #define _UTIL_CFG_ADDRESSFACTORY_H
00020 
00021 #include <util/parser/XmlHandlerBase.h>
00022 #include <util/qos/address/AddressBase.h>
00023 
00024 namespace org { namespace xmlBlaster { namespace util { namespace qos { namespace address {
00025 
00026 class Dll_Export AddressFactory : public parser::XmlHandlerBase
00027 {
00028 private:
00029    const std::string ME;
00030    org::xmlBlaster::util::qos::address::AddressBaseRef address_;
00031    std::string attributeKey_;
00032    bool inAttribute_;
00033    ClientProperty* attribute_;
00034 
00038    AddressFactory(const AddressFactory& rhs);
00039 
00043    AddressFactory& operator=(const AddressFactory& rhs);
00044 
00045 public:
00046    AddressFactory(org::xmlBlaster::util::Global& global);
00047 
00048    ~AddressFactory();
00049 
00050    void reset(const AddressBaseRef& address);
00051 
00052    org::xmlBlaster::util::qos::address::AddressBaseRef getAddress();
00053 
00057    // void startElement(const std::string& uri, const std::string& localName, const std::string& name, const std::string& character, Attributes attrs)
00058    void startElement(const std::string &name, const parser::AttributeMap& attrs);
00059 
00061    // public final void endElement(String uri, String localName, String name, StringBuffer character) {
00062    void endElement(const std::string &name);
00063 
00064    org::xmlBlaster::util::qos::address::AddressBaseRef readAddress(const std::string& litteral, const org::xmlBlaster::util::qos::address::AddressBaseRef& address);
00065 };
00066 
00067 }}}}} // namespaces
00068 
00069 #endif