| 
    Safir SDK Core
    
   | 
 
Functions for serializing objects to binary and XML forms. More...
#include <Serialization.h>
Static Public Member Functions | |
| static const std::wstring | ToXml (const Dob::Typesystem::ObjectPtr object) | 
| Serialize an object to XML.  More... | |
| static Dob::Typesystem::ObjectPtr | ToObject (const std::wstring &xml) | 
| Deserialize an XML serialization.  More... | |
| static const std::wstring | ToXml (const BinarySerialization &bin) | 
| Convert a binary serialization to XML.  More... | |
| static const std::wstring | ToXml (const char *const blob) | 
| Convert a blob to XML.  More... | |
| static void | ToBinary (const Dob::Typesystem::ObjectPtr object, Dob::Typesystem::BinarySerialization &binary) | 
| Serialize an object to binary form.  More... | |
| static Dob::Typesystem::ObjectPtr | ToObject (const Dob::Typesystem::BinarySerialization &binary) | 
| Deserialize a binary serialization and create an object.  More... | |
Functions for serializing objects to binary and XML forms.
      
  | 
  static | 
Serialize an object to binary form.
The serialization is put into a variable of type BinarySerialization, which is of type std::vector<char>. If you need to get hold of a "raw" C-pointer to the data use &binary[0]. See Effective STL Item 16 for more info.
| [in] | object | - The object to serialize | 
| [out] | binary | - The destination of the serialization | 
| IllegalValueException | - There is something wrong with the object. | 
      
  | 
  static | 
Deserialize an XML serialization.
This method creates a new object from a given xml serialization. It uses the ObjectFactory to accomplish this.
| [in] | xml | - The xml to convert. | 
| IllegalValueException | If there is something wrong with the XML or if the type represented by the serialization isn't found in the ObjectFactory. | 
      
  | 
  static | 
Deserialize a binary serialization and create an object.
It uses the ObjectFactory to accomplish this. If you have a char * that you want to deserialize the easiest way is to pass it to the ObjectFactory instead.
| [in] | binary | - The binary serialization to deserialize. | 
| IllegalValueException | If the type represented by the serialization isn't found in the ObjectFactory. | 
      
  | 
  static | 
Serialize an object to XML.
| [in] | object | - The object to serialize | 
| IllegalValueException | - There is something wrong with the object. | 
      
  | 
  static | 
Convert a binary serialization to XML.
| [in] | bin | - the binary serialization to convert to xml. | 
      
  | 
  static | 
Convert a blob to XML.
| [in] | blob | - the blob to convert to xml. |