Simple Nano Circuit 0.0.2
PowerACObject.h
1#ifndef _PowerACObject_H_
2#define _PowerACObject_H_
3
4#include <SDL.h>
5#include "../BaseIcObject.h"
6#include "../symbols/powerac.c"
7
9{
10 private:
11 double maxVoltage = 10.0;
12 double frequency = 50; // 频率 50Hz
13
14 void init() override;
15 void setupFootPins() override;
16
17 struct StoreData
18 {
19 ICType id;
20 SDL_Point centerPos;
21 int rotateNumber;
22 int mirrowNumber;
23 double maxVoltage;
24 double frequency;
25 };
26 StoreData storeData;
27
28 public:
31 PowerACObject(const unsigned char*, AsgardClass*);
33
34 const ICType getType() const override {return ICType::PowerAC;}
35
36 BaseElectronObject* deepDuplicateSelf() override;
37
38 double getVoltageFrom(const FootPinNode*) override;
39
40 bool havePopupWindow() override {return true;}
41 const char* popupWindowName() const override {return "PowerACObject";}
42 void CreateImGuiForm() override;
43
44 void saveToFile(std::ofstream&) override;
45};
46
47#endif
Definition: AsgardClass.h:17
Definition: BaseElectronObject.h:13
Definition: BaseIcObject.h:11
Definition: FootPinNode.h:15
Definition: PowerACObject.h:9