- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions

# AssociationsSerializer Class Reference

Search for all occurrences

## Detailed Description

Class handling the definition of the format for serialization of adsk::Data::Associations.

The adsk::Data::Associations class manages Associations definitions. They are persisted using a serialization format implemented through the adsk::Data::AssociationsSerializer hierarchy. The base class defines the interface and manages the list of available Associations serialization formats.

`#include <adskDataAssociationsSerializer.h>`

List of all members.

## Public Member Functions
| AssociationsSerializer ()
| Default constructor, does nothing.
virtual | ~AssociationsSerializer ()
| Default destructor, does nothing.
virtual Associations * | read (std::istream &cSrc, std::string &errors) const =0
| Implement this to parse the serialized form of an adsk::Data::Associations object.
virtual int | write (const Associations &dataToWrite, std::ostream &cDst, std::string &errors) const =0
| Implement this to output the adsk::Data::Associations definition in your serialization format.
virtual void | getFormatDescription (std::ostream &info) const =0
| Implement this to provide a description of your adsk::Data::Associations serialization format.

## Member Function Documentation

Associations * read | ( | std::istream & | cSrc,
|  | std::string & | errors
| ) |  | const`[pure virtual]`

Search for all occurrences

Implement this to parse the serialized form of an adsk::Data::Associations object.

Given an input stream containing your serialization of an adsk::Data::Associations object parse the data and create the adsk::Data::Associations object it describes.

If there are any problems the detailed error information should be returned in the errors string.

The adsk::Data::Associations parsing should also recursively populate any adsk::Data::Channels and adsk::Data::Streams within the adsk::Data::Associations.

This method should be capable of understanding any data your adsk::Data::AssociationsSerializer::write() method can provide.

Parameters:

  [in] | cSrc | Input stream containing serialization of the adsk::Data::Associations object
  [out] | errors | String containing description of parse errors

Returns:
  Pointer to the newly created adsk::Data::Associations object

int write | ( | const Associations & | dataToWrite,
|  | std::ostream & | cDst,
|  | std::string & | errors
| ) |  | const`[pure virtual]`

Search for all occurrences

Implement this to output the adsk::Data::Associations definition in your serialization format.

Given an adsk::Data::Associations object and an output stream as destination write out enough information so that you can recreate the adsk::Data::Associations from data in the output stream using your adsk::Data::AssociationsSerializer::read() method.

This recursively includes all adsk::Data::Channels used by the adsk::Data::Associations, adsk::Data::Streams within those adsk::Data::Channels, and data within the adsk::Data::Streams.

Parameters:

  [in] | dataToWrite | adsk::Data::Associations to be serialized
  [out] | cDst | Output stream to which the object is to be serialized
  [out] | errors | String containing description of output errors

Returns:
  number of errors found during write (0 means success)

void getFormatDescription | ( | std::ostream & | info | ) | const`[pure virtual]`

Search for all occurrences

Implement this to provide a description of your adsk::Data::Associations serialization format.

Output a textual description of your serialization format into the given stream.

Parameters:

  [out] | info | Output stream to receive your serialization format description

AssociationsSerializer AssociationsSerializer AssociationsSerializer AssociationsSerializer AssociationsSerializer AssociationsSerializer AssociationsSerializer AssociationsSerializer AssociationsSerializer AssociationsSerializer
AssociationsSerializer AssociationsSerializer AssociationsSerializer AssociationsSerializer AssociationsSerializer AssociationsSerializer AssociationsSerializer AssociationsSerializer AssociationsSerializer AssociationsSerializer