本文整理汇总了C++中ObjectOutputStream::writeObject方法的典型用法代码示例。如果您正苦于以下问题:C++ ObjectOutputStream::writeObject方法的具体用法?C++ ObjectOutputStream::writeObject怎么用?C++ ObjectOutputStream::writeObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObjectOutputStream
的用法示例。
在下文中一共展示了ObjectOutputStream::writeObject方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: serialize
void XojFont::serialize(ObjectOutputStream& out)
{
XOJ_CHECK_TYPE(XojFont);
out.writeObject("XojFont");
out.writeString(this->name);
out.writeDouble(this->size);
out.endObject();
}
示例2: serializeElement
void Element::serializeElement(ObjectOutputStream& out)
{
XOJ_CHECK_TYPE(Element);
out.writeObject("Element");
out.writeDouble(this->x);
out.writeDouble(this->y);
out.writeInt(this->color);
out.endObject();
}
示例3: serialize
void Text::serialize(ObjectOutputStream & out) {
XOJ_CHECK_TYPE(Text);
out.writeObject("Text");
serializeElement(out);
out.writeString(this->text);
font.serialize(out);
out.endObject();
}
示例4: serialize
void Image::serialize(ObjectOutputStream & out) {
XOJ_CHECK_TYPE(Image);
out.writeObject("Image");
serializeElement(out);
out.writeDouble(this->width);
out.writeDouble(this->height);
out.writeImage(this->image);
out.endObject();
}
示例5: serialize
void EditSelection::serialize(ObjectOutputStream & out) {
out.writeObject("EditSelection");
out.writeDouble(this->x);
out.writeDouble(this->y);
out.writeDouble(this->width);
out.writeDouble(this->height);
out << this->contents;
out.endObject();
ListIterator<Element *> it = this->getElements();
int count = it.getLength();
out.writeInt(count);
while (it.hasNext()) {
Element * e = it.next();
out << e;
}
}
示例6: writeObject
void EntryRemovedEvent::writeObject (ObjectOutputStream& out) const
{
presents::dobj::EntryEvent::writeObject(out);
out.writeObject(key);
}