⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 signal.hpp

📁 RFID reader 语 tag 模拟器
💻 HPP
字号:
 #ifndef SIGNAL_H #define SIGNAL_H #include <iostream> using namespace std; #include <boost/shared_ptr.hpp> #include "location.hpp" #include "utility.hpp" class WirelessCommSignal; class Signal {    friend ostream& operator<< (ostream& s, const Signal& rhs);    friend ostream& operator<< (ostream& s, const WirelessCommSignal& rhs); public:    typedef boost::shared_ptr<Signal> SignalPtr;    virtual ~Signal();    static inline SignalPtr create(const Location& location,       double dbStrength);    static inline SignalPtr create(const Signal& rhs);    inline Location getLocation() const;    inline double getDbStrength() const; protected:    Signal(const Location& location, double dbStrength);    Signal(const Signal& rhs);    virtual SignalPtr clone() const; private:    Location m_location;    double m_dbStrength;    Signal& operator= (const Signal& rhs); }; typedef boost::shared_ptr<Signal> SignalPtr; // Inline Functions inline SignalPtr Signal::create(const Location& location,    double dbStrength) {    SignalPtr p(new Signal(location, dbStrength));    return p; } inline SignalPtr Signal::create(const Signal& rhs) {    return rhs.clone(); } inline Location Signal::getLocation() const {    return m_location; } inline double Signal::getDbStrength() const {    return m_dbStrength; } // Overloaded Operators inline ostream& operator<< (ostream& s, const Signal& rhs) {    return s << "Signal state (pointer= " << &rhs <<       ", location=(" << rhs.m_location <<       "), db strength= " << rhs.m_dbStrength << ")"; } #endif // SIGNAL_H

⌨️ 快捷键说明

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