📄 counter.cpp
字号:
// Counter.cpp
//
// (C) Datasim Education BV 2001
#include "Counter.hpp"
Counter::Counter()
{// Default constructor
CounterValue = 0;
}
Counter::~Counter()
{// Destructor
}
// Selectors
long Counter::GetCounter() const
{// Return the counter value
return CounterValue;
}
// Increase the internal counter
void Counter::IncreaseCounter()
{
CounterValue++;
NotifyObservers();
}
// Decrease the internal counter
void Counter::DecreaseCounter()
{
CounterValue--;
NotifyObservers();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -