diff src/mex.cc @ 6595:55586d763de1

[project @ 2007-04-27 15:31:10 by dbateman]
author dbateman
date Fri, 27 Apr 2007 15:31:10 +0000
parents 5fa513371dde
children 1c4545125165
line wrap: on
line diff
--- a/src/mex.cc	Fri Apr 27 15:00:10 2007 +0000
+++ b/src/mex.cc	Fri Apr 27 15:31:10 2007 +0000
@@ -27,6 +27,7 @@
 #include "unwind-prot.h"
 #include "utils.h"
 #include "variables.h"
+#include "graphics.h"
 
 // #define DEBUG 1
 
@@ -3294,11 +3295,14 @@
 }
 
 const mxArray *
-mexGet (double /*handle*/, const char */*property*/)
+mexGet (double handle, const char *property)
 {
-  // FIXME
-  error ("mexGet: not implemented");
-  return 0;
+  mxArray *m = 0;
+  octave_value ret = get_property_from_handle (handle, property, "mexGet");
+
+  if (!error_state && ret.is_defined())
+    m = ret.as_mxArray ();
+  return m;
 }
 
 int
@@ -3341,11 +3345,12 @@
 }
 
 int
-mexSet (double /*handle*/, const char */*property*/, mxArray */*val*/)
+mexSet (double handle, const char *property, mxArray *val)
 {
-  // FIXME
-  error ("mexSet: not implemented");
-  return 0;
+  bool ret = 
+    set_property_in_handle (handle, property, mxArray::as_octave_value (val),
+			    "mexSet");
+  return (ret ? 0 : 1);
 }
 
 void