Use separate WireFormat class to handle encoding Name, Interest, etc.
diff --git a/ndn-cpp/Name.cpp b/ndn-cpp/Name.cpp
new file mode 100644
index 0000000..c66ecca
--- /dev/null
+++ b/ndn-cpp/Name.cpp
@@ -0,0 +1,14 @@
+/* 
+ * Author: Jeff Thompson
+ *
+ * BSD license, See the LICENSE file for more information.
+ */
+
+#include <stdexcept>
+#include "Name.hpp"
+
+using namespace std;
+
+namespace ndn {
+
+}
diff --git a/ndn-cpp/Name.hpp b/ndn-cpp/Name.hpp
new file mode 100644
index 0000000..7346df4
--- /dev/null
+++ b/ndn-cpp/Name.hpp
@@ -0,0 +1,41 @@
+/* 
+ * Author: Jeff Thompson
+ *
+ * BSD license, See the LICENSE file for more information.
+ */
+
+#ifndef NDN_NAME_HPP
+#define	NDN_NAME_HPP
+
+#include <vector>
+#include "common.h"
+#include "encoding/BinaryXMLWireFormat.hpp"
+
+namespace ndn {
+  
+class Name {
+public:
+  Name();
+  Name(const char *uri);
+  
+  void encode(std::vector<unsigned char> &output, WireFormat &wireFormat) {
+    wireFormat.encodeName(*this, output);
+  }
+  void encode(std::vector<unsigned char> &output) {
+    encode(output, BinaryXMLWireFormat::instance());
+  }
+  void decode(std::vector<unsigned char> &input, WireFormat &wireFormat) {
+    wireFormat.decodeName(*this, input);
+  }
+  void decode(std::vector<unsigned char> &input) {
+    decode(input, BinaryXMLWireFormat::instance());
+  }
+  
+private:
+  std::vector<std::vector<unsigned char> > components_;
+};  
+
+}
+
+#endif
+
diff --git a/ndn-cpp/encoding/BinaryXMLWireFormat.cpp b/ndn-cpp/encoding/BinaryXMLWireFormat.cpp
new file mode 100644
index 0000000..705af1e
--- /dev/null
+++ b/ndn-cpp/encoding/BinaryXMLWireFormat.cpp
@@ -0,0 +1,7 @@
+/* 
+ * Author: Jeff Thompson
+ *
+ * BSD license, See the LICENSE file for more information.
+ */
+
+#include "BinaryXMLWireFormat.hpp"
diff --git a/ndn-cpp/encoding/BinaryXMLWireFormat.hpp b/ndn-cpp/encoding/BinaryXMLWireFormat.hpp
new file mode 100644
index 0000000..f8cf1eb
--- /dev/null
+++ b/ndn-cpp/encoding/BinaryXMLWireFormat.hpp
@@ -0,0 +1,32 @@
+/* 
+ * Author: Jeff Thompson
+ *
+ * BSD license, See the LICENSE file for more information.
+ */
+
+
+#ifndef NDN_BINARYXMLWIREFORMAT_HPP
+#define	NDN_BINARYXMLWIREFORMAT_HPP
+
+#include "WireFormat.hpp"
+
+namespace ndn {
+
+class BinaryXMLWireFormat : public WireFormat {
+public:
+  virtual void encodeName(Name &name, std::vector<unsigned char> &output);
+  virtual void decodeName(Name &name, std::vector<unsigned char> &input);
+
+  virtual void encodeInterest(Interest &interest, std::vector<unsigned char> &output);
+  virtual void decodeInterest(Interest &interest, std::vector<unsigned char> &input);
+  
+  static BinaryXMLWireFormat &instance() { return instance_; }
+  
+private:
+  static BinaryXMLWireFormat instance_;
+};
+  
+}
+
+#endif
+
diff --git a/ndn-cpp/encoding/WireFormat.cpp b/ndn-cpp/encoding/WireFormat.cpp
new file mode 100644
index 0000000..a66abb0
--- /dev/null
+++ b/ndn-cpp/encoding/WireFormat.cpp
@@ -0,0 +1,32 @@
+/* 
+ * Author: Jeff Thompson
+ *
+ * BSD license, See the LICENSE file for more information.
+ */
+
+#include <stdexcept>
+#include "WireFormat.hpp"
+
+using namespace std;
+
+namespace ndn {
+  
+void WireFormat::encodeName(Name &name, vector<unsigned char> &output) 
+{
+  throw logic_error("unimplemented");
+}
+void WireFormat::decodeName(Name &name, vector<unsigned char> &input) 
+{
+  throw logic_error("unimplemented");
+}
+
+void WireFormat::encodeInterest(Interest &interest, vector<unsigned char> &output) 
+{
+  throw logic_error("unimplemented");
+}
+void WireFormat::decodeInterest(Interest &interest, vector<unsigned char> &input) 
+{
+  throw logic_error("unimplemented");
+}
+
+}
diff --git a/ndn-cpp/encoding/WireFormat.hpp b/ndn-cpp/encoding/WireFormat.hpp
new file mode 100644
index 0000000..2c90c1b
--- /dev/null
+++ b/ndn-cpp/encoding/WireFormat.hpp
@@ -0,0 +1,32 @@
+/* 
+ * Author: Jeff Thompson
+ *
+ * BSD license, See the LICENSE file for more information.
+ */
+
+
+#ifndef NDN_WIREFORMAT_HPP
+#define	NDN_WIREFORMAT_HPP
+
+#include <vector>
+
+namespace ndn {
+  
+class Name;
+class Interest;
+  
+class WireFormat {
+public:
+  virtual void encodeName(Name &name, std::vector<unsigned char> &output);
+  virtual void decodeName(Name &name, std::vector<unsigned char> &input);
+
+  virtual void encodeInterest(Interest &interest, std::vector<unsigned char> &output);
+  virtual void decodeInterest(Interest &interest, std::vector<unsigned char> &input);
+
+  // etc. for each type of object.
+};
+
+}
+
+#endif
+