VirtualC64 v5.0 beta
Commodore 64 Emulator
Loading...
Searching...
No Matches
Script.h
1// -----------------------------------------------------------------------------
2// This file is part of VirtualC64
3//
4// Copyright (C) Dirk W. Hoffmann. www.dirkwhoffmann.de
5// This FILE is dual-licensed. You are free to choose between:
6//
7// - The GNU General Public License v3 (or any later version)
8// - The Mozilla Public License v2
9//
10// SPDX-License-Identifier: GPL-3.0-or-later OR MPL-2.0
11// -----------------------------------------------------------------------------
12
13#pragma once
14
15#include "AnyFile.h"
16
17namespace vc64 {
18
19class VirtualC64;
20
21class Script : public AnyFile {
22
23public:
24
25 //
26 // Class methods
27 //
28
29 static bool isCompatible(const fs::path &path);
30 static bool isCompatible(std::istream &stream);
31
32
33 //
34 // Initializing
35 //
36
37public:
38
39 // Script();
40 Script(const fs::path &path) throws { init(path); }
41 Script(const u8 *buf, isize len) throws { init(buf, len); }
42
43
44 //
45 // Methods from CoreObject
46 //
47
48 const char *objectName() const override { return "Script"; }
49
50
51 //
52 // Methods from AnyFile
53 //
54
55public:
56
57 bool isCompatiblePath(const fs::path &path) override { return isCompatible(path); }
58 bool isCompatibleStream(std::istream &stream) override { return isCompatible(stream); }
59 FileType type() const override { return FILETYPE_SCRIPT; }
60
61
62 //
63 // Processing
64 //
65
66 // Executes the script
67 // void execute(VirtualC64 &c64);
68};
69
70}
VirtualC64 project namespace.
Definition CmdQueue.cpp:16