nodeid.h

来自「java开源的企业总线.xmlBlaster」· C头文件 代码 · 共 63 行

H
63
字号
/*------------------------------------------------------------------------------Name:      NodeId.hProject:   xmlBlaster.orgCopyright: xmlBlaster.org, see xmlBlaster-LICENSE fileComment:   Holds the unique name of a cluster node------------------------------------------------------------------------------*//** * Holds the unique name of an xmlBlaster server instance (= cluster node) * @author xmlBlaster@marcelruff.info  * @author laghi@swissinfo.org  * @since 0.79e * @url http://www.xmlBlaster.org/xmlBlaster/doc/requirements/cluster.html */#ifndef _UTIL_CLUSTER_NODEID_H#define _UTIL_CLUSTER_NODEID_H#include <util/xmlBlasterDef.h>#include <string>#include <util/I_Log.h>namespace org { namespace xmlBlaster { namespace util { namespace cluster {class Dll_Export NodeId{private:   const std::string ME;   std::string       id_;   org::xmlBlaster::util::Global&      global_;   org::xmlBlaster::util::I_Log&       log_;public:   NodeId(org::xmlBlaster::util::Global& global, const std::string& id);   NodeId(const NodeId& nodeId);   NodeId& operator =(const NodeId& nodeId);   std::string getId() const;   /**    * @param id The cluster node id, e.g. "heron".<br />    * If you pass "/node/heron/client/joe" everything ins stripped to get "heron"    */   void setId(const std::string& id);   std::string toString() const;   /**    * Needed for use in TreeSet and TreeMap, enforced by java.lang.Comparable    */   bool operator <(const NodeId& nodeId) const;   bool operator ==(const NodeId& nodeId) const;};}}}} // namespace#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?