- * a string member called "id" and a list called "values". The name of the struct
- * should contain the registered name of the Attribute implementation.
- */
- virtual DDF marshall() const {
- DDF ddf(NULL);
- ddf.structure().addmember("id").string(m_id.c_str());
- return ddf;
- }
-
+ * a single list member named with the Attribute's "id". The name of the struct
+ * should contain the registered name of the Attribute implementation.
+ */
+ virtual DDF marshall() const;
+
+ /**
+ * Unmarshalls a remoted Attribute.
+ *
+ * @param in remoted Attribute data
+ * @return a resolved Attribute of the proper subclass
+ */
+ static Attribute* unmarshall(DDF& in);
+
+ /** A function that unmarshalls remoted data into the proper Attribute subclass. */
+ typedef Attribute* AttributeFactory(DDF& in);
+
+ /**
+ * Registers an AttributeFactory function for a given attribute "type".
+ *
+ * @param type string used at the root of remoted Attribute structures
+ * @param factory factory function
+ */
+ static void registerFactory(const char* type, AttributeFactory* factory);
+
+ /**
+ * Deregisters an AttributeFactory function for a given attribute "type".
+ *
+ * @param type string used at the root of remoted Attribute structures
+ */
+ static void deregisterFactory(const char* type);
+
+ /**
+ * Clears the map of factories.
+ */
+ static void deregisterFactories();
+