Added custom deserializer to initialize transient casted reference.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3253 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Andrzej Kapolka
2004-11-30 02:19:58 +00:00
parent dd4ce23b93
commit 5e1b2d16ec
+17 -1
View File
@@ -1,5 +1,5 @@
//
// $Id: Table.java,v 1.18 2004/08/27 02:20:13 mdb Exp $
// $Id$
//
// Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -21,6 +21,10 @@
package com.threerings.parlor.data;
import java.io.IOException;
import com.threerings.io.ObjectInputStream;
import com.samskivert.util.StringUtil;
import com.threerings.util.Name;
@@ -94,6 +98,18 @@ public class Table
{
}
/**
* Extends default behavior to initialize transient members.
*/
public void readObject (ObjectInputStream in)
throws IOException, ClassNotFoundException
{
in.defaultReadObject();
// initialize casted reference
_tconfig = (TableConfig)config;
}
/**
* A convenience function for accessing the table id as an int.
*/