Revision: 44705
http://brlcad.svn.sourceforge.net/brlcad/?rev=44705&view=rev
Author: davidloman
Date: 2011-05-27 15:49:17 +0000 (Fri, 27 May 2011)
Log Message:
-----------
Add in a serialize method to ExtObject that creates a ByteBuffer and passed
back a pointer to it. This allows the ByteBuffer to be exactly the size
required.
Modified Paths:
--------------
geomcore/trunk/include/ExtObject.h
geomcore/trunk/src/GS/ExtObject.cxx
Modified: geomcore/trunk/include/ExtObject.h
===================================================================
--- geomcore/trunk/include/ExtObject.h 2011-05-27 15:47:10 UTC (rev 44704)
+++ geomcore/trunk/include/ExtObject.h 2011-05-27 15:49:17 UTC (rev 44705)
@@ -37,6 +37,8 @@
virtual ~ExtObject(void);
void serialize(ByteBuffer* bb);
+ ByteBuffer* serialize();
+
std::string getObjectName();
void printObjState();
Modified: geomcore/trunk/src/GS/ExtObject.cxx
===================================================================
--- geomcore/trunk/src/GS/ExtObject.cxx 2011-05-27 15:47:10 UTC (rev 44704)
+++ geomcore/trunk/src/GS/ExtObject.cxx 2011-05-27 15:49:17 UTC (rev 44705)
@@ -38,6 +38,12 @@
bb->put((char*)this->ext->ext_buf, this->ext->ext_nbytes);
}
+ByteBuffer*
+ExtObject::serialize()
+{
+ return ByteBuffer::wrap((char*)this->ext->ext_buf, this->ext->ext_nbytes);
+}
+
std::string
ExtObject::getObjectName()
{
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits