Index: trunk/ippTools/src/Makefile.am
===================================================================
--- trunk/ippTools/src/Makefile.am	(revision 14485)
+++ trunk/ippTools/src/Makefile.am	(revision 14489)
@@ -26,4 +26,5 @@
 	pxcam.h \
 	pxconfig.h \
+	pxtree.h \
 	pxtools.h
 
@@ -59,4 +60,5 @@
 	pxregister.c \
 	pxchip.c \
+	pxtree.c \
 	pxcam.c
 
Index: trunk/ippTools/src/pxtree.c
===================================================================
--- trunk/ippTools/src/pxtree.c	(revision 14489)
+++ trunk/ippTools/src/pxtree.c	(revision 14489)
@@ -0,0 +1,58 @@
+/*
+ * pxio.c
+ *
+ * Copyright (C) 2007  Joshua Hoblitt
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; version 2 of the License.
+ *
+ * This program 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 General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * program; see the file COPYING. If not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifdef HAVB_CONFIG_H
+#include <config.h>
+#endif
+
+#include <pslib.h>
+
+#include "pxtools.h"
+#include "pxtree.h"
+
+static void pxNodeFree(pxNode *node)
+{
+    psFree(node->name);
+    psFree(node->parent);
+    psFree(node->children);
+}
+
+pxNode *pxNodeAlloc(const char *name, pxNode *parent)
+{
+    PS_ASSERT_PTR_NON_NULL(name, NULL);
+
+    pxNode *node = psAlloc(sizeof(pxNode));
+
+    node->name = psStringCopy(name);
+
+    // parent == NULL basically means that this is the root node
+    if (!parent) {
+        node->parent = NULL;
+    } else {
+        // add this node to it's parent's children list
+        psListAdd(parent->children, PS_LIST_TAIL, node);
+        node->parent = psMemIncrRefCounter(parent);
+    }
+
+    node->children = psListAlloc(NULL);
+
+    psMemSetDeallocator(node, (psFreeFunc) pxNodeFree);
+
+    return node;
+}
Index: trunk/ippTools/src/pxtree.h
===================================================================
--- trunk/ippTools/src/pxtree.h	(revision 14489)
+++ trunk/ippTools/src/pxtree.h	(revision 14489)
@@ -0,0 +1,43 @@
+/*
+ * pxtree.h
+ *
+ * Copyright (C) 2007  Joshua Hoblitt
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; version 2 of the License.
+ *
+ * This program 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 General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * program; see the file COPYING. If not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef PXTREE_H
+#define PXTREE_H 1
+
+#include <pslib.h>
+
+typedef struct pxNode {
+  char *name;
+  struct pxNode *parent;
+  psList  *children;
+} pxNode;
+
+pxNode *pxNodeAlloc(
+    const char *name,
+    pxNode  *parent
+) PS_ATTR_MALLOC;
+
+/*
+bool pxNodeAddChild(
+    pxNode  *parent,
+    pxNode  *child
+);
+*/
+
+#endif // PXTREE_H
