Architecture
A closer look at GPDS' architecture.
Architecture Overview
Design
The following figure provides an overview of the overal architecture of GPDS.
Namespace
Everything is encapuslated in the namespace gpds
.
Classes
A user will typically interact with the following classes:
- serialize
- An abstract class which application classes need to inherit from in order to support (de)serialization through GPDS.
- container
- A class to represent an object to be (de)serialized.
- value
- A class to represent a single value to be (de)serialized. It allows storing various datatypes in a key/value fashion. A value may contain a container to allow for nesting.
- attribute
- A wrapper class to represent attributes. Attributes are key/value pairs of strings which are used to annotate a value or container.
- archiver
- An abstract class which provides interfaces to (de)serialize data to/from STL streams.
- archiver_xml
- An Archiver implementation to (de)serialize to/form XML files.
Terminology
value
vs. container
The value and container classes implement the core concept of GPDS's serialization design. Therefore, it's important to understand their difference and how to use them properly.
The following figure illustrates how these two classes are used to model a C++ object for the (de)serialization process:
![](resources/terminology_value_vs_container.png)