starting on writeAddressBook
This commit is contained in:
parent
aa9a013475
commit
6212191c16
2 changed files with 5 additions and 9 deletions
|
@ -1,5 +1,6 @@
|
|||
package org.capnproto.examples;
|
||||
|
||||
import org.capnproto.MessageBuilder;
|
||||
import org.capnproto.MessageReader;
|
||||
import org.capnproto.StructList;
|
||||
import org.capnproto.InputStreamMessageReader;
|
||||
|
@ -9,7 +10,10 @@ import org.capnproto.examples.Addressbook.*;
|
|||
public class AddressbookMain {
|
||||
|
||||
public static void writeAddressBook() {
|
||||
System.out.println("writing is yet unimplemented");
|
||||
System.out.println("WARNING: writing is not yet fully implemented");
|
||||
MessageBuilder message = new MessageBuilder();
|
||||
AddressBook.Builder addressbook = message.initRoot(AddressBook.Builder.factory);
|
||||
//addressbook.initPeople(2);
|
||||
}
|
||||
|
||||
public static void printAddressBook() throws java.io.IOException {
|
||||
|
|
|
@ -978,14 +978,6 @@ private:
|
|||
|
||||
kj::strTree(
|
||||
kj::mv(unionDiscrim.isDefs),
|
||||
"inline bool ", scope, "Reader::has", titleCase, "() const {\n",
|
||||
unionDiscrim.has,
|
||||
" return !_reader.getPointerField(", offset, " * ::capnp::POINTERS).isNull();\n"
|
||||
"}\n"
|
||||
"inline bool ", scope, "Builder::has", titleCase, "() {\n",
|
||||
unionDiscrim.has,
|
||||
" return !_builder.getPointerField(", offset, " * ::capnp::POINTERS).isNull();\n"
|
||||
"}\n"
|
||||
"inline ", type, "::Reader ", scope, "Reader::get", titleCase, "() const {\n",
|
||||
unionDiscrim.check,
|
||||
" return ::capnp::_::PointerHelpers<", type, ">::get(\n"
|
||||
|
|
Loading…
Reference in a new issue