2019-05-15 05:56:59 +02:00
|
|
|
import { BitNodes } from "../BitNode/BitNode";
|
|
|
|
|
|
|
|
export class SourceFile {
|
2021-09-25 07:06:17 +02:00
|
|
|
info: JSX.Element;
|
2021-09-05 01:09:30 +02:00
|
|
|
lvl = 1;
|
|
|
|
n: number;
|
|
|
|
name: string;
|
|
|
|
owned = false;
|
2019-05-15 05:56:59 +02:00
|
|
|
|
2021-09-25 07:06:17 +02:00
|
|
|
constructor(number: number, info: JSX.Element) {
|
2021-09-05 01:09:30 +02:00
|
|
|
const bitnodeKey = "BitNode" + number;
|
|
|
|
const bitnode = BitNodes[bitnodeKey];
|
|
|
|
if (bitnode == null) {
|
|
|
|
throw new Error("Invalid Bit Node for this Source File");
|
2019-05-15 05:56:59 +02:00
|
|
|
}
|
2021-09-05 01:09:30 +02:00
|
|
|
|
|
|
|
this.n = number;
|
|
|
|
this.name = `Source-File ${number}: ${bitnode.name}`;
|
|
|
|
this.info = info;
|
|
|
|
}
|
2019-05-15 05:56:59 +02:00
|
|
|
}
|