commit 8f689d4be958583f308e1bb6b6ed6482df7fc720 Author: shmyga Date: Sun Jun 22 21:29:13 2014 +0400 - diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..5d49aeb --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +target/ +src-gen/ +*.iml +*.ipr +*.iws \ No newline at end of file diff --git a/gen.sh b/gen.sh new file mode 100755 index 0000000..8b4551e --- /dev/null +++ b/gen.sh @@ -0,0 +1,2 @@ +#!/bin/sh +haxelib run protohx generate protohx.json \ No newline at end of file diff --git a/project.xml b/project.xml new file mode 100755 index 0000000..c85c61d --- /dev/null +++ b/project.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/proto/base.proto b/proto/base.proto new file mode 100755 index 0000000..60bdacf --- /dev/null +++ b/proto/base.proto @@ -0,0 +1,3 @@ +message Foo { + required string bar = 1; +} \ No newline at end of file diff --git a/protohx.json b/protohx.json new file mode 100755 index 0000000..208f678 --- /dev/null +++ b/protohx.json @@ -0,0 +1,9 @@ +{ + "protoPath": ".", + "protoFiles": [ + "proto/base.proto" + ], + "cleanOut": true, + "haxeOut": "src-gen/haxe", + "javaOut": null +} \ No newline at end of file diff --git a/src/haxe/ru/m/armageddon/Armageddon.hx b/src/haxe/ru/m/armageddon/Armageddon.hx new file mode 100755 index 0000000..5753dc6 --- /dev/null +++ b/src/haxe/ru/m/armageddon/Armageddon.hx @@ -0,0 +1,25 @@ +package ru.m.armageddon; + +import haxe.io.BytesOutput; +import haxework.log.TraceLogger; + +class Armageddon { + + private static inline var TAG = "Armageddon"; + + public static function main() { + L.push(new TraceLogger()); + L.d(TAG, Meta.getVersion()); + + var foo = new Foo(); + foo.bar = "test"; + + var out = new BytesOutput(); + foo.writeTo(out); + + var foo2 = new Foo(); + foo2.mergeFrom(out.getBytes()); + + L.d(TAG, foo2.bar); + } +} \ No newline at end of file