[gxml/gxml-0-4] Added SerializableObjectModel class help.



commit 81895bfb12694d85d948c1068e9345b0b02832e4
Author: Daniel Espinosa <esodan gmail com>
Date:   Mon Sep 22 17:00:24 2014 -0500

    Added SerializableObjectModel class help.

 configure.ac                                      |    2 +-
 docs/mallard/C/Makefile.am                        |    3 ++-
 docs/mallard/C/gxml-serializable-objectmodel.page |   19 +++++++++++++++++++
 docs/mallard/C/gxml-serializable.page             |   15 +++++++++++++++
 docs/mallard/Makefile.am                          |    4 +++-
 5 files changed, 40 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 85c2c30..66fd080 100644
--- a/configure.ac
+++ b/configure.ac
@@ -245,6 +245,6 @@ echo ""
 echo " Configuration summary for GXml-$GXML_VERSION"
 echo "   Installation prefix:   $prefix"
 echo "   GObject Introspection: $found_introspection"
-echo "   Vala Documentation:    ${have_valadoc}"
+echo "   Documentation:         ${enable_docs}"
 echo "   Platform:              $host"
 echo ""
diff --git a/docs/mallard/C/Makefile.am b/docs/mallard/C/Makefile.am
index 3682538..00928c2 100644
--- a/docs/mallard/C/Makefile.am
+++ b/docs/mallard/C/Makefile.am
@@ -1,7 +1,8 @@
 
 sources = \
        index.page \
-       gxml-serializable.page
+       gxml-serializable.page \
+       gxml-serializable-objectmodel.page
 
 JS_FILES= \
        C.css \
diff --git a/docs/mallard/C/gxml-serializable-objectmodel.page 
b/docs/mallard/C/gxml-serializable-objectmodel.page
new file mode 100644
index 0000000..c227d12
--- /dev/null
+++ b/docs/mallard/C/gxml-serializable-objectmodel.page
@@ -0,0 +1,19 @@
+<page xmlns="http://projectmallard.org/1.0/";
+        type="topic" id="gxml-serializable-objectmodel">
+
+  <info>
+    <revision pkgversion="0.4" version="0.1" date="2014-09-18" status="incomplete" />
+    <credit type="author">
+      <name>Daniel Espinosa</name>
+      <email>esodan gmail com</email>
+    </credit>
+    <license>
+      <p>Creative Commons Share Alike 3.0</p>
+    </license>
+    <link type="topic" xref="index" >Home</link>
+  </info>
+
+  <title>SerializableObjectModel implementation</title>
+  <p><code>SerializableObjectModel</code> is a class implementing <code>Serializable</code> interface. This 
implementation consider each object as a XML node, represented in GXml as a <code>GXml.Element</code> and its 
properties is represented by <code>GXml.Attr</code>. Each property, if it is a <code>Serializable</code> 
object, is represented as child nodes.</p>
+  <p>If a object's value property must be represented as a XML node content, then it requires to override 
<code>serialize_use_xml_node_value()</code> and set value at <code>serialized_xml_node_value</code>, as 
decribed at <link type="topic" xref="gxml-serializable#gxml-serializable-node-contents">Node 
content</link>.</p>
+</page>
diff --git a/docs/mallard/C/gxml-serializable.page b/docs/mallard/C/gxml-serializable.page
index 30d94d5..6b9f32e 100644
--- a/docs/mallard/C/gxml-serializable.page
+++ b/docs/mallard/C/gxml-serializable.page
@@ -53,5 +53,20 @@
   <title>Deserialize</title>
   <p><code>Serializable</code> interface allows you to implement your own <code>deserialize()</code> method. 
Your implementation should take a <code>GXml.Node</code> and deserialize from it. Given 
<code>GXml.Node</code>, could be an <code>GXml.Element</code> or a <code>GXml.Document</code>, your 
implementaiton should take care about this and return XML nodes representing your class object.</p>
   <p>Your implementation could take <code>GXml.Element</code>'s name to detect the property to set up or 
detect the root element in a <code>GXml.Document</code> to use. Then you can iterate over all node's 
properties and set up your object properties; you can use <code>gvalue_to_string()</code> to transform most 
common value types from string to the required value's type.</p>
+  <section id="gxml-serializable-deserialize-supportedtypes">
+  <title>Supported types</title>
+  <p><code>Serializable</code> interface support a number of data types to convert from its string 
representation. These are supported types:</p>
+  <list>
+    <item><p>integers: int8, int64, uint, long, ulong, char, uchar</p></item>
+    <item><p>boolean</p></item>
+    <item><p>floats: float, double</p></item>
+    <item><p>enumerations</p></item>
+  </list>
+  <section id="gxml-serializable-deserialize-enums">
+  <p>Enumerations have a set of utility methods to better represent on serialisation/deserialization.</p>
+  <p>Enumerations could be converted to string using its definition on <code>GLib.EnumClass</code>, by 
taking its nick name directly or converting to its camel case representation.</p>
+  <p>Any enumeration value type in a <code>GLib.Object</code>'s property could be deserialized from its 
definition given on <code>GLib.EnumClass</code> (name and nick) or from its camel case representation.</p>
+  </section>
+  </section>
   </section>
 </page>
diff --git a/docs/mallard/Makefile.am b/docs/mallard/Makefile.am
index 5c42547..2083e04 100644
--- a/docs/mallard/Makefile.am
+++ b/docs/mallard/Makefile.am
@@ -1,7 +1,9 @@
+SUBDIRS=C
 
 sources = \
        index.page \
-       gxml-serializable.page
+       gxml-serializable.page \
+       gxml-serializable-objectmodel.page
 
 @YELP_HELP_RULES@
 HELP_ID=gxml


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]