📄 host.h
字号:
#ifndef UTILS_BASE_HOST_H_#define UTILS_BASE_HOST_H_#include <string>#include <vector>#include "network.h"namespace utils_base {// Provides information about a host in the network.class Host {public: Host(const std::string& name, std::vector<Network*>* networks) : name_(name), networks_(networks) { } const std::string& name() const { return name_; } const std::vector<Network*>& networks() const { return *networks_; }private: std::string name_; std::vector<Network*>* networks_;};// Returns a reference to the description of the local host.const Host& LocalHost();// Returns the name of the local host.std::string GetHostName();} // namespace utils_base#endif // UTILS_BASE_HOST_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -