Revision: 44692
http://brlcad.svn.sourceforge.net/brlcad/?rev=44692&view=rev
Author: davidloman
Date: 2011-05-25 19:13:35 +0000 (Wed, 25 May 2011)
Log Message:
-----------
Implement a simple oop wrapper around the bu_external struct
Modified Paths:
--------------
geomcore/trunk/src/GS/CMakeLists.txt
Added Paths:
-----------
geomcore/trunk/include/ExtObject.h
geomcore/trunk/src/GS/ExtObject.cxx
Added: geomcore/trunk/include/ExtObject.h
===================================================================
--- geomcore/trunk/include/ExtObject.h (rev 0)
+++ geomcore/trunk/include/ExtObject.h 2011-05-25 19:13:35 UTC (rev 44692)
@@ -0,0 +1,60 @@
+/* E X T O B J E C T . H
+ * BRL-CAD
+ *
+ * Copyright (c) 2011 United States Government as represented by
+ * the U.S. Army Research Laboratory.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this file; see the file named COPYING for more
+ * information.
+ */
+/** @file ExtObject.h
+ *
+ * Brief description
+ *
+ */
+
+#ifndef __EXTOBJECT_H___
+#define __EXTOBJECT_H___
+
+#include "ByteBuffer.h"
+
+#include <bu.h>
+#include <string>
+
+class ExtObject {
+public:
+ ExtObject(std::string objName, bu_external* ext);
+ virtual ~ExtObject(void);
+
+ void serialize(ByteBuffer* bb);
+ std::string getObjectName();
+
+ void printObjState();
+
+private:
+ bu_external* ext;
+ std::string filePath;
+ std::string objName;
+};
+
+#endif /* __EXTOBJECT_H___ */
+
+/*
+ * Local Variables:
+ * tab-width: 8
+ * mode: C
+ * indent-tabs-mode: t
+ * c-file-style: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */
Property changes on: geomcore/trunk/include/ExtObject.h
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Revision Date Author
Added: svn:eol-style
+ native
Modified: geomcore/trunk/src/GS/CMakeLists.txt
===================================================================
--- geomcore/trunk/src/GS/CMakeLists.txt 2011-05-25 19:02:25 UTC (rev
44691)
+++ geomcore/trunk/src/GS/CMakeLists.txt 2011-05-25 19:13:35 UTC (rev
44692)
@@ -37,6 +37,7 @@
SET(geomserv_SRCS
BrlcadDb.cxx
+ ExtObject.cxx
GeometryService.cxx
DataManager.cxx
FileDataSource.cxx
@@ -79,6 +80,7 @@
SET(geomserv_inst_HDRS
BrlcadDb.h
+ ExtObject.h
Session.h
SessionManager.h
Account.h
Added: geomcore/trunk/src/GS/ExtObject.cxx
===================================================================
--- geomcore/trunk/src/GS/ExtObject.cxx (rev 0)
+++ geomcore/trunk/src/GS/ExtObject.cxx 2011-05-25 19:13:35 UTC (rev 44692)
@@ -0,0 +1,60 @@
+/* E X T O B J E C T . C X X
+ * BRL-CAD
+ *
+ * Copyright (c) 2011 United States Government as represented by
+ * the U.S. Army Research Laboratory.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this file; see the file named COPYING for more
+ * information.
+ */
+/** @file ExtObject.cxx
+ *
+ */
+
+#include "ExtObject.h"
+#include <iostream>
+
+
+ExtObject::ExtObject( std::string objName, bu_external* ext
+) : ext(ext), objName(objName) {}
+
+ExtObject::~ExtObject(void){}
+
+void
+ExtObject::serialize(ByteBuffer* bb)
+{
+ bb->put((char*)this->ext->ext_buf, this->ext->ext_nbytes);
+}
+
+std::string
+ExtObject::getObjectName()
+{
+ return this->objName;
+}
+
+void
+ExtObject::printObjState()
+{
+ std::cout << "ext*: " << ((this->ext == NULL) ? "NULL" : "Set") << "\n";
+ std::cout << "filePath: " << filePath << "\n";
+ std::cout << "objName: " << objName << std::endl;
+}
+
+// Local Variables:
+// tab-width: 8
+// mode: C++
+// c-basic-offset: 4
+// indent-tabs-mode: t
+// c-file-style: "stroustrup"
+// End:
+// ex: shiftwidth=4 tabstop=8
Property changes on: geomcore/trunk/src/GS/ExtObject.cxx
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Revision Date Author
Added: svn:eol-style
+ native
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