整理代码
This commit is contained in:
commit
c7b4e178ec
364 changed files with 59691 additions and 0 deletions
45
hardware/BoardInfo.h
Normal file
45
hardware/BoardInfo.h
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
#ifndef FD5BB51A_6CF1_4A59_B157_25E320495F52
|
||||
#define FD5BB51A_6CF1_4A59_B157_25E320495F52
|
||||
/*
|
||||
*******************************************************************************
|
||||
* INCLUDE
|
||||
*******************************************************************************
|
||||
*/
|
||||
#include <Poco/SharedPtr.h>
|
||||
|
||||
namespace Hardware
|
||||
{
|
||||
/*
|
||||
*******************************************************************************
|
||||
* CLASS DECLARE
|
||||
*******************************************************************************
|
||||
*/
|
||||
class Board
|
||||
{
|
||||
public:
|
||||
using Ptr = Poco::SharedPtr<Board>;
|
||||
|
||||
public:
|
||||
~Board();
|
||||
|
||||
public:
|
||||
virtual std::string serialNumber() = 0;
|
||||
};
|
||||
|
||||
class BoardInfo
|
||||
{
|
||||
public:
|
||||
static void registerBoard(Board::Ptr pBoard);
|
||||
|
||||
static std::string serialNumber();
|
||||
|
||||
private:
|
||||
static Board::Ptr _pBoard;
|
||||
};
|
||||
|
||||
inline void BoardInfo::registerBoard(Board::Ptr pBoard)
|
||||
{
|
||||
_pBoard = pBoard;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue