diff --git a/CSharp/Libraries/UniversalEditor.Essential/ObjectModels/BinaryGrammar/BinaryGrammarObjectModel.cs b/CSharp/Libraries/UniversalEditor.Essential/ObjectModels/BinaryGrammar/BinaryGrammarObjectModel.cs new file mode 100644 index 00000000..c2fac00c --- /dev/null +++ b/CSharp/Libraries/UniversalEditor.Essential/ObjectModels/BinaryGrammar/BinaryGrammarObjectModel.cs @@ -0,0 +1,57 @@ +// +// BinaryGrammarObjectModel.cs +// +// Author: +// Mike Becker +// +// Copyright (c) 2019 Mike Becker +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +using System; +using UniversalEditor.ObjectModels.BinaryGrammar.GrammarItems; + +namespace UniversalEditor.ObjectModels.BinaryGrammar +{ + public class BinaryGrammarObjectModel : ObjectModel + { + public string Name { get; set; } = String.Empty; + public string Author { get; set; } = String.Empty; + public string FileExtension { get; set; } = String.Empty; + public string UniversalTypeIdentifier { get; set; } = String.Empty; + + public string Description { get; set; } = String.Empty; + + public GrammarItemStructure InitialStructure { get; set; } = null; + + public GrammarItemStructure.GrammarItemStructureCollection Structures { get; } = new GrammarItemStructure.GrammarItemStructureCollection(); + + public bool IsComplete { get; set; } = false; + + public override void Clear() + { + Name = String.Empty; + Author = String.Empty; + FileExtension = String.Empty; + UniversalTypeIdentifier = String.Empty; + Description = String.Empty; + InitialStructure = null; + Structures.Clear(); + } + + public override void CopyTo(ObjectModel where) + { + throw new NotImplementedException(); + } + } +} diff --git a/CSharp/Libraries/UniversalEditor.Essential/ObjectModels/BinaryGrammar/FixedValue.cs b/CSharp/Libraries/UniversalEditor.Essential/ObjectModels/BinaryGrammar/FixedValue.cs new file mode 100644 index 00000000..f0d7c4d7 --- /dev/null +++ b/CSharp/Libraries/UniversalEditor.Essential/ObjectModels/BinaryGrammar/FixedValue.cs @@ -0,0 +1,34 @@ +// +// FixedValue.cs +// +// Author: +// Mike Becker +// +// Copyright (c) 2019 Mike Becker +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +using System; +namespace UniversalEditor.ObjectModels.BinaryGrammar +{ + public class FixedValue + { + public class FixedValueCollection + : System.Collections.ObjectModel.Collection + { + } + + public string Name { get; set; } = null; + public string Value { get; set; } = null; + } +} diff --git a/CSharp/Libraries/UniversalEditor.Essential/ObjectModels/BinaryGrammar/GrammarItem.cs b/CSharp/Libraries/UniversalEditor.Essential/ObjectModels/BinaryGrammar/GrammarItem.cs new file mode 100644 index 00000000..1a8b91fd --- /dev/null +++ b/CSharp/Libraries/UniversalEditor.Essential/ObjectModels/BinaryGrammar/GrammarItem.cs @@ -0,0 +1,37 @@ +// +// GrammarItem.cs +// +// Author: +// Mike Becker +// +// Copyright (c) 2019 Mike Becker +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +using System; +namespace UniversalEditor.ObjectModels.BinaryGrammar +{ + public class GrammarItem + { + public class GrammarItemCollection + : System.Collections.ObjectModel.Collection + { + } + + public string ID { get; set; } = null; + public string Name { get; set; } = null; + public string Length { get; set; } = "0"; + + public FixedValue.FixedValueCollection FixedValues { get; } = new FixedValue.FixedValueCollection(); + } +} diff --git a/CSharp/Libraries/UniversalEditor.Essential/ObjectModels/BinaryGrammar/GrammarItems/GrammarItemNumber.cs b/CSharp/Libraries/UniversalEditor.Essential/ObjectModels/BinaryGrammar/GrammarItems/GrammarItemNumber.cs new file mode 100644 index 00000000..45325c6c --- /dev/null +++ b/CSharp/Libraries/UniversalEditor.Essential/ObjectModels/BinaryGrammar/GrammarItems/GrammarItemNumber.cs @@ -0,0 +1,28 @@ +// +// GrammarItemNumber.cs +// +// Author: +// Mike Becker +// +// Copyright (c) 2019 Mike Becker +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +using System; +namespace UniversalEditor.ObjectModels.BinaryGrammar.GrammarItems +{ + public class GrammarItemNumber : GrammarItem + { + + } +} diff --git a/CSharp/Libraries/UniversalEditor.Essential/ObjectModels/BinaryGrammar/GrammarItems/GrammarItemString.cs b/CSharp/Libraries/UniversalEditor.Essential/ObjectModels/BinaryGrammar/GrammarItems/GrammarItemString.cs new file mode 100644 index 00000000..dbfda59b --- /dev/null +++ b/CSharp/Libraries/UniversalEditor.Essential/ObjectModels/BinaryGrammar/GrammarItems/GrammarItemString.cs @@ -0,0 +1,27 @@ +// +// GrammarItemString.cs +// +// Author: +// Mike Becker +// +// Copyright (c) 2019 Mike Becker +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +using System; +namespace UniversalEditor.ObjectModels.BinaryGrammar.GrammarItems +{ + public class GrammarItemString : GrammarItem + { + } +} diff --git a/CSharp/Libraries/UniversalEditor.Essential/ObjectModels/BinaryGrammar/GrammarItems/GrammarItemStructure.cs b/CSharp/Libraries/UniversalEditor.Essential/ObjectModels/BinaryGrammar/GrammarItems/GrammarItemStructure.cs new file mode 100644 index 00000000..020906a1 --- /dev/null +++ b/CSharp/Libraries/UniversalEditor.Essential/ObjectModels/BinaryGrammar/GrammarItems/GrammarItemStructure.cs @@ -0,0 +1,39 @@ +// +// GrammarStructure.cs +// +// Author: +// Mike Becker +// +// Copyright (c) 2019 Mike Becker +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +using System; +using UniversalEditor.IO; + +namespace UniversalEditor.ObjectModels.BinaryGrammar.GrammarItems +{ + public class GrammarItemStructure : GrammarItem + { + public class GrammarItemStructureCollection + : System.Collections.ObjectModel.Collection + { + } + + public string Encoding { get; set; } = null; + public Endianness Endianness { get; set; } = Endianness.LittleEndian; + public GrammarItem.GrammarItemCollection Items { get; } = new GrammarItemCollection(); + public bool Signed { get; set; } = true; + public string Extends { get; set; } = null; + } +} diff --git a/CSharp/Libraries/UniversalEditor.Essential/ObjectModels/BinaryGrammar/GrammarItems/GrammarItemStructureReference.cs b/CSharp/Libraries/UniversalEditor.Essential/ObjectModels/BinaryGrammar/GrammarItems/GrammarItemStructureReference.cs new file mode 100644 index 00000000..fb4c38b5 --- /dev/null +++ b/CSharp/Libraries/UniversalEditor.Essential/ObjectModels/BinaryGrammar/GrammarItems/GrammarItemStructureReference.cs @@ -0,0 +1,28 @@ +// +// GrammarStructureReference.cs +// +// Author: +// Mike Becker +// +// Copyright (c) 2019 Mike Becker +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +using System; +namespace UniversalEditor.ObjectModels.BinaryGrammar.GrammarItems +{ + public class GrammarItemStructureReference : GrammarItem + { + public string Structure { get; set; } = null; + } +} diff --git a/CSharp/Libraries/UniversalEditor.Essential/UniversalEditor.Essential.csproj b/CSharp/Libraries/UniversalEditor.Essential/UniversalEditor.Essential.csproj index 0fd6bfad..2cb1a493 100644 --- a/CSharp/Libraries/UniversalEditor.Essential/UniversalEditor.Essential.csproj +++ b/CSharp/Libraries/UniversalEditor.Essential/UniversalEditor.Essential.csproj @@ -181,6 +181,13 @@ + + + + + + + @@ -202,6 +209,8 @@ + +