util/ServerRef.h

Go to the documentation of this file.
00001 /*------------------------------------------------------------------------------
00002 Name:      ServerRef.h
00003 Project:   xmlBlaster.org
00004 Copyright: xmlBlaster.org, see xmlBlaster-LICENSE file
00005 Comment:   Holding serverRef address std::string and protocol std::string to
00006            access XmlBlaster
00007 ------------------------------------------------------------------------------*/
00008 
00017 #ifndef _UTIL_SERVERREF_H
00018 #define _UTIL_SERVERREF_H
00019 
00020 #include <util/XmlBCfg.h>
00021 #include <string>
00022 
00023 namespace org { namespace xmlBlaster { namespace util {
00024 
00025 class Dll_Export ServerRef
00026 {
00027 private:
00029    std::string address_;
00031    std::string type_;
00032 
00033 public:
00034 
00035     ServerRef(const ServerRef& serverRef);
00036 
00037     ServerRef& operator =(const ServerRef& serverRef);
00038 
00044    ServerRef(const std::string& type, const std::string& address="");
00045 
00051    void setAddress(const std::string& address);
00052 
00057    std::string getAddress() const;
00058 
00063    std::string getType() const;
00064 
00068    std::string toXml() const;
00069 
00076    std::string toXml(const std::string& extraOffset) const;
00077 };
00078 
00079 }}} // namespaces
00080 
00081 #endif