summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2018-10-05 15:41:03 +0200
committernsensfel <SpamShield0@noot-noot.org>2018-10-05 15:41:03 +0200
commit2e2bfd2d0d3bc52db4274ddc3dd1778c77ac5868 (patch)
treeed2f4fc5c07bdcd53514c51910e0d8094ef67cf2 /src/shared/struct/shr_glyph.erl.m4
parent0d8e11193bf166758c2d9c46190b07b9b76f2958 (diff)
(Broken) Working on the addition of glyphs & their boards.
Diffstat (limited to 'src/shared/struct/shr_glyph.erl.m4')
-rw-r--r--src/shared/struct/shr_glyph.erl.m462
1 files changed, 62 insertions, 0 deletions
diff --git a/src/shared/struct/shr_glyph.erl.m4 b/src/shared/struct/shr_glyph.erl.m4
new file mode 100644
index 0000000..cd59a27
--- /dev/null
+++ b/src/shared/struct/shr_glyph.erl.m4
@@ -0,0 +1,62 @@
+-module(shr_glyph).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% TYPES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+-type id() :: binary().
+
+-record
+(
+ glyph,
+ {
+ id :: id(),
+ name :: binary(),
+ omnimods :: shr_omnimods:type()
+ }
+).
+
+-type type() :: #glyph{}.
+
+-export_type([type/0, id/0]).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+-export
+(
+ [
+ from_id/1
+ ]
+).
+
+-export
+(
+ [
+ get_id/1,
+ get_name/1,
+ get_omnimods/1
+ ]
+).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% LOCAL FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+-spec get_id (type()) -> id().
+get_id (Glyph) -> Glyph#glyph.id.
+
+-spec get_name (type()) -> binary().
+get_name (Glyph) -> Glyph#glyph.name.
+
+-spec get_omnimods (type()) -> shr_omnimods:type().
+get_omnimods (Glyph) -> Glyph#glyph.omnimods.
+
+-spec from_id (id()) -> type().
+m4_include(__MAKEFILE_DATA_DIR/glyph/global.m4.conf)m4_dnl
+m4_include(__MAKEFILE_DATA_DIR/glyph/basic.m4d)m4_dnl
+from_id(_) ->
+ from_id(<<"0">>).