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