mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-19 07:31:15 +00:00
Include the PC target and analyser.
This commit is contained in:
parent
f7acecfbff
commit
edc36bf3f4
25
Analyser/Static/PCCompatible/StaticAnalyser.cpp
Normal file
25
Analyser/Static/PCCompatible/StaticAnalyser.cpp
Normal file
@ -0,0 +1,25 @@
|
||||
//
|
||||
// StaticAnalyser.cpp
|
||||
// Clock Signal
|
||||
//
|
||||
// Created by Thomas Harte on 03/10/2019.
|
||||
// Copyright © 2019 Thomas Harte. All rights reserved.
|
||||
//
|
||||
|
||||
#include "StaticAnalyser.hpp"
|
||||
#include "Target.hpp"
|
||||
|
||||
Analyser::Static::TargetList Analyser::Static::PCCompatible::GetTargets(const Media &media, const std::string &, TargetPlatform::IntType) {
|
||||
// This analyser can comprehend disks only.
|
||||
if(media.disks.empty()) return {};
|
||||
|
||||
// No analysis is applied yet.
|
||||
Analyser::Static::TargetList targets;
|
||||
|
||||
using Target = Analyser::Static::PCCompatible::Target;
|
||||
auto *const target = new Target();
|
||||
target->media = media;
|
||||
targets.push_back(std::unique_ptr<Analyser::Static::Target>(target));
|
||||
|
||||
return targets;
|
||||
}
|
22
Analyser/Static/PCCompatible/StaticAnalyser.hpp
Normal file
22
Analyser/Static/PCCompatible/StaticAnalyser.hpp
Normal file
@ -0,0 +1,22 @@
|
||||
//
|
||||
// StaticAnalyser.hpp
|
||||
// Clock Signal
|
||||
//
|
||||
// Created by Thomas Harte on 29/11/2019.
|
||||
// Copyright © 2023 Thomas Harte. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef Analyser_Static_PCCompatible_StaticAnalyser_hpp
|
||||
#define Analyser_Static_PCCompatible_StaticAnalyser_hpp
|
||||
|
||||
#include "../StaticAnalyser.hpp"
|
||||
#include "../../../Storage/TargetPlatforms.hpp"
|
||||
#include <string>
|
||||
|
||||
namespace Analyser::Static::PCCompatible {
|
||||
|
||||
TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms);
|
||||
|
||||
}
|
||||
|
||||
#endif /* Analyser_Static_PCCompatible_StaticAnalyser_hpp */
|
33
Analyser/Static/PCCompatible/Target.hpp
Normal file
33
Analyser/Static/PCCompatible/Target.hpp
Normal file
@ -0,0 +1,33 @@
|
||||
//
|
||||
// Target.hpp
|
||||
// Clock Signal
|
||||
//
|
||||
// Created by Thomas Harte on 29/11/2023.
|
||||
// Copyright © 2023 Thomas Harte. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef Analyser_Static_PCCompatible_Target_h
|
||||
#define Analyser_Static_PCCompatible_Target_h
|
||||
|
||||
#include "../../../Reflection/Struct.hpp"
|
||||
#include "../StaticAnalyser.hpp"
|
||||
|
||||
namespace Analyser::Static::PCCompatible {
|
||||
|
||||
struct Target: public Analyser::Static::Target, public Reflection::StructImpl<Target> {
|
||||
ReflectableEnum(VideoAdaptor,
|
||||
MDA,
|
||||
CGA);
|
||||
VideoAdaptor adaptor = VideoAdaptor::MDA;
|
||||
|
||||
Target() : Analyser::Static::Target(Machine::PCCompatible) {
|
||||
if(needs_declare()) {
|
||||
DeclareField(adaptor);
|
||||
AnnounceEnum(VideoAdaptor);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* Analyser_Static_PCCompatible_Target_h */
|
Loading…
x
Reference in New Issue
Block a user