mirror of
https://github.com/zap-proto/d.git
synced 2026-10-30 15:05:27 +00:00
Rename the capnproto-dlang fork to zap-dlang: source/capnproto/ -> source/zap/ (module/import paths capnproto.* -> zap.*), compiler plugin capnpc-dlang -> zapc-dlang, schemas .capnp -> .zap, Makefile pkg-config/-lcapnp -> zap/-lzap, README/CONTRIBUTORS rebranded with canonical zap-proto.io/zap-proto.dev/ github.com/zap-proto/d links. Pure mechanical rename: no logic changes. Upstream Sandstorm MIT headers preserved.
109 lines
2.6 KiB
D
109 lines
2.6 KiB
D
//Generated by Zap compiler, DO NOT EDIT.
|
|
//source: test-import.zap
|
|
|
|
module zap.tests.testimport;
|
|
|
|
import zap;
|
|
|
|
import zap.tests.test;
|
|
|
|
struct Foo
|
|
{
|
|
public:
|
|
static immutable structSize = cast(immutable)StructSize(0, 1);
|
|
|
|
static struct Builder
|
|
{
|
|
public:
|
|
this(SegmentBuilder* segment, int data, int pointers, int dataSize, short pointerCount)
|
|
{
|
|
b = StructBuilder(segment, data, pointers, dataSize, pointerCount);
|
|
}
|
|
|
|
|
|
auto asReader()
|
|
{
|
|
return b.asReader!Reader();
|
|
}
|
|
|
|
.TestAllTypes.Builder getImportedStruct()
|
|
{
|
|
return b._getPointerField!(.TestAllTypes)(0, null, 0);
|
|
}
|
|
void setImportedStruct(.TestAllTypes.Reader value)
|
|
{
|
|
b._setPointerField!(.TestAllTypes)(0, value);
|
|
}
|
|
.TestAllTypes.Builder initImportedStruct()
|
|
{
|
|
return b._initPointerField!(.TestAllTypes)(0, 0);
|
|
}
|
|
|
|
public:
|
|
StructBuilder b;
|
|
}
|
|
|
|
static struct Reader
|
|
{
|
|
public:
|
|
this(SegmentReader* segment, int data, int pointers, int dataSize, short pointerCount, int nestingLimit)
|
|
{
|
|
b = StructReader(segment, data, pointers, dataSize, pointerCount, nestingLimit);
|
|
}
|
|
|
|
bool hasImportedStruct()
|
|
{
|
|
return !b._pointerFieldIsNull(0);
|
|
}
|
|
.TestAllTypes.Reader getImportedStruct()
|
|
{
|
|
return b._getPointerField!(.TestAllTypes)(0, null, 0);
|
|
}
|
|
|
|
public:
|
|
StructReader b;
|
|
}
|
|
|
|
}
|
|
|
|
struct Schemas
|
|
{
|
|
public:
|
|
__gshared static SegmentReader b_ce44e75b93239b3c = GeneratedClassSupport.decodeRawBytes([
|
|
0x0,0x0,0x0,0x0,0x5,0x0,0x6,0x0,
|
|
0x3c,0x9b,0x23,0x93,0x5b,0xe7,0x44,0xce,
|
|
0x12,0x0,0x0,0x0,0x1,0x0,0x0,0x0,
|
|
0xf3,0xe8,0xfe,0x51,0x19,0x32,0x93,0xd6,
|
|
0x1,0x0,0x7,0x0,0x0,0x0,0x0,0x0,
|
|
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
|
|
0x15,0x0,0x0,0x0,0xb2,0x0,0x0,0x0,
|
|
0x1d,0x0,0x0,0x0,0x7,0x0,0x0,0x0,
|
|
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
|
|
0x19,0x0,0x0,0x0,0x3f,0x0,0x0,0x0,
|
|
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
|
|
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
|
|
0x74,0x65,0x73,0x74,0x2d,0x69,0x6d,0x70,
|
|
0x6f,0x72,0x74,0x2e,0x63,0x61,0x70,0x6e,
|
|
0x70,0x3a,0x46,0x6f,0x6f,0x0,0x0,0x0,
|
|
0x0,0x0,0x0,0x0,0x1,0x0,0x1,0x0,
|
|
0x4,0x0,0x0,0x0,0x3,0x0,0x4,0x0,
|
|
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
|
|
0x0,0x0,0x1,0x0,0x0,0x0,0x0,0x0,
|
|
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
|
|
0xd,0x0,0x0,0x0,0x7a,0x0,0x0,0x0,
|
|
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
|
|
0xc,0x0,0x0,0x0,0x3,0x0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