|
|
1.1 root 1: //
2: // nono
3: // Copyright (C) 2018 [email protected]
4: //
5:
6: #include "event.h"
1.1.1.3 ! root 7: #include "scheduler.h"
1.1 root 8:
9: // 全イベントの配列
10: std::vector<Event *> gEvents;
11:
12: // コンストラクタ
13: Event::Event()
14: {
15: // 自身をリストに追加する
16: gEvents.push_back(this);
17: }
18:
19: // デストラクタ
20: Event::~Event()
21: {
22: }
1.1.1.2 root 23:
1.1.1.3 ! root 24: // イベントタイマーを開始する
! 25: void
! 26: Event::Start()
! 27: {
! 28: gScheduler->StartEvent(this);
! 29: }
! 30:
! 31: // イベントタイマーを停止する
! 32: void
! 33: Event::Stop()
! 34: {
! 35: gScheduler->StopEvent(this);
! 36: }
! 37:
1.1.1.2 root 38: // 名前をセットする
39: void
40: Event::SetName(const std::string& val)
41: {
42: name = val;
43: if (name.length() > 25) {
44: dev->putmsg("Event Name \"%s\" is too long(%d chars)",
45: name.c_str(), (int)name.length());
46: name.resize(25);
47: }
48: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.