📄 nodeid.h
字号:
/*------------------------------------------------------------------------------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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -