counter.cpp

来自「financal instrument pricing using c」· C++ 代码 · 共 33 行

CPP
33
字号
// 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 + =
减小字号Ctrl + -
显示快捷键?