Index: trunk/src/objects/Makefile.in
===================================================================
--- trunk/src/objects/Makefile.in	(revision 1270)
+++ trunk/src/objects/Makefile.in	(revision 1386)
@@ -1,6 +1,6 @@
 
 bindir          = @bindir@
-datadir		= @datadir@
-datarootdir	= @datarootdir@
+datadir         = @datadir@
+datarootdir     = @datarootdir@
 exec_prefix     = @exec_prefix@
 includedir      = @includedir@
@@ -8,8 +8,8 @@
 mandir          = @mandir@
 prefix          = @prefix@
-srcdir		= @srcdir@
-incdir		= $(prefix)/include
+srcdir          = @srcdir@
+incdir          = $(prefix)/include
 
-INSTALL		= @INSTALL@
+INSTALL         = @INSTALL@
 
 CXX             = @CXX@
@@ -17,4 +17,5 @@
 CCC             = @CC@
 CFLAGS_DEBUG    = @CFLAGS_DEBUG@
+CFLAGS_WARNING  = -Wall
 CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
 STLIB_LD        = @STLIB_LD@
@@ -26,8 +27,8 @@
 LIB_SEARCH_DIRS = @LIB_SEARCH_DIRS@
 CFLAGS          = @CFLAGS@
-RM		= rm -f
-CC_SWITCHES	= $(CFLAGS) $(INCLUDES) $(DEFINES)
+RM              = rm -f
+CC_SWITCHES = $(CFLAGS) $(INCLUDES) $(DEFINES) $(CFLAGS_DEBUG)
 
-INCLUDES	= \
+INCLUDES    = \
 		-I. \
 		-I../core \
@@ -35,9 +36,9 @@
 		-I$(srcdir)/../core \
 		-I$(includedir)
-LIBS		= -L../core -lrappture
+LIBS        = -L../core -lrappture
 
-RANLIB 		= @RANLIB@
-AR 		= ar
-VPATH		= $(srcdir)
+RANLIB      = @RANLIB@
+AR          = ar
+VPATH       = $(srcdir)
 
 # tell make where to find the expat & libscew headers
@@ -45,45 +46,44 @@
 
 # define our compiling environment
-#
-DEBUG           = -g -Wall
-DEBUG_PLUS      = -g -DDEBUG
 LN              = ln -s
 
 HEADERS = \
+		RpAccessor.h \
+		RpArray1D.h \
+		RpBoolean.h \
 		RpChain.h \
+		RpChainHelper.h \
+		RpChoice.h \
+		RpCurve.h \
 		RpInt.h \
 		RpHash.h \
 		RpHashHelper.h \
 		RpNumber.h \
+		RpPlot.h \
 		RpPool.h \
+		RpString.h \
 		RpVariable.h
 
-#		RpBoolean.h \
-		RpAbout.h \
-		RpNumber.h \
-		RpOption.h \
-		RpString.h \
-		RpChoice.h \
-		RpVariable.h
 
 OBJS = \
+		RpArray1D.o \
+		RpBoolean.o \
 		RpChain.o \
+		RpChoice.o \
+		RpCurve.o \
+		RpChainHelper.o \
 		RpHash.o \
 		RpHashHelper.o \
 		RpNumber.o \
+		RpPlot.o \
 		RpPool.o \
+		RpString.o \
+		RpUtils2.o \
 		RpVariable.o
 
-#		RpAbout.o \
-		RpBoolean.o \
-		RpChoice.o \
-		RpNumber.o \
-		RpOption.o \
-		RpString.o \
-		RpVariable.o
 
-name 		= RpObjects
-lib		= lib$(name).a
-shared_lib	= lib$(name)$(SHLIB_SUFFIX)
+name        = RpObjects
+lib         = lib$(name).a
+shared_lib  = lib$(name)$(SHLIB_SUFFIX)
 
 all: build_lib
@@ -108,10 +108,10 @@
 	done
 
-.cc.o: 
-	$(CXX) $(CC_SWITCHES) -c $? 
+.cc.o:
+	$(CXX) $(CC_SWITCHES) -c $?
 .c.o: 
-	$(CCC) $(CC_SWITCHES) -c $? 
+	$(CCC) $(CC_SWITCHES) -c $?
 
-clean: 
+clean:
 	$(RM) $(OBJS) $(lib) $(shared_lib)
 
Index: trunk/src/objects/RpAbout.cc
===================================================================
--- trunk/src/objects/RpAbout.cc	(revision 1270)
+++ 	(revision )
@@ -1,143 +1,0 @@
-/*
- * ----------------------------------------------------------------------
- *  RpAbout - Rappture 2.0 About XML object
- *
- * ======================================================================
- *  AUTHOR:  Derrick Kearney, Purdue University
- *  Copyright (c) 2004-2005  Purdue Research Foundation
- *
- *  See the file "license.terms" for information on usage and
- *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- * ======================================================================
- */
-
- #include "RpAbout.h"
-
-/**********************************************************************/
-// METHOD: setLabel()
-/// Set the label of this object.
-/**
- */
-
-RpAbout&
-RpAbout::setLabel(std::string newLabel) {
-
-    label = newLabel;
-    return *this;
-}
-
-/**********************************************************************/
-// METHOD: setDesc()
-/// Set the description of this object.
-/**
- */
-
-RpAbout&
-RpAbout::setDesc(std::string newDesc) {
-
-    desc = newDesc;
-    return *this;
-}
-
-/**********************************************************************/
-// METHOD: setHints()
-/// Set the hints of this object.
-/**
- */
-
-RpAbout&
-RpAbout::setHints(std::string newHints) {
-
-    hints = newHints;
-    return *this;
-}
-
-/**********************************************************************/
-// METHOD: setColor()
-/// Set the color of this object.
-/**
- */
-
-RpAbout&
-RpAbout::setColor(std::string newColor) {
-
-    color = newColor;
-    return *this;
-}
-
-/**********************************************************************/
-// METHOD: setIcon()
-/// Set the icon of this object.
-/**
- */
-
-RpAbout&
-RpAbout::setIcon(std::string newIcon) {
-
-    icon = newIcon;
-    return *this;
-}
-
-
-/**********************************************************************/
-// METHOD: getLabel()
-/// Report the label of this object.
-/**
- */
-
-std::string
-RpAbout::getLabel() const {
-
-    return label;
-}
-
-/**********************************************************************/
-// METHOD: getDesc()
-/// Report the description of this object.
-/**
- */
-
-std::string
-RpAbout::getDesc() const {
-
-    return desc;
-}
-
-/**********************************************************************/
-// METHOD: getHints()
-/// Report the hints of this object.
-/**
- */
-
-std::string
-RpAbout::getHints() const {
-
-    return hints;
-}
-
-/**********************************************************************/
-// METHOD: getColor()
-/// Report the color of this object.
-/**
- */
-
-std::string
-RpAbout::getColor() const {
-
-    return color;
-}
-
-/**********************************************************************/
-// METHOD: getIcon()
-/// Report the icon of this object.
-/**
- */
-
-std::string
-RpAbout::getIcon() const {
-
-    return icon;
-}
-
-
-// -------------------------------------------------------------------- //
Index: trunk/src/objects/RpAbout.h
===================================================================
--- trunk/src/objects/RpAbout.h	(revision 1270)
+++ 	(revision )
@@ -1,111 +1,0 @@
-/*
- * ======================================================================
- *  Copyright (c) 2004-2005  Purdue Research Foundation
- *
- *  See the file "license.terms" for information on usage and
- *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- * ======================================================================
- */
-#include <iostream>
-#include <string>
-#include <sstream>
-#include <stdlib.h>
-#include <errno.h>
-
-
-// #include "RpLibrary.h"
-
-#ifndef _RpABOUT_H 
-#define _RpABOUT_H
-
-class RpAbout
-{
-    public:
-
-        // users member fxns
-
-        virtual RpAbout& setLabel       (std::string newLabel);
-        virtual RpAbout& setDesc        (std::string newDesc);
-        virtual RpAbout& setHints       (std::string newHints);
-        virtual RpAbout& setColor       (std::string newColor);
-        virtual RpAbout& setIcon        (std::string newIcon);
-
-        virtual std::string getLabel    () const;
-        virtual std::string getDesc     () const;
-        virtual std::string getHints    () const;
-        virtual std::string getColor    () const;
-        virtual std::string getIcon     () const;
-
-        RpAbout ()
-            :   label       (""),
-                desc        (""),
-                hints       (""),
-                color       (""),
-                icon        ("")
-        {};
-
-        RpAbout (
-                    std::string label
-                )
-            :   label       (label),
-                desc        (""),
-                hints       (""),
-                color       (""),
-                icon        ("")
-        {};
-
-        RpAbout (
-                    std::string label,
-                    std::string desc
-                )
-            :   label       (label),
-                desc        (desc),
-                hints       (""),
-                color       (""),
-                icon        ("")
-        {};
-
-        RpAbout (
-                    std::string label,
-                    std::string desc,
-                    std::string hints,
-                    std::string color,
-                    std::string icon
-                )
-            :   label       (label),
-                desc        (desc),
-                hints       (hints),
-                color       (color),
-                icon        (icon)
-        {}
-
-        // copy constructor
-        RpAbout ( const RpAbout& myRpAbout )
-            :   label       (myRpAbout.label),
-                desc        (myRpAbout.desc),
-                hints       (myRpAbout.hints),
-                color       (myRpAbout.color),
-                icon        (myRpAbout.icon)
-        {}
-
-        // default destructor
-        virtual ~RpAbout ()
-        {
-            // clean up dynamic memory
-        }
-
-    private:
-
-        std::string label;
-        std::string desc;
-        std::string hints;
-        std::string color;
-        std::string icon;
-
-
-};
-
-/*--------------------------------------------------------------------------*/
-/*--------------------------------------------------------------------------*/
-
-#endif
Index: trunk/src/objects/RpAccessor.h
===================================================================
--- trunk/src/objects/RpAccessor.h	(revision 1386)
+++ trunk/src/objects/RpAccessor.h	(revision 1386)
@@ -0,0 +1,101 @@
+/*
+ * ======================================================================
+ *  AUTHOR:  Derrick S. Kearney, Purdue University
+ *  Copyright (c) 2005-2009  Purdue Research Foundation
+ *
+ *  See the file "license.terms" for information on usage and
+ *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ * ======================================================================
+ */
+
+#ifndef RAPPTURE_ACCESSOR_H
+#define RAPPTURE_ACCESSOR_H
+
+#include <cstring>
+
+namespace Rappture {
+
+template <class T>
+class Accessor
+{
+public:
+    Accessor ();
+    Accessor (const T &o);
+    ~Accessor();
+
+    // get routine
+    T operator() (void) const;
+
+    // set routine
+    void operator() (T val);
+
+private:
+
+    T _val;
+};
+
+template <class T>
+Accessor<T>::Accessor()
+{
+}
+
+template <class T>
+T
+Accessor<T>::operator() (void) const
+{
+    return _val;
+}
+
+template <class T>
+void
+Accessor<T>::operator() (T val)
+{
+    _val = val;
+}
+
+template <class T>
+Accessor<T>::~Accessor()
+{
+}
+
+// handle const char *'s gracefully?
+
+template <> inline
+Accessor<const char *>::Accessor()
+{
+    _val = NULL;
+}
+
+template <> inline
+void
+Accessor<const char *>::operator() (const char *val)
+{
+    size_t len = strlen(val);
+    char *tmp = new char[len+1];
+    if (tmp == NULL) {
+        // raise error and exit
+    }
+    strncpy(tmp,val,len);
+    tmp[len] = '\0';
+
+    if (_val) {
+        delete[] _val;
+    }
+
+    _val = tmp;
+}
+
+template <> inline
+Accessor<const char *>::~Accessor()
+{
+    if (_val) {
+        delete[] _val;
+    }
+}
+
+} // namespace Rappture
+
+/*--------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------------*/
+
+#endif // RAPPTURE_ACCESSOR_H
Index: trunk/src/objects/RpArray1D.cc
===================================================================
--- trunk/src/objects/RpArray1D.cc	(revision 1386)
+++ trunk/src/objects/RpArray1D.cc	(revision 1386)
@@ -0,0 +1,191 @@
+/*
+ * ----------------------------------------------------------------------
+ *  Rappture 2.0 Array1D Object Source
+ *
+ * ======================================================================
+ *  AUTHOR:  Derrick Kearney, Purdue University
+ *  Copyright (c) 2005-2009  Purdue Research Foundation
+ *
+ *  See the file "license.terms" for information on usage and
+ *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ * ======================================================================
+ */
+
+#include <limits>
+#include "RpArray1D.h"
+
+using namespace Rappture;
+
+const char Array1D::type[]        = "RAPPTURE_AXIS_TYPE_IRREGULAR";
+const char Array1DUniform::type[] = "RAPPTURE_AXIS_TYPE_UNIFORM";
+
+Array1D::Array1D (const char *path)
+    : _val(SimpleDoubleBuffer()),
+      _min(std::numeric_limits<double>::max()),
+      _max(std::numeric_limits<double>::min())
+{
+    this->path(path);
+    this->label("");
+    this->desc("");
+    this->units("");
+    this->scale("linear");
+}
+
+Array1D::Array1D (
+            const char *path,
+            double *val,
+            size_t size
+        )
+    : _val(SimpleDoubleBuffer()),
+      _min(std::numeric_limits<double>::max()),
+      _max(std::numeric_limits<double>::min())
+{
+    this->path(path);
+    this->label("");
+    this->desc("");
+    this->units("");
+    this->scale("linear");
+    append(val,size);
+}
+
+Array1D::Array1D (
+            const char *path,
+            double *val,
+            size_t size,
+            const char *label,
+            const char *desc,
+            const char *units,
+            const char *scale
+        )
+    : _val(SimpleDoubleBuffer()),
+      _min(std::numeric_limits<double>::max()),
+      _max(std::numeric_limits<double>::min())
+{
+    this->path(path);
+    this->label(label);
+    this->desc(desc);
+    this->units(units);
+    this->scale(scale);
+    append(val,size);
+}
+
+// copy constructor
+Array1D::Array1D ( const Array1D& o )
+    : _val(o._val),
+      _min(o._min),
+      _max(o._max)
+{
+    this->path(o.path());
+    this->label(o.label());
+    this->desc(o.desc());
+    this->units(o.units());
+    this->scale(o.scale());
+}
+
+// default destructor
+Array1D::~Array1D ()
+{
+    // clean up dynamic memory
+}
+
+/**********************************************************************/
+// METHOD: append()
+/// Append value to the axis
+/**
+ * Append value to the axis object.
+ */
+
+Array1D&
+Array1D::append(
+    double *val,
+    size_t nmemb)
+{
+    double nmin = _min;
+    double nmax = _max;
+
+    for (size_t i = 0; i < nmemb; i++) {
+        if (val[i] < nmin) {
+            nmin = val[i];
+        }
+        if (val[i] > nmax) {
+            nmax = val[i];
+        }
+    }
+
+    _val.append(val,nmemb);
+
+    _min = nmin;
+    _max = nmax;
+
+    return *this;
+}
+
+/**********************************************************************/
+// METHOD: read()
+/// Read values from the axis object into a memory location
+/**
+ * Read values from the axis object into a memory location
+ */
+
+size_t
+Array1D::read(
+    double *val,
+    size_t nmemb)
+{
+    return _val.read(val,nmemb);
+}
+
+/**********************************************************************/
+// METHOD: nmemb()
+/// Return the number of members in the axis object
+/**
+ * Return the number of members in the axis object
+ */
+
+size_t
+Array1D::nmemb() const
+{
+    return _val.nmemb();
+}
+
+/**********************************************************************/
+// METHOD: min()
+/// Return the min value of the object
+/**
+ * Return the min value of the object
+ */
+
+double
+Array1D::min() const
+{
+    return _min;
+}
+
+/**********************************************************************/
+// METHOD: max()
+/// Return the max value of the object
+/**
+ * Return the max value of the object
+ */
+
+double
+Array1D::max() const
+{
+    return _max;
+}
+
+/**********************************************************************/
+// METHOD: data()
+/// Return the actual data pointer
+/**
+ * Return the actual data pointer
+ */
+
+const double *
+Array1D::data() const
+{
+    return _val.bytes();
+}
+
+// -------------------------------------------------------------------- //
+
Index: trunk/src/objects/RpArray1D.h
===================================================================
--- trunk/src/objects/RpArray1D.h	(revision 1386)
+++ trunk/src/objects/RpArray1D.h	(revision 1386)
@@ -0,0 +1,92 @@
+/*
+ * ======================================================================
+ *  AUTHOR:  Derrick S. Kearney, Purdue University
+ *  Copyright (c) 2005-2009  Purdue Research Foundation
+ *
+ *  See the file "license.terms" for information on usage and
+ *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ * ======================================================================
+ */
+
+#ifndef RAPPTURE_ARRAY1D_H
+#define RAPPTURE_ARRAY1D_H
+
+#include "RpAccessor.h"
+#include "RpSimpleBuffer.h"
+
+namespace Rappture {
+
+class Array1D
+{
+public:
+    Array1D (const char *path);
+    Array1D (const char *path, double *val, size_t size);
+    Array1D (const char *path,
+             double *val,
+             size_t size,
+             const char *label,
+             const char *desc,
+             const char *units,
+             const char *scale);
+    Array1D (const Array1D &o);
+    ~Array1D();
+
+    Accessor<const char *> path;
+    Accessor<const char *> label;
+    Accessor<const char *> desc;
+    Accessor<const char *> units;
+    Accessor<const char *> scale;
+
+    virtual Array1D& append(double *val, size_t nmemb);
+    virtual size_t read(double *val, size_t nmemb);
+    virtual size_t nmemb() const;
+    virtual double min() const;
+    virtual double max() const;
+    virtual const double *data() const;
+
+    static const char type[];
+
+private:
+
+    SimpleDoubleBuffer _val;
+    double _min;
+    double _max;
+};
+
+class Array1DUniform
+{
+public:
+    Array1DUniform  (const char *path);
+    Array1DUniform  (const char *path, double begin, double end, size_t step);
+    Array1DUniform  (const char *path,
+                     double begin,
+                     double end,
+                     size_t step,
+                     const char *label,
+                     const char *desc,
+                     const char *units,
+                     const char *scale);
+    Array1DUniform  (const Array1DUniform &o);
+    ~Array1DUniform ();
+
+    Accessor<const char *> path;
+    Accessor<const char *> label;
+    Accessor<const char *> desc;
+    Accessor<const char *> units;
+    Accessor<const char *> scale;
+    Accessor<double> begin;
+    Accessor<double> end;
+    Accessor<size_t> step;
+
+    size_t read(double *val, size_t nmemb);
+    const double *data() const;
+    virtual size_t nmemb() const;
+    static const char type[];
+
+private:
+    SimpleDoubleBuffer _val;
+
+};
+} // namespace Rappture
+
+#endif // RAPPTURE_ARRAY1D_H
Index: trunk/src/objects/RpBoolean.cc
===================================================================
--- trunk/src/objects/RpBoolean.cc	(revision 1270)
+++ trunk/src/objects/RpBoolean.cc	(revision 1386)
@@ -1,9 +1,9 @@
 /*
  * ----------------------------------------------------------------------
- *  RpBoolean - Rappture 2.0 About XML object
+ *  Rappture 2.0 Boolean Object Source
  *
  * ======================================================================
  *  AUTHOR:  Derrick Kearney, Purdue University
- *  Copyright (c) 2004-2005  Purdue Research Foundation
+ *  Copyright (c) 2005-2009  Purdue Research Foundation
  *
  *  See the file "license.terms" for information on usage and
@@ -12,76 +12,48 @@
  */
 
- #include "RpBoolean.h"
+#include "RpBoolean.h"
+#include "RpUnits.h"
 
-/**********************************************************************/
-// METHOD: setDefaultValue()
-/// Set the default value of this object
-/**
- */
+using namespace Rappture;
 
-RpBoolean& 
-RpBoolean::setDefaultValue(std::string newDefaultVal)
+Boolean::Boolean (
+            const char *path,
+            int val
+        )
+    :   Variable    ()
 {
-    std::string* def = NULL;
-    
-    def = (std::string*) RpVariable::getDefaultValue(); 
-
-    if (!def) {
-        RpVariable::setDefaultValue(new std::string (newDefaultVal));
-    }
-    else {
-        *def = newDefaultVal;
-    }
-
-    return *this;
+    this->path(path);
+    this->def(val);
+    this->cur(val);
 }
 
-/**********************************************************************/
-// METHOD: setCurrentValue()
-/// Set the current value of this object.
-/**
- */
-
-RpBoolean& 
-RpBoolean::setCurrentValue(std::string newCurrentVal)
+Boolean::Boolean (
+            const char *path,
+            int val,
+            const char *label,
+            const char *desc
+        )
+    :   Variable    ()
 {
-    std::string* cur = (std::string*) RpVariable::getCurrentValue();
-    std::string* def = (std::string*) RpVariable::getDefaultValue();
-
-    if (cur == def) {
-        RpVariable::setCurrentValue(new std::string (newCurrentVal));
-    }
-    else {
-        *cur = newCurrentVal;
-    }
-
-    return *this;
+    this->path(path);
+    this->label(label);
+    this->desc(desc);
+    this->def(val);
+    this->cur(val);
 }
 
+// copy constructor
+Boolean::Boolean ( const Boolean& o )
+    :   Variable(o)
+{
+    this->def(o.def());
+    this->cur(o.cur());
 
-/**********************************************************************/
-// METHOD: getDefaultValue()
-/// Report the default value of this object.
-/**
- */
-
-std::string
-RpBoolean::getDefaultValue(void* null_val) const
-{
-    return *((std::string*) RpVariable::getDefaultValue()); 
 }
 
-/**********************************************************************/
-// METHOD: getCurrentValue()
-/// Report the current value of this object.
-/**
- */
-
-std::string
-RpBoolean::getCurrentValue(void* null_val) const
+// default destructor
+Boolean::~Boolean ()
 {
-    return *((std::string*) RpVariable::getCurrentValue()); 
 }
 
 // -------------------------------------------------------------------- //
-
Index: trunk/src/objects/RpBoolean.h
===================================================================
--- trunk/src/objects/RpBoolean.h	(revision 1270)
+++ trunk/src/objects/RpBoolean.h	(revision 1386)
@@ -1,5 +1,6 @@
 /*
  * ======================================================================
- *  Copyright (c) 2004-2005  Purdue Research Foundation
+ *  AUTHOR:  Derrick Kearney, Purdue University
+ *  Copyright (c) 2005-2009  Purdue Research Foundation
  *
  *  See the file "license.terms" for information on usage and
@@ -7,73 +8,33 @@
  * ======================================================================
  */
-#include <iostream>
-#include <string>
-#include <sstream>
-#include <stdlib.h>
-#include <errno.h>
 
+#include "RpVariable.h"
 
-// #include "RpLibrary.h"
+#ifndef RAPPTURE_BOOLEAN_H
+#define RAPPTURE_BOOLEAN_H
 
-#ifndef _RpVARIABLE_H
-    #include "RpVariable.h"
-#endif
+namespace Rappture {
 
-#ifndef _RpBOOLEAN_H 
-#define _RpBOOLEAN_H
-
-class RpBoolean : public RpVariable
+class Boolean : public Variable
 {
     public:
-        
-        // users member fxns
 
-        virtual RpBoolean& setDefaultValue   (std::string newDefaultVal);
-        virtual RpBoolean& setCurrentValue   (std::string newCurrentVal);
+        Boolean  (  const char *path,
+                    int val);
 
-        // base class makes 
-        // these functions virtual and derived class has a different
-        // return type. compiler doesnt like this. need to find another
-        // way around this
-        //
-        // if we keep the null_val=NULL will that give us undefined behavior?
-        //
-        std::string getDefaultValue         (void* null_val=NULL) const;
-        std::string getCurrentValue         (void* null_val=NULL) const;
+        Boolean  (  const char *path,
+                    int val,
+                    const char *label,
+                    const char *desc);
 
-        // place the information from this object into the xml library 'lib'
-        // virtual RpBoolean& put(RpLibrary lib);
-        // RpBoolean& put() const;
+        Boolean  ( const Boolean& o );
+        virtual ~Boolean ();
 
-        RpBoolean (
-                    std::string path, 
-                    std::string defaultVal
-                )
-            :   RpVariable  (path, new std::string (defaultVal) )
-        { }
-
-        RpBoolean (
-                    std::string path, 
-                    std::string defaultVal,
-                    std::string label,
-                    std::string desc
-                )
-            :   RpVariable  (path, new std::string (defaultVal), label, desc)
-        { }
-        
-        // copy constructor
-        RpBoolean ( const RpBoolean& myRpBoolean )
-            :   RpVariable(myRpBoolean)
-        {}
-
-        // default destructor
-        virtual ~RpBoolean ()
-        {
-            // clean up dynamic memory
-        }
-
-    private:
+        Accessor<int> def;
+        Accessor<int> cur;
 
 };
+
+} // namespace Rappture
 
 /*--------------------------------------------------------------------------*/
Index: trunk/src/objects/RpChain.h
===================================================================
--- trunk/src/objects/RpChain.h	(revision 1270)
+++ trunk/src/objects/RpChain.h	(revision 1386)
@@ -24,4 +24,8 @@
 #ifndef _RP_CHAIN_H
 #define _RP_CHAIN_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 typedef struct Rp_ChainLinkStruct Rp_ChainLink;
@@ -83,3 +87,7 @@
     (Rp_ChainLinkAfter((c), (l), (Rp_ChainLink *)NULL))
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _RP_CHAIN_H */
Index: trunk/src/objects/RpChainHelper.c
===================================================================
--- trunk/src/objects/RpChainHelper.c	(revision 1386)
+++ trunk/src/objects/RpChainHelper.c	(revision 1386)
@@ -0,0 +1,128 @@
+#include <string.h>
+#include "RpChainHelper.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+Rp_Chain *
+Rp_ChainJoin (
+    Rp_Chain *c1,
+    Rp_Chain *c2)
+{
+    Rp_ChainLink *l = NULL;
+
+    if (c1 == NULL) {
+        return c2;
+    }
+
+    if (c2 == NULL) {
+        return c1;
+    }
+
+    l = Rp_ChainLastLink(c2);
+    while (l != NULL) {
+        Rp_ChainUnlinkLink(c2,l);
+        Rp_ChainPrependLink(c1,l);
+        l = Rp_ChainLastLink(c2);
+    }
+
+    if (Rp_ChainGetLength(c2) != 0) {
+    // FIXME: add error message
+    }
+
+    Rp_ChainDestroy(c2);
+
+    return c1;
+}
+
+Rp_Chain *
+Rp_ChainConcat (
+    Rp_Chain *c1,
+    Rp_Chain *c2)
+{
+    Rp_ChainLink *l = NULL;
+
+    if (c1 == NULL) {
+        return c2;
+    }
+
+    if (c2 == NULL) {
+        return c1;
+    }
+
+    l = Rp_ChainFirstLink(c2);
+    while (l != NULL) {
+        Rp_ChainUnlinkLink(c2,l);
+        Rp_ChainAppendLink(c1,l);
+        l = Rp_ChainFirstLink(c2);
+    }
+
+    return c1;
+}
+
+int
+Rp_ChainCopy (
+    Rp_Chain *c1,
+    Rp_Chain *c2,
+    int (*cpyFxn)(void **to,void *from))
+{
+    void *origVal = NULL;
+    void *copyVal = NULL;
+    Rp_ChainLink *lorig = NULL;
+
+    if ( ( (c1 == NULL) && (c2 == NULL) )
+        || (cpyFxn == NULL) ) {
+        // raise error, improper function call
+        return -1;
+    }
+
+    if (c1 == NULL) {
+        // nothing to copy to
+        return 0;
+    }
+
+    if (c2 == NULL) {
+        // nothing to copy from
+        return 0;
+    }
+
+    lorig = Rp_ChainFirstLink(c2);
+    while (lorig != NULL) {
+        origVal = (void*) Rp_ChainGetValue(lorig);
+        if (cpyFxn(&copyVal,origVal) != 0) {
+            // error while copying
+            return -1;
+        }
+        Rp_ChainAppend(c1,copyVal);
+        lorig = Rp_ChainNextLink(lorig);
+    }
+
+    return 0;
+}
+
+int
+Rp_ChainCharCpyFxn (
+    void **to,
+    void *from)
+{
+    size_t len = 0;
+
+    len = strlen((char*)from);
+    *to = (void*) malloc(len*sizeof(char));
+    strcpy((char*)(*to),(char*)from);
+    return 0;
+}
+
+int
+Rp_ChainCharCmpFxn (
+    void *to,
+    void *from)
+{
+    return strcmp(to,from);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
Index: trunk/src/objects/RpChainHelper.h
===================================================================
--- trunk/src/objects/RpChainHelper.h	(revision 1386)
+++ trunk/src/objects/RpChainHelper.h	(revision 1386)
@@ -0,0 +1,28 @@
+#ifndef _RP_CHAIN_HELPER_H
+#define _RP_CHAIN_HELPER_H 1
+
+#include "RpInt.h"
+#include "RpChain.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+// int chain2hash(Rp_Chain *c, Rp_HashTable *h);
+
+Rp_Chain * Rp_ChainJoin     ( Rp_Chain *c1,
+                              Rp_Chain *c2);
+
+Rp_Chain * Rp_ChainConcat   ( Rp_Chain *c1,
+                              Rp_Chain *c2);
+
+int Rp_ChainCopy            ( Rp_Chain *c1,
+                              Rp_Chain *c2,
+                              int (*cpyFxn)(void **to,void *from));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _RP_CHAIN_HELPER_H
Index: trunk/src/objects/RpChoice.cc
===================================================================
--- trunk/src/objects/RpChoice.cc	(revision 1270)
+++ trunk/src/objects/RpChoice.cc	(revision 1386)
@@ -1,8 +1,9 @@
 /*
- *  RpChoice - Rappture 2.0 About XML object
+ * ----------------------------------------------------------------------
+ *  Rappture 2.0 Choice Object Source
  *
  * ======================================================================
  *  AUTHOR:  Derrick Kearney, Purdue University
- *  Copyright (c) 2004-2005  Purdue Research Foundation
+ *  Copyright (c) 2005-2009  Purdue Research Foundation
  *
  *  See the file "license.terms" for information on usage and
@@ -13,23 +14,87 @@
 #include "RpChoice.h"
 
+using namespace Rappture;
+
+Choice::Choice (
+            const char *path,
+            const char *val
+        )
+    :   Variable    (),
+        _options    (NULL)
+{
+    this->path(path);
+    this->label("");
+    this->desc("");
+    this->def(val);
+    this->cur(val);
+}
+
+Choice::Choice (
+            const char *path,
+            const char *val,
+            const char *label,
+            const char *desc
+        )
+    :   Variable    (),
+        _options    (NULL)
+{
+    this->path(path);
+    this->label(label);
+    this->desc(desc);
+    this->def(val);
+    this->cur(val);
+}
+
+// copy constructor
+Choice::Choice ( const Choice& o )
+    :   Variable(o)
+{
+    this->def(o.def());
+    this->cur(o.cur());
+
+    // need to copy _options
+}
+
+// default destructor
+Choice::~Choice ()
+{
+    // clean up dynamic memory
+    // unallocate the _options?
+
+}
+
 /**********************************************************************/
-// METHOD: setDefaultValue()
-/// Set the default value of a RpChoice object.
+// METHOD: addOption()
+/// Add an option value to the object
 /**
+ * Add an option value to the object. Currently all
+ * labels must be unique.
  */
 
-RpChoice& 
-RpChoice::setDefaultValue(std::string newDefaultVal)
+Choice&
+Choice::addOption(
+    const char *label,
+    const char *desc,
+    const char *val)
 {
-    std::string* def = NULL;
+    option *p = NULL;
 
-    def = (std::string*) RpVariable::getDefaultValue(); 
+    p = new option;
+    if (!p) {
+        // raise error and exit
+    }
 
-    if (!def) {
-        RpVariable::setDefaultValue(new std::string (newDefaultVal));
+    p->label(label);
+    p->desc(desc);
+    p->val(val);
+
+    if (_options == NULL) {
+        _options = Rp_ChainCreate();
+        if (_options == NULL) {
+            // raise error and exit
+        }
     }
-    else {
-        *def = newDefaultVal;
-    }
+
+    Rp_ChainAppend(_options,p);
 
     return *this;
@@ -37,140 +102,44 @@
 
 /**********************************************************************/
-// METHOD: setCurrentValue()
-/// Set the current value of a RpChoice object.
+// METHOD: delOption()
+/// Delete an option value from the object
 /**
+ * Delete an option value from the object.
  */
 
-RpChoice& 
-RpChoice::setCurrentValue(std::string newCurrentVal)
+Choice&
+Choice::delOption(const char *label)
 {
-    std::string* cur = (std::string*) RpVariable::getCurrentValue();
-    std::string* def = (std::string*) RpVariable::getDefaultValue();
+    if (label == NULL) {
+        return *this;
+    }
 
-    if (cur == def) {
-        RpVariable::setCurrentValue(new std::string (newCurrentVal));
+    if (_options == NULL) {
+        return *this;
     }
-    else {
-        *cur = newCurrentVal;
+
+    option *p = NULL;
+    const char *plabel = NULL;
+    Rp_ChainLink *l = NULL;
+
+    // traverse the list looking for the matching option
+    l = Rp_ChainFirstLink(_options);
+    while (l != NULL) {
+        p = (option *) Rp_ChainGetValue(l);
+        plabel = p->label();
+        if ((*label == *plabel) && (strcmp(plabel,label) == 0)) {
+            // we found matching entry, remove it
+            if (p) {
+                delete p;
+                Rp_ChainDeleteLink(_options,l);
+            }
+            break;
+        }
     }
+
 
     return *this;
 }
 
+// -------------------------------------------------------------------- //
 
-/**********************************************************************/
-// METHOD: setOption()
-/// Set an option for this object.
-/**
- */
-
-RpChoice&
-RpChoice::setOption(std::string newOption)
-{
-    options.push_back(RpOption(newOption));
-    return *this;
-}
-
-/**********************************************************************/
-// METHOD: deleteOption()
-/// Delete the provided option from this object.
-/**
- */
-
-RpChoice& 
-RpChoice::deleteOption(std::string optionName)
-{
-    int lvc = 0;
-    int vsize = options.size();
-    // std::vector<RpOption>::iterator tempIterator;
-    /*
-    for (lvc=0,tempIterator=options.begin();lvc<vsize;lvc++,tempIterator++) {
-        if (option[lvc] == option) {
-            option.erase(tempIterator);
-            break;
-        }
-    }
-    */
-    for (lvc = 0;lvc < vsize; lvc++) {
-        if (options[lvc].getLabel() == optionName) {
-            options.erase(options.begin()+lvc);
-            break;
-        }
-    } 
-    return *this;
-}
-
-/**********************************************************************/
-// METHOD: getDefaultValue()
-/// Report the default value of this object.
-/**
- */
-
-std::string
-RpChoice::getDefaultValue(void* null_val) const
-{
-    return *((std::string*) RpVariable::getDefaultValue()); 
-}
-
-/**********************************************************************/
-// METHOD: getCurrentValue()
-/// Report the current value of the object.
-/**
- */
-
-std::string
-RpChoice::getCurrentValue(void* null_val) const
-{
-    return *((std::string*) RpVariable::getCurrentValue()); 
-}
-
-
-/************************************************************************
- *                                                                      
- * report the options of the object 
- *                                                                      
- ************************************************************************/
-
-/**********************************************************************/
-// METHOD: setLabel()
-/// Set the label of this object.
-/**
- */
-
-std::string
-RpChoice::getFirstOption()
-{
-    optionsIter = options.begin();
-    return ((*optionsIter).getLabel()); 
-}
-
-/**********************************************************************/
-// METHOD: getNextOption()
-/// Report the next options of the object.
-/**
- * If you get to the end of the options list, "" is returned.
- */
-
-std::string
-RpChoice::getNextOption()
-{
-    optionsIter++;
-    if (optionsIter == options.end()) {
-        return std::string("");
-    }
-    return ((*optionsIter).getLabel()); 
-}
-
-/**********************************************************************/
-// METHOD: getOptListSize()
-/// Report the number of options (items) in this object.
-/**
- */
-
-unsigned int
-RpChoice::getOptListSize() const
-{
-    return options.size();
-}
-
-// -------------------------------------------------------------------- //
Index: trunk/src/objects/RpChoice.h
===================================================================
--- trunk/src/objects/RpChoice.h	(revision 1270)
+++ trunk/src/objects/RpChoice.h	(revision 1386)
@@ -1,5 +1,6 @@
 /*
  * ======================================================================
- *  Copyright (c) 2004-2005  Purdue Research Foundation
+ *  AUTHOR:  Derrick Kearney, Purdue University
+ *  Copyright (c) 2005-2009  Purdue Research Foundation
  *
  *  See the file "license.terms" for information on usage and
@@ -7,128 +8,50 @@
  * ======================================================================
  */
-#include <iostream>
-#include <string>
-#include <sstream>
-#include <stdlib.h>
 #include <errno.h>
-#include <vector>
+#include "RpVariable.h"
+#include "RpChain.h"
 
+#ifndef RAPPTURE_CHOICE_H
+#define RAPPTURE_CHOICE_H
 
-// #include "RpLibrary.h"
+namespace Rappture {
 
-#ifndef _RpVARIABLE_H
-    #include "RpVariable.h"
-#endif
-
-#ifndef _RpOPTION_H
-    #include "RpOption.h"
-#endif
-
-#ifndef _RpCHOICE_H 
-#define _RpCHOICE_H
-
-class RpChoice : public RpVariable
+class Choice : public Variable
 {
     public:
-        
-        // users member fxns
 
-        virtual RpChoice& setDefaultValue   (std::string newDefaultVal);
-        virtual RpChoice& setCurrentValue   (std::string newCurrentVal);
-        virtual RpChoice& setOption         (std::string newOption);
-        virtual RpChoice& deleteOption      (std::string newOption);
+        Choice  (   const char *path,
+                    const char *val );
 
-        // changed from "Value" to "Val" because base class makes 
-        // these functions virtual and derived class has a different
-        // return type. compiler doesnt like this. need to find another
-        // way around this
-        //
-        // if we keep the null_val=NULL will that give us undefined behavior?
-        //
-        virtual std::string getDefaultValue (void* null_val=NULL) const;
-        virtual std::string getCurrentValue (void* null_val=NULL) const;
-        virtual std::string getFirstOption  ();
-        virtual std::string getNextOption   ();
-        virtual unsigned int getOptListSize () const;
+        Choice  (   const char *path,
+                    const char *val,
+                    const char *label,
+                    const char *desc);
 
-        
-        // place the information from this object into the xml library 'lib'
-        // virtual RpChoice& put(RpLibrary lib);
-        // RpChoice& put() const;
+        Choice  (   const Choice& o );
+        virtual ~Choice ();
 
-        RpChoice (
-                    std::string path, 
-                    std::string defaultVal,
-                    std::string optionList
-                )
-            :   RpVariable  (path, new std::string (defaultVal) )
-        {
-            // optionList is a comma separated list of options
+        Accessor<const char *> def;
+        Accessor<const char *> cur;
 
-            optionsIter = options.begin();
-            std::string::size_type pos = optionList.find (',',0);
-            std::string::size_type lastPos = 0;
-            std::string tmpStr;
-            
+        Choice& addOption ( const char *label,
+                            const char *desc,
+                            const char *val );
 
-            while (pos != std::string::npos) {
-                tmpStr = optionList.substr(lastPos, pos-lastPos);
-                setOption(tmpStr);
-                lastPos = pos + 1;
-                pos = optionList.find (",",lastPos);
-            }
+        Choice& delOption ( const char *label);
 
-            tmpStr = optionList.substr(lastPos);
-            setOption(tmpStr);
-
-        }
-
-        RpChoice (
-                    std::string path, 
-                    std::string defaultVal,
-                    std::string label,
-                    std::string desc,
-                    std::string optionList
-                )
-            :   RpVariable  (path, new std::string (defaultVal), label, desc)
-        { 
-            // optionList is a comma separated list of options
-
-            optionsIter = options.begin();
-            std::string::size_type pos = optionList.find (',',0);
-            std::string::size_type lastPos = 0;
-            std::string tmpStr;
-            
-
-            while (pos != std::string::npos) {
-                tmpStr = optionList.substr(lastPos, pos-lastPos);
-                setOption(tmpStr);
-                lastPos = pos + 1;
-                pos = optionList.find (",",lastPos);
-            }
-
-            tmpStr = optionList.substr(lastPos);
-            setOption(tmpStr);
-
-        }
-        
-        // copy constructor
-        RpChoice ( const RpChoice& myRpChoice )
-            :   RpVariable      (myRpChoice),
-                options         (myRpChoice.options)
-        {
-        }
-
-        // default destructor
-        virtual ~RpChoice ()
-        {
-            // clean up dynamic memory
-
-        }
     private:
 
-        std::vector<RpOption> options;
-        std::vector<RpOption>::iterator optionsIter;
+        // hash or linked list of preset values
+        Rp_Chain *_options;
+
+        struct option{
+            Accessor<const char *> label;
+            Accessor<const char *> desc;
+            Accessor<const char *> val;
+        };
 };
+
+} // namespace Rappture
 
 /*--------------------------------------------------------------------------*/
Index: trunk/src/objects/RpCurve.cc
===================================================================
--- trunk/src/objects/RpCurve.cc	(revision 1386)
+++ trunk/src/objects/RpCurve.cc	(revision 1386)
@@ -0,0 +1,247 @@
+/*
+ * ----------------------------------------------------------------------
+ *  Rappture 2.0 Curve Object Source
+ *
+ * ======================================================================
+ *  AUTHOR:  Derrick Kearney, Purdue University
+ *  Copyright (c) 2005-2009  Purdue Research Foundation
+ *
+ *  See the file "license.terms" for information on usage and
+ *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ * ======================================================================
+ */
+
+#include "RpCurve.h"
+
+using namespace Rappture;
+
+Curve::Curve (const char *path)
+    :   Variable    (),
+        _axisList    (NULL)
+{
+    this->path(path);
+    this->label("");
+    this->desc("");
+    this->group("");
+}
+
+Curve::Curve (
+            const char *path,
+            const char *label,
+            const char *desc,
+            const char *group
+        )
+    :   Variable    (),
+        _axisList    (NULL)
+{
+    this->path(path);
+    this->label(label);
+    this->desc(desc);
+    this->group(group);
+}
+
+// copy constructor
+Curve::Curve ( const Curve& o )
+    :   Variable(o)
+{
+    this->path(o.path());
+    this->label(o.label());
+    this->desc(o.desc());
+    this->group(o.group());
+
+    // need to copy _axisList
+}
+
+// default destructor
+Curve::~Curve ()
+{
+    // clean up dynamic memory
+    // unallocate the _axisList?
+
+}
+
+/**********************************************************************/
+// METHOD: axis()
+/// Add an axis vector to the object
+/**
+ * Add an axis vector to the object.
+ * Axis label must be unique.
+ */
+
+Curve&
+Curve::axis(
+    const char *label,
+    const char *desc,
+    const char *units,
+    const char *scale,
+    double *val,
+    size_t size)
+{
+    Array1D *a = NULL;
+    SimpleCharBuffer apath(path());
+
+    apath.append(".");
+    apath.append(label);
+
+    a = new Array1D(apath.bytes(),val,size,label,desc,units,scale);
+    if (!a) {
+        // raise error and exit
+    }
+
+    if (_axisList == NULL) {
+        _axisList = Rp_ChainCreate();
+        if (_axisList == NULL) {
+            // raise error and exit
+        }
+    }
+
+    Rp_ChainAppend(_axisList,a);
+
+    return *this;
+}
+
+/*
+Curve&
+Curve::addAxis(
+    const char *path)
+{
+    return *this;
+}
+*/
+
+/**********************************************************************/
+// METHOD: delAxis()
+/// Delete an axis from this object's list of axis
+/**
+ * Delete an axis from the object
+ */
+
+Curve&
+Curve::delAxis(const char *label)
+{
+    Array1D *a = NULL;
+    Rp_ChainLink *l = NULL;
+    l = __searchAxisList(label);
+
+    if (l == NULL) {
+        return *this;
+    }
+
+    a = (Array1D *) Rp_ChainGetValue(l);
+    delete a;
+    Rp_ChainDeleteLink(_axisList,l);
+
+    return *this;
+}
+
+/**********************************************************************/
+// METHOD: data()
+/// Return an Axis object's data based on its label
+/**
+ * Return an Axis object's data based on its label
+ */
+
+size_t
+Curve::data(
+    const char *label,
+    const double **arr) const
+{
+    if (arr == NULL) {
+        // arr should not be null
+        return 0;
+    }
+
+    size_t ret = 0;
+    Rappture::Array1D *a = getAxis(label);
+    if (a != NULL) {
+        *arr = a->data();
+        ret = a->nmemb();
+    }
+    return ret;
+}
+
+/**********************************************************************/
+// METHOD: getAxis()
+/// Return an Axis object based on its label
+/**
+ * Return an Axis object based on its label
+ */
+
+Array1D *
+Curve::getAxis(const char *label) const
+{
+    Rp_ChainLink *l = NULL;
+    l = __searchAxisList(label);
+
+    if (l == NULL) {
+        return NULL;
+    }
+
+    return (Array1D *) Rp_ChainGetValue(l);
+}
+
+Rp_ChainLink *
+Curve::__searchAxisList(const char *label) const
+{
+    if (label == NULL) {
+        return NULL;
+    }
+
+    if (_axisList == NULL) {
+        return NULL;
+    }
+
+    Rp_ChainLink *l = NULL;
+    Rp_ChainLink *retval = NULL;
+
+    // traverse the list looking for the match
+    l = Rp_ChainFirstLink(_axisList);
+    while (l != NULL) {
+        Array1D *a = (Array1D *) Rp_ChainGetValue(l);
+        const char *alabel = a->label();
+        if ((*label == *alabel) && (strcmp(alabel,label) == 0)) {
+            // we found matching entry, return it
+            retval = l;
+            break;
+        }
+        l = Rp_ChainNextLink(l);
+    }
+
+    return retval;
+}
+
+/**********************************************************************/
+// METHOD: getNthAxis()
+/// Return the Nth Axis object
+/**
+ * Return the Nth Axis
+ */
+
+Array1D *
+Curve::getNthAxis(size_t n) const
+{
+    Rp_ChainLink *l = NULL;
+    l = Rp_ChainGetNthLink(_axisList,n);
+
+    if (l == NULL) {
+        return NULL;
+    }
+
+    return (Array1D *) Rp_ChainGetValue(l);
+}
+
+/**********************************************************************/
+// METHOD: dims()
+/// Return the dimensionality of the object
+/**
+ * Return the dimensionality of the object
+ */
+
+size_t
+Curve::dims() const
+{
+    return (size_t) Rp_ChainGetLength(_axisList);
+}
+
+// -------------------------------------------------------------------- //
+
Index: trunk/src/objects/RpCurve.h
===================================================================
--- trunk/src/objects/RpCurve.h	(revision 1386)
+++ trunk/src/objects/RpCurve.h	(revision 1386)
@@ -0,0 +1,73 @@
+/*
+ * ======================================================================
+ *  AUTHOR:  Derrick Kearney, Purdue University
+ *  Copyright (c) 2005-2009  Purdue Research Foundation
+ *
+ *  See the file "license.terms" for information on usage and
+ *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ * ======================================================================
+ */
+#include <errno.h>
+#include "RpVariable.h"
+#include "RpChain.h"
+#include "RpArray1D.h"
+
+#ifndef RAPPTURE_CURVE_H
+#define RAPPTURE_CURVE_H
+
+namespace Rappture {
+
+class Curve : public Variable
+{
+    public:
+
+        Curve  (const char *path);
+
+        Curve  (const char *path,
+                const char *label,
+                const char *desc,
+                const char *group);
+
+        Curve  (const Curve& o);
+
+        virtual ~Curve  ();
+
+        Curve& axis (const char *label,
+                     const char *desc,
+                     const char *units,
+                     const char *scale,
+                     double *val,
+                     size_t size);
+
+        Curve& delAxis (const char *label);
+
+        size_t data (const char *label,
+                     const double **arr) const;
+
+        Array1D *getAxis    ( const char *label) const;
+        Array1D *getNthAxis ( size_t n) const;
+
+        /*
+        Array1D *firstAxis ();
+        Array1D *lastAxis  ();
+        Array1D *nextAxis  (   const char *prevLabel);
+        Array1D *prevAxis  (   const char *prevLabel);
+        */
+
+        Accessor <const char *> group;
+        size_t dims() const;
+
+    private:
+
+        // hash or linked list of preset values
+        Rp_Chain *_axisList;
+
+        Rp_ChainLink *__searchAxisList(const char * label) const;
+};
+
+} // namespace Rappture
+
+/*--------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------------*/
+
+#endif // RAPPTURE_CURVE_H
Index: trunk/src/objects/RpHashHelper.c
===================================================================
--- trunk/src/objects/RpHashHelper.c	(revision 1270)
+++ trunk/src/objects/RpHashHelper.c	(revision 1386)
@@ -4,4 +4,9 @@
 #include <ctype.h>
 #include "RpHashHelper.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 
 int
@@ -254,2 +259,6 @@
 }
 
+#ifdef __cplusplus
+}
+#endif
+
Index: trunk/src/objects/RpHashHelper.h
===================================================================
--- trunk/src/objects/RpHashHelper.h	(revision 1270)
+++ trunk/src/objects/RpHashHelper.h	(revision 1386)
@@ -4,4 +4,9 @@
 #include "RpInt.h"
 #include "RpHash.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 
 int Rp_HashPrint        ( Rp_HashTable *h);
@@ -36,3 +41,7 @@
 int charCmpFxn( void *to, void *from);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // _RP_HASH_HELPER_H
Index: trunk/src/objects/RpNumber.cc
===================================================================
--- trunk/src/objects/RpNumber.cc	(revision 1270)
+++ trunk/src/objects/RpNumber.cc	(revision 1386)
@@ -12,43 +12,38 @@
  */
 
-#include <cstring>
-#include <stdlib.h>
 #include "RpNumber.h"
-
-#ifndef _RpUNITS_H
-    #include "RpUnits.h"
-#endif
-
-RpNumber::RpNumber (
+#include "RpUnits.h"
+
+using namespace Rappture;
+
+Number::Number (
             const char *path,
-            const char *unit,
+            const char *units,
             double val
         )
-    :   RpVariable  (),
-        _default    (val),
-        _current    (val),
-        _min        (0.0),
-        _max        (0.0),
-        _minmaxSet  (0.0)
+    :   Variable    (),
+        _minmaxSet  (0),
+        _presets    (NULL)
 {
     const RpUnits *u = NULL;
 
-    property("path",(const void *)path);
-
-    u = RpUnits::find(std::string(unit));
+    this->path(path);
+    this->label("");
+    this->desc("");
+    this->def(val);
+    this->cur(val);
+    this->min(0.0);
+    this->max(0.0);
+
+    u = RpUnits::find(std::string(units));
     if (!u) {
-        u = RpUnits::define(unit,NULL);
-    }
-    property("units",(const void *)unit);
-
-    property("default",(const void *)&_default);
-    property("current",(const void *)&_current);
-    property("min",(const void *)&_min);
-    property("max",(const void *)&_max);
-}
-
-RpNumber::RpNumber (
+        u = RpUnits::define(units,NULL);
+    }
+    this->units(units);
+}
+
+Number::Number (
             const char *path,
-            const char *unit,
+            const char *units,
             double val,
             double min,
@@ -57,20 +52,23 @@
             const char *desc
         )
-    :   RpVariable  (),
-        _default    (val),
-        _current    (val),
-        _min         (min),
-        _max         (max),
-        _minmaxSet   (0)
+    :   Variable    (),
+        _minmaxSet  (0),
+        _presets    (NULL)
 {
     const RpUnits *u = NULL;
 
-    property("path",(const void *)path);
-
-    u = RpUnits::find(std::string(unit));
+    this->path(path);
+    this->label(label);
+    this->desc(desc);
+    this->def(val);
+    this->cur(val);
+    this->min(min);
+    this->max(max);
+
+    u = RpUnits::find(std::string(units));
     if (! u) {
-        u = RpUnits::define(unit,NULL);
-    }
-    property("units",(const void *)unit);
+        u = RpUnits::define(units,NULL);
+    }
+    this->units(units);
 
     if ((min == 0) && (max == 0)) {
@@ -80,49 +78,33 @@
 
         if (min > val) {
-            _min = val;
+            this->min(val);
         }
 
         if (max < val) {
-            _max = val;
-        }
-    }
-
-    property("default",(const void *)&_default);
-    property("current",(const void *)&_current);
-    property("min",(const void *)&_min);
-    property("max",(const void *)&_max);
+            this->max(val);
+        }
+    }
 }
 
 // copy constructor
-RpNumber::RpNumber ( const RpNumber& o )
-    :   RpVariable(o),
-        _default    (o._default),
-        _current    (o._current),
-        _min        (o._min),
-        _max        (o._max),
+Number::Number ( const Number& o )
+    :   Variable(o),
         _minmaxSet  (o._minmaxSet)
-{}
+{
+    this->def(o.def());
+    this->cur(o.cur());
+    this->min(o.min());
+    this->max(o.max());
+    this->units(o.units());
+
+    // need to copy _presets
+}
 
 // default destructor
-RpNumber::~RpNumber ()
+Number::~Number ()
 {
     // clean up dynamic memory
 
 }
-
-/**********************************************************************/
-// METHOD: units()
-/// get / set the units of this number
-/**
- * get / set the units property of this object
- */
-
-const char *
-RpNumber::units(
-    const char *val)
-{
-    return (const char *) property("units",val);
-}
-
 
 /**********************************************************************/
@@ -134,9 +116,9 @@
 
 double
-RpNumber::convert(const char *to) {
+Number::convert(const char *to) {
 
     const RpUnits* toUnit = NULL;
     const RpUnits* fromUnit = NULL;
-    double convertedVal = _current;
+    double convertedVal = cur();
     int err = 0;
 
@@ -146,27 +128,27 @@
         // should raise error!
         // conversion not defined because unit does not exist
-        return _current;
-    }
-
-    fromUnit = RpUnits::find(std::string(units(NULL)));
+        return convertedVal;
+    }
+
+    fromUnit = RpUnits::find(std::string(units()));
     if (!fromUnit) {
         // should raise error!
         // conversion not defined because unit does not exist
-        return _current;
+        return convertedVal;
     }
 
     // perform the conversion
-    convertedVal = fromUnit->convert(toUnit,_default, &err);
+    convertedVal = fromUnit->convert(toUnit,def(), &err);
     if (!err) {
-        _default = convertedVal;
-    }
-
-    convertedVal = fromUnit->convert(toUnit,_current, &err);
+        def(convertedVal);
+    }
+
+    convertedVal = fromUnit->convert(toUnit,cur(), &err);
     if (!err) {
-        _current = convertedVal;
+        cur(convertedVal);
     }
 
     if (err) {
-        convertedVal = _current;
+        convertedVal = cur();
     }
 
@@ -174,4 +156,84 @@
 }
 
+/**********************************************************************/
+// METHOD: addPreset()
+/// Add a preset / suggessted value to the object
+/**
+ * Add a preset value to the object. Currently all
+ * labels must be unique.
+ */
+
+Number&
+Number::addPreset(
+    const char *label,
+    const char *desc,
+    double val,
+    const char *units)
+{
+    preset *p = NULL;
+
+    p = new preset;
+    if (!p) {
+        // raise error and exit
+    }
+
+    p->label(label);
+    p->desc(desc);
+    p->val(val);
+    p->units(units);
+
+    if (_presets == NULL) {
+        _presets = Rp_ChainCreate();
+        if (_presets == NULL) {
+            // raise error and exit
+        }
+    }
+
+    Rp_ChainAppend(_presets,p);
+
+    return *this;
+}
+
+/**********************************************************************/
+// METHOD: delPreset()
+/// Delete a preset / suggessted value from the object
+/**
+ * Delete a preset value from the object.
+ */
+
+Number&
+Number::delPreset(const char *label)
+{
+    if (label == NULL) {
+        return *this;
+    }
+
+    if (_presets == NULL) {
+        return *this;
+    }
+
+    preset *p = NULL;
+    const char *plabel = NULL;
+    Rp_ChainLink *l = NULL;
+
+    // traverse the list looking for the matching preset
+    l = Rp_ChainFirstLink(_presets);
+    while (l != NULL) {
+        p = (preset *) Rp_ChainGetValue(l);
+        plabel = p->label();
+        if ((*label == *plabel) && (strcmp(plabel,label) == 0)) {
+            // we found matching entry, remove it
+            if (p) {
+                delete p;
+                Rp_ChainDeleteLink(_presets,l);
+            }
+            break;
+        }
+    }
+
+
+    return *this;
+}
+
 // -------------------------------------------------------------------- //
 
Index: trunk/src/objects/RpNumber.h
===================================================================
--- trunk/src/objects/RpNumber.h	(revision 1270)
+++ trunk/src/objects/RpNumber.h	(revision 1386)
@@ -9,22 +9,22 @@
  */
 #include <errno.h>
+#include "RpVariable.h"
+#include "RpChain.h"
 
-#ifndef _RpVARIABLE_H
-    #include "RpVariable.h"
-#endif
+#ifndef RAPPTURE_NUMBER_H
+#define RAPPTURE_NUMBER_H
 
-#ifndef _RpNUMBER_H
-#define _RpNUMBER_H
+namespace Rappture {
 
-class RpNumber : public RpVariable
+class Number : public Variable
 {
     public:
 
-        RpNumber (  const char *path,
-                    const char *unit,
+        Number  (  const char *path,
+                    const char *units,
                     double val);
 
-        RpNumber (  const char *path,
-                    const char *unit,
+        Number  (  const char *path,
+                    const char *units,
                     double val,
                     double min,
@@ -33,25 +33,40 @@
                     const char *desc);
 
-        RpNumber ( const RpNumber& o );
-        virtual ~RpNumber ();
+        Number  ( const Number& o );
+        virtual ~Number ();
 
-        virtual const double defaultValue    (double val);
-        virtual const double currentValue    (double val);
-        virtual const double min             (double val);
-        virtual const double max             (double val);
-        virtual const char *units            (const char *val);
+        Accessor<double> def;
+        Accessor<double> cur;
+        Accessor<double> min;
+        Accessor<double> max;
+        Accessor<const char *> units;
+
         // need to add a way to tell user conversion failed
-        virtual double convert               (const char *to);
+        virtual double convert (const char *to);
+
+        Number& addPreset(  const char *label,
+                            const char *desc,
+                            double val,
+                            const char *units   );
+
+        Number& delPreset(const char *label);
 
     private:
 
-        double _default;
-        double _current;
-        double _min;
-        double _max;
-
         // flag tells if user specified min and max values
         int _minmaxSet;
+
+        // hash or linked list of preset values
+        Rp_Chain *_presets;
+
+        struct preset{
+            Accessor<const char *> label;
+            Accessor<const char *> desc;
+            Accessor<double> val;
+            Accessor<const char *> units;
+        };
 };
+
+} // namespace Rappture
 
 /*--------------------------------------------------------------------------*/
Index: trunk/src/objects/RpOption.cc
===================================================================
--- trunk/src/objects/RpOption.cc	(revision 1270)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/*
- * ----------------------------------------------------------------------
- *  Rappture 2.0 Option Object Source
- *
- * ======================================================================
- *  AUTHOR:  Derrick Kearney, Purdue University
- *  Copyright (c) 2004-2005  Purdue Research Foundation
- *
- *  See the file "license.terms" for information on usage and
- *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- * ======================================================================
- */
-
-#include "RpOption.h"
-
-/**********************************************************************/
-// METHOD: setLabel()
-/// Set the label of this object.
-/**
- */
-
-RpOption&
-RpOption::setLabel(std::string newLabel)
-{
-    about.setLabel(newLabel);
-    return *this; 
-}
-
-
-/**********************************************************************/
-// METHOD: getLabel()
-/// Report the label of this object.
-/**
- */
-
-std::string 
-RpOption::getLabel() const
-{
-    return about.getLabel(); 
-}
-
-// -------------------------------------------------------------------- //
-
Index: trunk/src/objects/RpOption.h
===================================================================
--- trunk/src/objects/RpOption.h	(revision 1270)
+++ 	(revision )
@@ -1,64 +1,0 @@
-/*
- * ======================================================================
- *  Copyright (c) 2004-2005  Purdue Research Foundation
- *
- *  See the file "license.terms" for information on usage and
- *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- * ======================================================================
- */
-#include <iostream>
-#include <string>
-#include <sstream>
-#include <stdlib.h>
-#include <errno.h>
-
-// #include "RpLibrary.h"
-
-#ifndef _RpABOUT_H
-    #include "RpAbout.h"
-#endif
-
-#ifndef _RpOPTION_H 
-#define _RpOPTION_H
-
-class RpOption
-{
-    public:
-        
-        // users member fxns
-
-        virtual RpOption& setLabel       (std::string newLabel);
-        virtual std::string getLabel    () const;
-
-        /*
-        RpOption ()
-            :   about       (RpAbout())
-        {};
-        */
-
-        RpOption (
-                    std::string label
-                )
-            :   about       (RpAbout(label))
-        {};
-        
-        // copy constructor
-        RpOption ( const RpOption& myRpOption ) 
-            :   about       (RpAbout(myRpOption.about))
-        {}
-
-        // default destructor
-        virtual ~RpOption ()
-        {
-            // clean up dynamic memory
-        }
-
-    private:
-
-        RpAbout about;
-};
-
-/*--------------------------------------------------------------------------*/
-/*--------------------------------------------------------------------------*/
-
-#endif
Index: trunk/src/objects/RpPlot.cc
===================================================================
--- trunk/src/objects/RpPlot.cc	(revision 1386)
+++ trunk/src/objects/RpPlot.cc	(revision 1386)
@@ -0,0 +1,193 @@
+/*
+ * ----------------------------------------------------------------------
+ *  Rappture 2.0 Plot Object Source
+ *
+ * ======================================================================
+ *  AUTHOR:  Derrick Kearney, Purdue University
+ *  Copyright (c) 2005-2009  Purdue Research Foundation
+ *
+ *  See the file "license.terms" for information on usage and
+ *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ * ======================================================================
+ */
+
+#include "RpPlot.h"
+
+using namespace Rappture;
+
+const char Plot::format[] = "RAPPTURE::PLOT::FORMAT";
+const char Plot::id[]     = "RAPPTURE::PLOT::ID";
+const char Plot::xaxis[]  = "RAPPTURE::PLOT::XAXIS";
+const char Plot::yaxis[]  = "RAPPTURE::PLOT::YAXIS";
+
+Plot::Plot ()
+    :   Variable    (),
+        _curveList  (NULL)
+{
+    // this->path(autopath());
+    this->path("");
+    this->label("");
+    this->desc("");
+}
+
+// copy constructor
+Plot::Plot ( const Plot& o )
+    :   Variable(o)
+{
+    _curveList = Rp_ChainCreate();
+    Rp_ChainCopy(this->_curveList,o._curveList,&__curveCopyFxn);
+    // need to copy _curveList
+}
+
+// default destructor
+Plot::~Plot ()
+{
+    // remove the properties plot put in each curve
+    // unallocate _curveList
+
+    Rp_ChainLink *l = Rp_ChainFirstLink(_curveList);
+    while (l != NULL) {
+        char *str = NULL;
+        Curve * c = (Curve *) Rp_ChainGetValue(l);
+
+        str = (char *) c->propremove(Plot::format);
+        delete str;
+
+        str = (char *) c->propremove(Plot::id);
+        delete str;
+
+        delete c;
+        c = NULL;
+        l = Rp_ChainNextLink(l);
+    }
+
+    Rp_ChainDestroy(_curveList);
+}
+
+/**********************************************************************/
+// METHOD: add()
+/// Add an xy curve to the object
+/**
+ * Add an xy curve to the object.
+ * returns curve id
+ */
+
+Plot&
+Plot::add(
+    size_t nPts,
+    double *x,
+    double *y,
+    const char *fmt,
+    const char *name)
+{
+    // Curve *c = Curve(autopath(),"","",__group());
+    Curve *c = new Curve("","","","");
+
+    if (c == NULL) {
+       // raise memory error and exit
+       return *this;
+    }
+
+    // can't use "xaxis" kinda strings here have to allocate it forreal
+    c->axis(xaxis,"xdesc","xunits","xcale",x,nPts);
+    c->axis(yaxis,"ydesc","yunits","ycale",y,nPts);
+    c->propstr(format,fmt);
+    c->propstr(id,name);
+
+    if (_curveList == NULL) {
+        _curveList = Rp_ChainCreate();
+        if (_curveList == NULL) {
+            // raise error and exit
+        }
+    }
+
+    Rp_ChainAppend(_curveList,c);
+
+    return *this;
+}
+
+
+/**********************************************************************/
+// METHOD: count()
+/// return number of curves in this object
+/**
+ * count of the number of curves contained in this object
+ * returns curve count
+ */
+
+size_t
+Plot::count() const
+{
+    // return (size_t) Rp_ChainGetLength(_curveList);
+    return Rp_ChainGetLength(_curveList);
+}
+
+/**********************************************************************/
+// METHOD: curve()
+/// Retrieve an xy curve from the object
+/**
+ * Get a named xy curve.
+ * returns pointer to Rappture::Curve
+ */
+
+Curve *
+Plot::curve(
+    const char *name) const
+{
+    Curve *c = NULL;
+    Rp_ChainLink *l = NULL;
+
+    l = __searchCurveList(name);
+    if (l != NULL) {
+        c = (Curve *) Rp_ChainGetValue(l);
+    }
+    return c;
+}
+
+Rp_ChainLink *
+Plot::__searchCurveList(const char *name) const
+{
+    if (name == NULL) {
+        return NULL;
+    }
+
+    if (_curveList == NULL) {
+        return NULL;
+    }
+
+    Rp_ChainLink *l = NULL;
+    Rp_ChainLink *retval = NULL;
+
+    // traverse the list looking for the match
+    l = Rp_ChainFirstLink(_curveList);
+    while (l != NULL) {
+        Curve *c = (Curve *) Rp_ChainGetValue(l);
+        const char *cname = (const char *) c->property(id,NULL);
+        if (cname != NULL) {
+            if((*cname == *name) && (strcmp(cname,name) == 0)) {
+                // we found matching entry, return it
+                retval = l;
+                break;
+            }
+        }
+        l = Rp_ChainNextLink(l);
+    }
+
+    return retval;
+}
+
+int
+Plot::__curveCopyFxn(void **to, void *from)
+{
+    if (from == NULL) {
+        // return error, improper function call
+        return -1;
+    }
+
+    Curve *c = new Curve(*((Curve *)from));
+    *to = (void *) c;
+
+    return 0;
+}
+
+// -------------------------------------------------------------------- //
Index: trunk/src/objects/RpPlot.h
===================================================================
--- trunk/src/objects/RpPlot.h	(revision 1386)
+++ trunk/src/objects/RpPlot.h	(revision 1386)
@@ -0,0 +1,57 @@
+/*
+ * ======================================================================
+ *  AUTHOR:  Derrick Kearney, Purdue University
+ *  Copyright (c) 2005-2009  Purdue Research Foundation
+ *
+ *  See the file "license.terms" for information on usage and
+ *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ * ======================================================================
+ */
+#include <errno.h>
+#include "RpVariable.h"
+#include "RpChainHelper.h"
+#include "RpCurve.h"
+
+#ifndef RAPPTURE_PLOT_H
+#define RAPPTURE_PLOT_H
+
+namespace Rappture {
+
+class Plot : public Variable
+{
+    public:
+
+        Plot ();
+
+        Plot ( const Plot& o );
+        virtual ~Plot ();
+
+        Plot& add ( size_t nPts,
+                    double *x,
+                    double *y,
+                    const char *fmt,
+                    const char *name);
+
+        // count the number of curves in the object
+        size_t count() const;
+
+        // retrieve a curve from the object
+        Curve *curve (const char* name) const;
+
+        static const char format[];
+        static const char id[];
+        static const char xaxis[];
+        static const char yaxis[];
+
+    private:
+
+        // hash or linked list of preset values
+        Rp_Chain *_curveList;
+
+        Rp_ChainLink *__searchCurveList(const char *name) const;
+        static int __curveCopyFxn(void **to, void *from);
+};
+
+} // namespace Rappture
+
+#endif // RAPPTURE_PLOT_H
Index: trunk/src/objects/RpString.cc
===================================================================
--- trunk/src/objects/RpString.cc	(revision 1270)
+++ trunk/src/objects/RpString.cc	(revision 1386)
@@ -5,5 +5,5 @@
  * ======================================================================
  *  AUTHOR:  Derrick Kearney, Purdue University
- *  Copyright (c) 2004-2005  Purdue Research Foundation
+ *  Copyright (c) 2005-2009  Purdue Research Foundation
  *
  *  See the file "license.terms" for information on usage and
@@ -14,161 +14,58 @@
 #include "RpString.h"
 
-/**********************************************************************/
-// METHOD: setDefaultValue()
-/// set the default value of this object.
-/**
- */
+using namespace Rappture;
 
-RpString& 
-RpString::setDefaultValue(std::string newDefaultVal)
+String::String (
+            const char *path,
+            const char *val
+        )
+    :   Variable    ()
 {
-    std::string* def = NULL;
-    
-    def = (std::string*) RpVariable::getDefaultValue(); 
-
-    if (!def) {
-        RpVariable::setDefaultValue(new std::string (newDefaultVal));
-    }
-    else {
-        *def = newDefaultVal;
-    }
-
-    return *this;
+    this->path(path);
+    this->label("");
+    this->desc("");
+    this->hints("");
+    this->def(val);
+    this->cur(val);
+    this->width(0);
+    this->height(0);
 }
 
-/**********************************************************************/
-// METHOD: setCurrentValue()
-/// set the current value of this object
-/**
- */
-
-RpString& 
-RpString::setCurrentValue(std::string newCurrentVal)
+String::String (
+            const char *path,
+            const char *val,
+            const char *label,
+            const char *desc,
+            const char *hints,
+            size_t width,
+            size_t height
+        )
+    :   Variable    ()
 {
-    std::string* cur = (std::string*) RpVariable::getCurrentValue();
-    std::string* def = (std::string*) RpVariable::getDefaultValue();
-
-    if (cur == def) {
-        RpVariable::setCurrentValue(new std::string (newCurrentVal));
-    }
-    else {
-        *cur = newCurrentVal;
-    }
-
-    return *this;
+    this->path(path);
+    this->label(label);
+    this->desc(desc);
+    this->hints(hints);
+    this->def(val);
+    this->cur(val);
+    this->width(width);
+    this->height(height);
 }
 
-/**********************************************************************/
-// METHOD: setSize()
-/// set the size (width and height) of this object.
-/**
- */
-
-RpString& 
-RpString::setSize(std::string sizeWxH)
+// copy constructor
+String::String ( const String& o )
+    :   Variable(o)
 {
-    unsigned int xloc = sizeWxH.find("x");
-
-    if (xloc == std::string::npos) {
-        // sizeWxH is of incorrect format
-        // raise error!
-
-    }
-    else {           
-        this->width = atoi(sizeWxH.substr(0,xloc).c_str());
-        this->height = atoi(sizeWxH.substr(xloc).c_str());
-    }
-
-    return *this;
+    this->hints(o.hints());
+    this->def(o.def());
+    this->cur(o.cur());
+    this->width(o.width());
+    this->height(o.height());
 }
 
-/**********************************************************************/
-// METHOD: setWidth()
-/// set the width of this object
-/**
- */
-
-RpString& 
-RpString::setWidth(int newWidth)
+// default destructor
+String::~String ()
 {
-    this->width = newWidth;
-    return *this;
-}
-
-/**********************************************************************/
-// METHOD: setHeight()
-/// set the height of this object.
-/**
- */
-
-RpString& 
-RpString::setHeight(int newHeight)
-{
-    this->height = newHeight;
-    return *this;
-}
-
-
-/**********************************************************************/
-// METHOD: getDefaultValue()
-/// report the default value of this object.
-/**
- */
-
-std::string
-RpString::getDefaultValue(void* null_val) const
-{
-    return *((std::string*) RpVariable::getDefaultValue()); 
-}
-
-/**********************************************************************/
-// METHOD: getCurrentValue()
-/// report the current value of this object.
-/**
- */
-
-std::string
-RpString::getCurrentValue(void* null_val) const
-{
-    return *((std::string*) RpVariable::getCurrentValue()); 
-}
-
-/**********************************************************************/
-// METHOD: getSize()
-/// report the size of this object  in the form  Height x Width
-/**
- */
-
-std::string
-RpString::getSize() const
-{
-    std::stringstream tmpStr;
-
-    tmpStr << getWidth() << "x" << getHeight();
-    return (tmpStr.str()); 
-}
-
-/**********************************************************************/
-// METHOD: getHeight()
-/// report the Height of this object.
-/**
- */
-
-int
-RpString::getHeight() const
-{
-    return height; 
-}
-
-/**********************************************************************/
-// METHOD: getWidth()
-/// report the Width of this object.
-/**
- */
-
-int
-RpString::getWidth() const
-{
-    return width; 
+    // clean up dynamic memory
 }
 
Index: trunk/src/objects/RpString.h
===================================================================
--- trunk/src/objects/RpString.h	(revision 1270)
+++ trunk/src/objects/RpString.h	(revision 1386)
@@ -1,6 +1,6 @@
 /*
  * ======================================================================
- *  AUTHOR: Derrick S. Kearney, Purdue University
- *  Copyright (c) 2004-2005  Purdue Research Foundation
+ *  AUTHOR:  Derrick Kearney, Purdue University
+ *  Copyright (c) 2005-2009  Purdue Research Foundation
  *
  *  See the file "license.terms" for information on usage and
@@ -8,108 +8,44 @@
  * ======================================================================
  */
-#include <iostream>
-#include <string>
-#include <sstream>
-#include <stdlib.h>
 #include <errno.h>
+#include "RpVariable.h"
 
+#ifndef RAPPTURE_STRING_H
+#define RAPPTURE_STRING_H
 
-// #include "RpLibrary.h"
+namespace Rappture {
 
-#ifndef _RpVARIABLE_H
-    #include "RpVariable.h"
-#endif
+class String : public Variable
+{
+public:
 
-#ifndef _RpSTRING_H 
-#define _RpSTRING_H
+    String  ( const char *path,
+              const char *val);
 
-class RpString : public RpVariable
-{
-    public:
-        
-        // users member fxns
+    String  ( const char *path,
+              const char *val,
+              const char *label,
+              const char *desc,
+              const char *hints,
+              size_t width,
+              size_t height);
 
-        virtual RpString& setDefaultValue   (std::string newDefaultVal);
-        virtual RpString& setCurrentValue   (std::string newCurrentVal);
-        virtual RpString& setSize           (std::string newSize);
-        virtual RpString& setHeight         (int newHeight);
-        virtual RpString& setWidth          (int newWidth);
+    String  ( const String& o );
+    virtual ~String ();
 
-        // base class makes 
-        // these functions virtual and derived class has a different
-        // return type. compiler doesnt like this. need to find another
-        // way around this
-        //
-        // if we keep the null_val=NULL will that give us undefined behavior?
-        //
-        std::string getDefaultValue         (void* null_val=NULL) const;
-        std::string getCurrentValue         (void* null_val=NULL) const;
-        std::string getSize                 () const;
-        int         getHeight               () const;
-        int         getWidth                () const;
+    Accessor<const char *> hints;
+    Accessor<const char *> def;
+    Accessor<const char *> cur;
+    Accessor<size_t> width;
+    Accessor<size_t> height;
 
-        // place the information from this object into the xml library 'lib'
-        // virtual RpString& put(RpLibrary lib);
-        // RpString& put() const;
-
-        RpString (
-                    std::string path, 
-                    std::string defaultVal
-                )
-            :   RpVariable  (path, new std::string (defaultVal) ),
-                width       (0),
-                height      (0)
-        {}
-
-        RpString (
-                    std::string path, 
-                    std::string defaultVal,
-                    std::string sizeWxH
-                )
-            :   RpVariable  (path, new std::string (defaultVal) ),
-                width       (0),
-                height      (0)
-        {
-            setSize(sizeWxH);
-        }
-
-        RpString (
-                    std::string path, 
-                    std::string defaultVal,
-                    std::string sizeWxH,
-                    std::string label,
-                    std::string desc
-                )
-            :   RpVariable  (path, new std::string (defaultVal), label, desc),
-                width       (0),
-                height      (0)
-        {
-            setSize(sizeWxH);
-        }
-
-        // copy constructor
-        RpString ( const RpString& myRpString )
-            :   RpVariable(myRpString),
-                width       (myRpString.width),
-                height      (myRpString.height)
-        {}
-
-        // default destructor
-        virtual ~RpString ()
-        {
-            // clean up dynamic memory
-        }
-
-    private:
-        int width;
-        int height;
-        std::string hints;
-
-
+private:
 
 };
+
+} // namespace Rappture
 
 /*--------------------------------------------------------------------------*/
 /*--------------------------------------------------------------------------*/
 
-#endif
+#endif // RAPPTURE_STRING_H
Index: trunk/src/objects/RpUtils2.c
===================================================================
--- trunk/src/objects/RpUtils2.c	(revision 1270)
+++ trunk/src/objects/RpUtils2.c	(revision 1386)
@@ -1,3 +1,4 @@
 #include <stdio.h>
+#include <stdlib.h>
 #include <stdarg.h>
 
Index: trunk/src/objects/RpVariable.cc
===================================================================
--- trunk/src/objects/RpVariable.cc	(revision 1270)
+++ trunk/src/objects/RpVariable.cc	(revision 1386)
@@ -14,18 +14,37 @@
  */
 
-#include <cstring>
-#include <stdlib.h>
 #include "RpVariable.h"
 #include "RpHashHelper.h"
 
-RpVariable::RpVariable()
+using namespace Rappture;
+
+Variable::Variable()
 {
     __init();
 }
 
-RpVariable::RpVariable(const RpVariable& o)
-    :
-        _path (o._path)
+Variable::Variable (
+    const char *path,
+    const char *label,
+    const char *desc,
+    const char *hints,
+    const char *color   )
 {
+    this->path(path);
+    this->label(label);
+    this->desc(desc);
+    this->hints(hints);
+    this->color(color);
+}
+
+Variable::Variable(const Variable& o)
+{
+    path(o.path());
+    label(o.label());
+    desc(o.desc());
+    hints(o.hints());
+    color(o.color());
+    icon(o.icon());
+
     if (o._h != NULL) {
         Rp_HashCopy(_h,o._h,charCpyFxn);
@@ -33,53 +52,11 @@
 }
 
-RpVariable::~RpVariable()
+Variable::~Variable()
 {
-    __close();
-}
-
-const char *
-RpVariable::label(
-    const char *val)
-{
-    return (const char *) property("label",val);
-}
-
-const char *
-RpVariable::desc(
-    const char *val)
-{
-    return (const char *) property("desc",val);
-}
-
-const char *
-RpVariable::hints(
-    const char *val)
-{
-    return (const char *) property("hints",val);
-}
-
-const char *
-RpVariable::color(
-    const char *val)
-{
-    return (const char *) property("color",val);
-}
-
-const char *
-RpVariable::icon(
-    const char *val)
-{
-    return (const char *) property("icon",val);
-}
-
-const char *
-RpVariable::path(
-    const char *val)
-{
-    return (const char *) property("path",val);
+    __clear();
 }
 
 const void *
-RpVariable::property(
+Variable::property(
     const char *key,
     const void *val)
@@ -90,5 +67,4 @@
         _h = (Rp_HashTable*) malloc(sizeof(Rp_HashTable));
         Rp_InitHashTable(_h,RP_STRING_KEYS);
-        return NULL;
     }
 
@@ -97,5 +73,5 @@
         r = Rp_HashSearchNode(_h,key);
     } else {
-        //set the value
+        // set the value
         Rp_HashRemoveNode(_h,key);
         Rp_HashAddNode(_h,key,val);
@@ -106,17 +82,67 @@
 }
 
-void
-RpVariable::__init()
+const char *
+Variable::propstr(
+    const char *key,
+    const char *val)
 {
-    _path = NULL;
-    _h = NULL;
+    const char *r = NULL;
+    char *str = NULL;
+    if (_h == NULL) {
+        // hash table does not exist, create it
+        _h = (Rp_HashTable*) malloc(sizeof(Rp_HashTable));
+        Rp_InitHashTable(_h,RP_STRING_KEYS);
+    }
+
+    if (val == NULL) {
+        // get the value
+        r = (const char *) Rp_HashSearchNode(_h,key);
+    } else {
+        // set the value
+        //FIXME: users responsibility to free value with propremove()
+        size_t l = strlen(val);
+        str = new char[l+1];
+        strcpy(str,val);
+
+        // FIXME: possible memory leak here
+        // we dont free the removed item,
+        // it is user's responsibility to use propremove() to free it
+        // we don't know whether to use delete or delete[].
+        Rp_HashRemoveNode(_h,key);
+        Rp_HashAddNode(_h,key,str);
+        r = val;
+    }
+
+    return r;
+}
+
+void *
+Variable::propremove(
+    const char *key)
+{
+    if ((key == NULL) || (_h == NULL)) {
+        // key or hash table does not exist
+        return NULL;
+    }
+
+    return Rp_HashRemoveNode(_h,key);
 }
 
 void
-RpVariable::__close()
+Variable::__init()
 {
-    if (_path != NULL) {
-        free((void *)_path);
-    }
+    _h = NULL;
+    label("");
+    desc("");
+    hints("");
+    color("");
+    // icon(NULL);
+    path("");
+}
+
+void
+Variable::__clear()
+{
+    // who frees the Accessors?
 
     if (_h != NULL) {
Index: trunk/src/objects/RpVariable.h
===================================================================
--- trunk/src/objects/RpVariable.h	(revision 1270)
+++ trunk/src/objects/RpVariable.h	(revision 1386)
@@ -9,29 +9,41 @@
  */
 
-#ifndef _RpVARIABLE_H
-#define _RpVARIABLE_H
+#ifndef RAPPTURE_VARIABLE_H
+#define RAPPTURE_VARIABLE_H
 
 #include "RpInt.h"
 #include "RpHash.h"
+#include "RpAccessor.h"
+#include "RpBuffer.h"
 
-class RpVariable
+namespace Rappture {
+
+class Variable
 {
     public:
-        RpVariable ();
-        RpVariable (const RpVariable& o);
-        virtual ~RpVariable();
+        Variable ();
+        Variable (  const char *path,
+                    const char *label,
+                    const char *desc,
+                    const char *hints,
+                    const char *color   );
+        Variable (const Variable& o);
+        virtual ~Variable();
 
-        virtual const char *label           (const char *val);
-        virtual const char *desc            (const char *val);
-        virtual const char *hints           (const char *val);
-        virtual const char *color           (const char *val);
-        virtual const char *icon            (const char *val);
-        virtual const char *path            (const char *val);
-        virtual const void *property        (const char *key, const void *val);
+        Accessor<const char *> path;
+        Accessor<const char *> label;
+        Accessor<const char *> desc;
+        Accessor<const char *> hints;
+        Accessor<const char *> color;
+        Accessor<Buffer> icon;
+
+        // these functions are not completely improper use proof
+        // user is responsible for calling propremove() on any item
+        // they put into the hash table.
+        const void *property (const char *key, const void *val);
+        const char *propstr (const char *key, const char *val);
+        void *propremove (const char *key);
 
     private:
-
-        /// path of the object in the xml tree and key in hash tables
-        const char *_path;
 
         /// hash table holding other object properties
@@ -42,6 +54,8 @@
 
         /// close out the object, freeing its memory
-        void __close();
+        void __clear();
 };
+
+} // RAPPTURE_VARIABLE_H
 
 /*--------------------------------------------------------------------------*/
