Added default petit vide cake point object wrapping
This commit is contained in:
parent
36ca5a66d2
commit
e24f65e3dc
|
@ -26,6 +26,32 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashA;
|
||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashB;
|
||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashC;
|
||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashD;
|
||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashE;
|
||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashF;
|
||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashG;
|
||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashH;
|
||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashI;
|
||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashJ;
|
||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashK;
|
||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashL;
|
||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashM;
|
||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashN;
|
||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashO;
|
||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashP;
|
||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashQ;
|
||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashR;
|
||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashS;
|
||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashT;
|
||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashU;
|
||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashV;
|
||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashW;
|
||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashX;
|
||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashY;
|
||||
import org.x4o.fc18.cake2.clk1k.FCDotCLK1KDashZ;
|
||||
import org.x4o.fc18.cake2.pie9c.FCDotPIE9CDash01;
|
||||
import org.x4o.fc18.cake2.pie9c.FCDotPIE9CDash02;
|
||||
import org.x4o.fc18.cake2.pie9c.FCDotPIE9CDash03;
|
||||
|
@ -80,14 +106,22 @@ import org.x4o.fc18.cake2.pie9d.FCDotPIE9DDash24;
|
|||
import org.x4o.fc18.cake2.pie9d.FCDotPIE9DDash25;
|
||||
import org.x4o.fc18.cake2.pie9d.FCDotPIE9DDash26;
|
||||
import org.x4o.fc18.cake2.pie9d.FCDotPIE9DDash27;
|
||||
import org.x4o.fc18.cake2.zero33.FCDotAMD0110DashSA;
|
||||
import org.x4o.fc18.cake2.zero33.FCDotAPL0127DashP7A;
|
||||
import org.x4o.fc18.cake2.zero33.FCDotAPL0127DashP7B;
|
||||
import org.x4o.fc18.cake2.zero33.FCDotAPL0127DashP7C;
|
||||
import org.x4o.fc18.cake2.zero33.FCDotBMW0102DashS2;
|
||||
import org.x4o.fc18.cake2.zero33.FCDotBYD0127DashP7D;
|
||||
import org.x4o.fc18.cake2.zero33.FCDotBYD0127DashP7E;
|
||||
import org.x4o.fc18.cake2.zero33.FCDotBYD0127DashP7F;
|
||||
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
||||
import org.x4o.fc18.cake2.zero33.FCDotDEC0127DashPX0;
|
||||
import org.x4o.fc18.cake2.zero33.FCDotDNA0104DashS4;
|
||||
import org.x4o.fc18.cake2.zero33.FCDotIBM1616DashH8;
|
||||
import org.x4o.fc18.cake2.zero33.FCDotNXP0103DashS3;
|
||||
import org.x4o.fc18.cake2.zero33.FCDotOCE0801DashH3;
|
||||
import org.x4o.fc18.cake2.zero33.FCDotOCE0808DashH6;
|
||||
import org.x4o.fc18.cake2.zero33.FCDotOCE0864DashH9;
|
||||
|
||||
/// The dot cake index of four corner 18 bit words in cake slices which holds the cake points.
|
||||
///
|
||||
|
@ -183,28 +217,28 @@ public enum FourCornerDotCake {
|
|||
|
||||
// =========== Allow end-user select rendering of data gram packet per context
|
||||
|
||||
FC_BMW0102_S2(1024 - 12, 2, "Binary Model Words, for bit 0 and bit 1 notation"),
|
||||
FC_AMD0110_SA(1024 - 10, 10, "Application Methodoums Decimals, normal numbers"),
|
||||
FC_BMW0102_S2(1024 - 12, 2, FCDotBMW0102DashS2.values(), "Binary Model Words, for bit 0 and bit 1 notation"),
|
||||
FC_AMD0110_SA(1024 - 10, 10, FCDotAMD0110DashSA.values(), "Application Methodoums Decimals, normal numbers"),
|
||||
|
||||
/// Allow HEX to be displayed in Greek/Korean/Inuktitut/etc symbols.
|
||||
FC_IBM1616_H8(1024, 256, "Interim Byte Mode, custom HEX codes"),
|
||||
FC_IBM1616_H8(1024, 256, FCDotIBM1616DashH8.values(), "Interim Byte Mode, custom HEX codes"),
|
||||
FC_NES0127_9C(1280, 27, "Nigerian Extra Smile"),
|
||||
FC_ESC0109_S9(1307, 9, "Eccentric Symbol Code"),
|
||||
FC_SCO0106_S6(1316, 6, "Six Character Object"),
|
||||
FC_NXP0103_S3(1322, 3, "Natural X-state Phasing, for high impedance (Hi-Z) signals"),
|
||||
FC_NXP0103_S3(1322, 3, FCDotNXP0103DashS3.values(), "Natural X-state Phasing, for high impedance (Hi-Z) signals"),
|
||||
FC_NEC0105_S5(1325, 5, "New Endian Compass"),
|
||||
FC_W3C0107_S7(1330, 7, "Water 3th Color"),
|
||||
/// See: https://www.ibm.com/docs/en/db2/11.5?topic=uce-code-page-coded-character-set-identifier-ccsid-numbers-unicode-graphic-data
|
||||
// TODO: check if ?? Remove CDC white space and newline !!!
|
||||
FC_UWU0101_S1(1337, 1, "Universal White Unidad, inner space indicator"),
|
||||
FC_DNA0104_S4(1338, 4, "Direct Nuclear Air strike, of quadratonic values"),
|
||||
FC_DNA0104_S4(1338, 4, FCDotDNA0104DashS4.values(), "Direct Nuclear Air strike, of quadratonic values"),
|
||||
|
||||
/// Reserved for future data grams use
|
||||
__RESERVED_DATAGRAMS(1 + FC_DNA0104_S4.getStop(), 1464 - 1 - FC_DNA0104_S4.getStop()),
|
||||
|
||||
FC_OCE0801_H3(1464, 8, "Octal Character Encoding, in Hinari 3 bit"),
|
||||
FC_OCE0808_H6(1472, 64, "Octal Character Encoding, in Hinari 6 bit"),
|
||||
FC_OCE0864_H9(1536, 512, "Octal Character Encoding, in Hinari 9 bit"),
|
||||
FC_OCE0801_H3(1464, 8, FCDotOCE0801DashH3.values(), "Octal Character Encoding, in Hinari 3 bit"),
|
||||
FC_OCE0808_H6(1472, 64, FCDotOCE0808DashH6.values(), "Octal Character Encoding, in Hinari 6 bit"),
|
||||
FC_OCE0864_H9(1536, 512, FCDotOCE0864DashH9.values(), "Octal Character Encoding, in Hinari 9 bit"),
|
||||
|
||||
// =========== Allow visible password as words in text
|
||||
|
||||
|
@ -237,33 +271,33 @@ public enum FourCornerDotCake {
|
|||
|
||||
/// Code Language Keywords for VHDL/C++ and Java/etc which allows a user to load a custom word dictionary.
|
||||
/// TODO: Add a few more sources and do a few dedup alias rename sessions AND abbr... unpacking + aliasses
|
||||
FC_CLK1K_A(131072 + (1024*0), 1024), // start at "2^17+2^16"
|
||||
FC_CLK1K_B(131072 + (1024*1), 1024),
|
||||
FC_CLK1K_C(131072 + (1024*2), 1024),
|
||||
FC_CLK1K_D(131072 + (1024*3), 1024),
|
||||
FC_CLK1K_E(131072 + (1024*4), 1024),
|
||||
FC_CLK1K_F(131072 + (1024*5), 1024),
|
||||
FC_CLK1K_G(131072 + (1024*6), 1024),
|
||||
FC_CLK1K_H(131072 + (1024*7), 1024),
|
||||
FC_CLK1K_I(131072 + (1024*8), 1024),
|
||||
FC_CLK1K_J(131072 + (1024*9), 1024),
|
||||
FC_CLK1K_K(131072 + (1024*10), 1024),
|
||||
FC_CLK1K_L(131072 + (1024*11), 1024),
|
||||
FC_CLK1K_M(131072 + (1024*12), 1024),
|
||||
FC_CLK1K_N(131072 + (1024*13), 1024),
|
||||
FC_CLK1K_O(131072 + (1024*14), 1024),
|
||||
FC_CLK1K_P(131072 + (1024*15), 1024),
|
||||
FC_CLK1K_Q(131072 + (1024*16), 1024),
|
||||
FC_CLK1K_R(131072 + (1024*17), 1024),
|
||||
FC_CLK1K_S(131072 + (1024*18), 1024),
|
||||
FC_CLK1K_T(131072 + (1024*19), 1024),
|
||||
FC_CLK1K_U(131072 + (1024*20), 1024),
|
||||
FC_CLK1K_V(131072 + (1024*21), 1024),
|
||||
FC_CLK1K_W(131072 + (1024*22), 1024),
|
||||
FC_CLK1K_X(131072 + (1024*23), 1024),
|
||||
FC_CLK1K_Y(131072 + (1024*24), 1024),
|
||||
FC_CLK1K_Z(131072 + (1024*25), 1024),
|
||||
FC_CLK1K_AMP(131072 + (1024*26), 1024),
|
||||
FC_CLK1K_A(131072 + (1024*0), 1024, FCDotCLK1KDashA.values()), // start at "2^17+2^16"
|
||||
FC_CLK1K_B(131072 + (1024*1), 1024, FCDotCLK1KDashB.values()),
|
||||
FC_CLK1K_C(131072 + (1024*2), 1024, FCDotCLK1KDashC.values()),
|
||||
FC_CLK1K_D(131072 + (1024*3), 1024, FCDotCLK1KDashD.values()),
|
||||
FC_CLK1K_E(131072 + (1024*4), 1024, FCDotCLK1KDashE.values()),
|
||||
FC_CLK1K_F(131072 + (1024*5), 1024, FCDotCLK1KDashF.values()),
|
||||
FC_CLK1K_G(131072 + (1024*6), 1024, FCDotCLK1KDashG.values()),
|
||||
FC_CLK1K_H(131072 + (1024*7), 1024, FCDotCLK1KDashH.values()),
|
||||
FC_CLK1K_I(131072 + (1024*8), 1024, FCDotCLK1KDashI.values()),
|
||||
FC_CLK1K_J(131072 + (1024*9), 1024, FCDotCLK1KDashJ.values()),
|
||||
FC_CLK1K_K(131072 + (1024*10), 1024, FCDotCLK1KDashK.values()),
|
||||
FC_CLK1K_L(131072 + (1024*11), 1024, FCDotCLK1KDashL.values()),
|
||||
FC_CLK1K_M(131072 + (1024*12), 1024, FCDotCLK1KDashM.values()),
|
||||
FC_CLK1K_N(131072 + (1024*13), 1024, FCDotCLK1KDashN.values()),
|
||||
FC_CLK1K_O(131072 + (1024*14), 1024, FCDotCLK1KDashO.values()),
|
||||
FC_CLK1K_P(131072 + (1024*15), 1024, FCDotCLK1KDashP.values()),
|
||||
FC_CLK1K_Q(131072 + (1024*16), 1024, FCDotCLK1KDashQ.values()),
|
||||
FC_CLK1K_R(131072 + (1024*17), 1024, FCDotCLK1KDashR.values()),
|
||||
FC_CLK1K_S(131072 + (1024*18), 1024, FCDotCLK1KDashS.values()),
|
||||
FC_CLK1K_T(131072 + (1024*19), 1024, FCDotCLK1KDashT.values()),
|
||||
FC_CLK1K_U(131072 + (1024*20), 1024, FCDotCLK1KDashU.values()),
|
||||
FC_CLK1K_V(131072 + (1024*21), 1024, FCDotCLK1KDashV.values()),
|
||||
FC_CLK1K_W(131072 + (1024*22), 1024, FCDotCLK1KDashW.values()),
|
||||
FC_CLK1K_X(131072 + (1024*23), 1024, FCDotCLK1KDashX.values()),
|
||||
FC_CLK1K_Y(131072 + (1024*24), 1024, FCDotCLK1KDashY.values()),
|
||||
FC_CLK1K_Z(131072 + (1024*25), 1024, FCDotCLK1KDashZ.values()),
|
||||
FC_CLK1K_AMP(131072 + (1024*26), 1024/*, FCDotCLK1KDashAmp.values()*/),
|
||||
|
||||
// =========== Allow more data grams for legacy unicode and next generation unicode
|
||||
|
||||
|
@ -317,7 +351,7 @@ public enum FourCornerDotCake {
|
|||
private FourCornerDotCake(int start, int size, FourCornerX00PetitVide[] videPoints, String description) {
|
||||
this.start = start;
|
||||
this.stop = start + size - 1;
|
||||
this.videPoints = videPoints;
|
||||
this.videPoints = fillPetitVide(start, size, videPoints);
|
||||
this.description = description==null?"":description;
|
||||
String name = name();
|
||||
if (!name.startsWith("_")) {
|
||||
|
@ -327,6 +361,29 @@ public enum FourCornerDotCake {
|
|||
this.nameSpec = name;
|
||||
}
|
||||
|
||||
static private FourCornerX00PetitVide[] fillPetitVide(int start, int size, FourCornerX00PetitVide[] petitVides) {
|
||||
if (petitVides.length == size) {
|
||||
return petitVides;
|
||||
}
|
||||
List<FourCornerX00PetitVide> result = new ArrayList<>(size);
|
||||
for (int i = 0; i < size; i++) {
|
||||
if (petitVides.length != 0 && i < petitVides.length) {
|
||||
result.add(petitVides[i]);
|
||||
continue;
|
||||
}
|
||||
// TODO: Move else maybe to getter, as this fills ALL 2^18 objects...
|
||||
int wrapCakePoint = start + i;
|
||||
result.add(new FourCornerX18CakePointSequence() {
|
||||
|
||||
@Override
|
||||
public List<Integer> cakePointSequence() {
|
||||
return List.of(wrapCakePoint);
|
||||
}
|
||||
});
|
||||
}
|
||||
return result.toArray(new FourCornerX00PetitVide[size]);
|
||||
}
|
||||
|
||||
public int getStart() {
|
||||
return start;
|
||||
}
|
||||
|
|
|
@ -36,12 +36,23 @@ public class FourCornerDotCakeTest {
|
|||
|
||||
@Test
|
||||
public void testValues() throws Exception {
|
||||
int sizeTotal = 0;
|
||||
for (FourCornerDotCake v : FourCornerDotCake.values()) {
|
||||
Assertions.assertNotNull(v);
|
||||
Assertions.assertNotNull(v.getVidePoints());
|
||||
Assertions.assertNotNull(v.tower());
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTowerSizes() throws Exception {
|
||||
int sizeTotal = 0;
|
||||
for (FourCornerDotCake v : FourCornerDotCake.values()) {
|
||||
Assertions.assertTrue(v.getStart() <= v.getStop(), "Start is larger than stop in: " + v.name());
|
||||
sizeTotal += v.getLength();
|
||||
//System.out.println("Cake start: 0x" + Integer.toHexString(v.getStart()) + " end: 0" + Integer.toHexString(v.getStop()) + " of " + v.name() + " size: " + v.getLength());
|
||||
int videSize = v.getVidePoints().length;
|
||||
if (videSize != 0) {
|
||||
Assertions.assertEquals(v.getLength(), videSize, "Vide size mismatch: " + v);
|
||||
}
|
||||
}
|
||||
Assertions.assertEquals(262144, sizeTotal);
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ public class FCDocSegmentWriterCakeWord implements FCDocSegmentWriter {
|
|||
writer.docTableStart("Word Summary", "The cake word point value information.",ApiDocContentCss.overviewSummary);
|
||||
writer.docTableHeader("Point", "Value");
|
||||
String name = word.toString();
|
||||
String value = name;
|
||||
String value = "";
|
||||
if (x18DotName.isPresent()) {
|
||||
name = x18DotName.get().name();
|
||||
}
|
||||
|
@ -107,15 +107,15 @@ public class FCDocSegmentWriterCakeWord implements FCDocSegmentWriter {
|
|||
// }
|
||||
// FourCornerX00PetitVide videPoint = videPoints[word.getOffset()];
|
||||
Optional<FourCornerX00PetitVideCoinCarne> x00CoinCarne = videPoint.kaasX00CoinCarne();
|
||||
writer.docTableStart("Kerning Summary", "Kerning all pattern displays.",ApiDocContentCss.overviewSummary);
|
||||
writer.docTableHeader("Location", "Corner dents");
|
||||
if (x00CoinCarne.isPresent()) {
|
||||
FourCornerX00PetitVideCoinCarne cornerKerning = x00CoinCarne.get();
|
||||
writer.docTableStart("Kerning Summary", "Kerning all pattern displays.",ApiDocContentCss.overviewSummary);
|
||||
writer.docTableHeader("Location", "Corner dents");
|
||||
writer.docTableRow("Top", cornerKerning.coinCarneFrapper().kerningTop().name());
|
||||
writer.docTableRow("Bottom", cornerKerning.coinCarneFrapper().kerningBottom().name());
|
||||
}
|
||||
writer.docTableEnd();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void writeSequence(ApiDocContentWriter writer, String system, int minHex, List<Integer> sequence) throws IOException {
|
||||
|
|
|
@ -51,6 +51,6 @@ public class TDocCakeWord {
|
|||
}
|
||||
|
||||
public String toString() {
|
||||
return String.format("%s.0x%06X", slice.name(), slice.getStart() + offset);
|
||||
return String.format("%s.0x%06X", slice.nameSpec(), slice.getStart() + offset);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue