1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-19 19:16:34 +00:00

Adds transcoding of ostensible list selections to Boolean selections, and vice versa.

This commit is contained in:
Thomas Harte
2017-11-18 21:09:26 -05:00
parent 8dcac6561e
commit 2ea050556b
5 changed files with 62 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
//
// Configurable.cpp
// Clock Signal
//
// Created by Thomas Harte on 18/11/2017.
// Copyright © 2017 Thomas Harte. All rights reserved.
//
#include "Configurable.hpp"
using namespace Configurable;
ListSelection *BooleanSelection::list_selection() {
return new ListSelection(value ? "yes" : "no");
}
ListSelection *ListSelection::list_selection() {
return new ListSelection(value);
}
BooleanSelection *ListSelection::boolean_selection() {
return new BooleanSelection(value != "no" && value != "n");
}
BooleanSelection *BooleanSelection::boolean_selection() {
return new BooleanSelection(value);
}