/* This file is part of the yazpp toolkit.
- * Copyright (C) 1998-2009 Index Data and Mike Taylor
+ * Copyright (C) 1998-2012 Index Data and Mike Taylor
* See the file LICENSE for details.
*/
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <yazpp/gdu.h>
using namespace yazpp_1;
{
int len;
char *buf = odr_getbuf(encode, &len, 0);
-
+
odr_setbuf(m_decode, buf, len, 0);
z_GDU(m_decode, &m_gdu, 0, 0);
}
odr_destroy(encode);
}
+int GDU::get_size()
+{
+ int len = 0;
+ ODR encode = odr_createmem(ODR_ENCODE);
+ if (m_gdu && z_GDU(encode, &m_gdu, 0, "encode"))
+ odr_getbuf(encode, &len, 0);
+ odr_destroy(encode);
+ return len;
+}
GDU &GDU::operator=(const GDU &g)
{