Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1823


Ignore:
Timestamp:
05/15/09 12:29:13 (16 years ago)
Author:
epitzer
Message:

Namespace refactoring: rename formatters & decomposers -> primitive and composite serializers. (#603)

Location:
trunk/sources
Files:
27 deleted
55 edited
28 copied
32 moved

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Constraints/3.3/AllSubOperatorsTypeConstraint.cs

    r1672 r1823  
    2727using System.Xml;
    2828using System.Diagnostics;
    29 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     29using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3030
    3131namespace HeuristicLab.Constraints {
  • trunk/sources/HeuristicLab.Constraints/3.3/AndConstraint.cs

    r1672 r1823  
    2626using HeuristicLab.Core;
    2727using HeuristicLab.Data;
    28 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     28using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2929
    3030namespace HeuristicLab.Constraints {
  • trunk/sources/HeuristicLab.Constraints/3.3/ConstraintBase.cs

    r1672 r1823  
    2525using System.Xml;
    2626using HeuristicLab.Core;
    27 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     27using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2828
    2929namespace HeuristicLab.Constraints {
  • trunk/sources/HeuristicLab.Constraints/3.3/DoubleBoundedConstraint.cs

    r1672 r1823  
    2727using HeuristicLab.Data;
    2828using System.Globalization;
    29 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     29using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3030
    3131namespace HeuristicLab.Constraints {
  • trunk/sources/HeuristicLab.Constraints/3.3/IntBoundedConstraint.cs

    r1672 r1823  
    2626using HeuristicLab.Core;
    2727using HeuristicLab.Data;
    28 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     28using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2929
    3030namespace HeuristicLab.Constraints {
  • trunk/sources/HeuristicLab.Constraints/3.3/IsIntegerConstraint.cs

    r1672 r1823  
    2525using HeuristicLab.Core;
    2626using HeuristicLab.Data;
    27 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     27using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2828
    2929namespace HeuristicLab.Constraints {
  • trunk/sources/HeuristicLab.Constraints/3.3/ItemTypeConstraint.cs

    r1672 r1823  
    2626using HeuristicLab.Core;
    2727using HeuristicLab.Data;
    28 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     28using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2929
    3030namespace HeuristicLab.Constraints {
  • trunk/sources/HeuristicLab.Constraints/3.3/NotConstraint.cs

    r1672 r1823  
    2626using HeuristicLab.Core;
    2727using HeuristicLab.Data;
    28 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     28using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2929
    3030namespace HeuristicLab.Constraints {
  • trunk/sources/HeuristicLab.Constraints/3.3/NumberOfSubOperatorsConstraint.cs

    r1672 r1823  
    2727using HeuristicLab.Data;
    2828using System.Xml;
    29 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     29using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3030
    3131namespace HeuristicLab.Constraints {
  • trunk/sources/HeuristicLab.Constraints/3.3/OrConstraint.cs

    r1672 r1823  
    2626using HeuristicLab.Core;
    2727using HeuristicLab.Data;
    28 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     28using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2929
    3030namespace HeuristicLab.Constraints {
  • trunk/sources/HeuristicLab.Constraints/3.3/SubOperatorsTypeConstraint.cs

    r1672 r1823  
    2727using System.Diagnostics;
    2828using System.Xml;
    29 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     29using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3030
    3131namespace HeuristicLab.Constraints {
  • trunk/sources/HeuristicLab.Constraints/3.3/VariableComparisonConstraint.cs

    r1672 r1823  
    2626using HeuristicLab.Core;
    2727using HeuristicLab.Data;
    28 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     28using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2929
    3030namespace HeuristicLab.Constraints {
  • trunk/sources/HeuristicLab.Core/3.3/AtomicOperation.cs

    r1667 r1823  
    2424using System.Text;
    2525using System.Xml;
    26 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     26using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2727
    2828namespace HeuristicLab.Core {
  • trunk/sources/HeuristicLab.Core/3.3/CompositeOperation.cs

    r1667 r1823  
    2424using System.Text;
    2525using System.Xml;
    26 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     26using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2727
    2828namespace HeuristicLab.Core {
  • trunk/sources/HeuristicLab.Core/3.3/ConstrainedItemBase.cs

    r1667 r1823  
    2424using System.Text;
    2525using System.Xml;
    26 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     26using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2727
    2828namespace HeuristicLab.Core {
  • trunk/sources/HeuristicLab.Core/3.3/EngineBase.cs

    r1667 r1823  
    2525using System.Xml;
    2626using System.Threading;
    27 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     27using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2828
    2929namespace HeuristicLab.Core {
  • trunk/sources/HeuristicLab.Core/3.3/OperatorBase.cs

    r1732 r1823  
    2424using System.Text;
    2525using System.Xml;
    26 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     26using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2727
    2828namespace HeuristicLab.Core {
  • trunk/sources/HeuristicLab.Core/3.3/OperatorGraph.cs

    r1667 r1823  
    2424using System.Text;
    2525using System.Xml;
    26 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     26using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2727
    2828namespace HeuristicLab.Core {
  • trunk/sources/HeuristicLab.Core/3.3/OperatorGroup.cs

    r1667 r1823  
    2424using System.Text;
    2525using System.Xml;
    26 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     26using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2727
    2828namespace HeuristicLab.Core {
  • trunk/sources/HeuristicLab.Core/3.3/OperatorLibrary.cs

    r1667 r1823  
    2424using System.Text;
    2525using System.Xml;
    26 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     26using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2727
    2828namespace HeuristicLab.Core {
  • trunk/sources/HeuristicLab.Core/3.3/Scope.cs

    r1732 r1823  
    2424using System.Text;
    2525using System.Xml;
    26 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     26using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2727
    2828namespace HeuristicLab.Core {
  • trunk/sources/HeuristicLab.Core/3.3/StorableBase.cs

    r1667 r1823  
    2424using System.Text;
    2525using System.Xml;
    26 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     26using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2727
    2828namespace HeuristicLab.Core {
  • trunk/sources/HeuristicLab.Core/3.3/Variable.cs

    r1667 r1823  
    2424using System.Text;
    2525using System.Xml;
    26 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     26using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2727
    2828namespace HeuristicLab.Core {
  • trunk/sources/HeuristicLab.Core/3.3/VariableInfo.cs

    r1667 r1823  
    2424using System.Text;
    2525using System.Xml;
    26 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     26using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2727
    2828namespace HeuristicLab.Core {
  • trunk/sources/HeuristicLab.Data/3.3/ArrayDataBase.cs

    r1669 r1823  
    2525using System.Xml;
    2626using HeuristicLab.Core;
    27 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     27using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2828
    2929namespace HeuristicLab.Data {
  • trunk/sources/HeuristicLab.Data/3.3/ConstrainedItemList.cs

    r1669 r1823  
    2626using System.Xml;
    2727using HeuristicLab.Core;
    28 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     28using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2929
    3030namespace HeuristicLab.Data {
  • trunk/sources/HeuristicLab.Data/3.3/ConstrainedObjectData.cs

    r1669 r1823  
    2525using System.Xml;
    2626using HeuristicLab.Core;
    27 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     27using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2828
    2929namespace HeuristicLab.Data {
  • trunk/sources/HeuristicLab.Data/3.3/ItemDictionary_T.cs

    r1669 r1823  
    55using System.Xml;
    66using HeuristicLab.Core;
    7 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     7using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    88
    99namespace HeuristicLab.Data {
  • trunk/sources/HeuristicLab.Data/3.3/ItemList_T.cs

    r1669 r1823  
    2626using System.Xml;
    2727using HeuristicLab.Core;
    28 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     28using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2929
    3030namespace HeuristicLab.Data {
  • trunk/sources/HeuristicLab.Data/3.3/ObjectData.cs

    r1669 r1823  
    2525using System.Xml;
    2626using HeuristicLab.Core;
    27 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     27using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2828
    2929namespace HeuristicLab.Data {
  • trunk/sources/HeuristicLab.Operators/3.3/CombinedOperator.cs

    r1673 r1823  
    2626using HeuristicLab.Core;
    2727using HeuristicLab.Data;
    28 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     28using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2929
    3030namespace HeuristicLab.Operators {
  • trunk/sources/HeuristicLab.Operators/3.3/VariableInjector.cs

    r1727 r1823  
    2525using System.Xml;
    2626using HeuristicLab.Core;
    27 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     27using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2828
    2929namespace HeuristicLab.Operators {
  • trunk/sources/HeuristicLab.Persistence.GUI/3.3/PersistenceConfigurationForm.cs

    r1703 r1823  
    99using HeuristicLab.Persistence.Interfaces;
    1010using System.Text;
    11 using HeuristicLab.Persistence.Default.Decomposers;
     11using HeuristicLab.Persistence.Default.CompositeSerializers;
    1212using HeuristicLab.PluginInfrastructure;
    13 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     13using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    1414
    1515namespace HeuristicLab.Persistence.GUI {
     
    1717  public partial class PersistenceConfigurationForm : Form {
    1818
    19     private readonly Dictionary<string, IFormatter> formatterTable;
    20     private readonly Dictionary<string, bool> simpleFormatterTable;
    21     private readonly Dictionary<IFormatter, string> reverseFormatterTable;
     19    private readonly Dictionary<string, IPrimitiveSerializer> primitiveSerializersTable;
     20    private readonly Dictionary<string, bool> simplePrimitiveSerializersTable;
     21    private readonly Dictionary<IPrimitiveSerializer, string> reversePrimitiveSerializersTable;
    2222    private readonly Dictionary<string, Type> typeNameTable;
    2323    private readonly Dictionary<Type, string> reverseTypeNameTable;
     
    2626    public PersistenceConfigurationForm() {
    2727      InitializeComponent();
    28       formatterTable = new Dictionary<string, IFormatter>();
    29       simpleFormatterTable = new Dictionary<string, bool>();
    30       reverseFormatterTable = new Dictionary<IFormatter, string>();
     28      primitiveSerializersTable = new Dictionary<string, IPrimitiveSerializer>();
     29      simplePrimitiveSerializersTable = new Dictionary<string, bool>();
     30      reversePrimitiveSerializersTable = new Dictionary<IPrimitiveSerializer, string>();
    3131      typeNameTable = new Dictionary<string, Type>();
    3232      reverseTypeNameTable = new Dictionary<Type, string>();
     
    3838        ConfigurationService.Instance.LoadSettings(true);
    3939        UpdateFromConfigurationService();
    40       } catch (PersistenceException e) {
     40      } catch (PersistenceException) {
    4141        MessageBox.Show(
    4242          "Persistence settings could not be loaded.\r\n" +
     
    6666    }
    6767
    68     private void UpdateFormatterGrid(DataGridView formatterGrid, Configuration config) {
    69       foreach (DataGridViewRow row in formatterGrid.Rows) {
     68    private void UpdatePrimitiveSerializersGrid(DataGridView primitiveSerializersGrid, Configuration config) {
     69      foreach (DataGridViewRow row in primitiveSerializersGrid.Rows) {
    7070        if (row.Cells["Type"] != null) {
    71           IFormatter formatter = config.GetFormatter(typeNameTable[(string)row.Cells["Type"].Value]);
    72           if (formatter == null) {
     71          IPrimitiveSerializer primitiveSerializer = config.GetPrimitiveSerializer(typeNameTable[(string)row.Cells["Type"].Value]);
     72          if (primitiveSerializer == null) {
    7373            row.Cells["Active"].Value = false;
    7474          } else {
    75             foreach (var pair in formatterTable) {
    76               if (pair.Value.GetType().VersionInvariantName() == formatter.GetType().VersionInvariantName()) {
    77                 row.Cells["Formatter"].Value = pair.Key;
     75            foreach (var pair in primitiveSerializersTable) {
     76              if (pair.Value.GetType().VersionInvariantName() == primitiveSerializer.GetType().VersionInvariantName()) {
     77                row.Cells["Primitive Serializer"].Value = pair.Key;
    7878                row.Cells["Active"].Value = true;
    7979                break;
     
    8585    }
    8686
    87     private void UpdateDecomposerList(ListView decomposerList, Configuration config) {
    88       decomposerList.SuspendLayout();
    89       decomposerList.Items.Clear();
    90       var availableDecomposers = new Dictionary<string, IDecomposer>();
    91       foreach (IDecomposer d in ConfigurationService.Instance.Decomposers) {
    92         availableDecomposers.Add(d.GetType().VersionInvariantName(), d);
    93       }
    94       foreach (IDecomposer decomposer in config.Decomposers) {
    95         var item = decomposerList.Items.Add(decomposer.GetType().Name);
     87    private void UpdateCompositeSerializersList(ListView compositeSerializersList, Configuration config) {
     88      compositeSerializersList.SuspendLayout();
     89      compositeSerializersList.Items.Clear();
     90      var availableCompositeSerializers = new Dictionary<string, ICompositeSerializer>();
     91      foreach (ICompositeSerializer d in ConfigurationService.Instance.CompositeSerializers) {
     92        availableCompositeSerializers.Add(d.GetType().VersionInvariantName(), d);
     93      }
     94      foreach (ICompositeSerializer compositeSerializer in config.CompositeSerializers) {
     95        var item = compositeSerializersList.Items.Add(compositeSerializer.GetType().Name);
    9696        item.Checked = true;
    97         item.Tag = decomposer;
    98         availableDecomposers.Remove(decomposer.GetType().VersionInvariantName());
    99       }
    100       foreach (KeyValuePair<string, IDecomposer> pair in availableDecomposers) {
    101         var item = decomposerList.Items.Add(pair.Value.GetType().Name);
     97        item.Tag = compositeSerializer;
     98        availableCompositeSerializers.Remove(compositeSerializer.GetType().VersionInvariantName());
     99      }
     100      foreach (KeyValuePair<string, ICompositeSerializer> pair in availableCompositeSerializers) {
     101        var item = compositeSerializersList.Items.Add(pair.Value.GetType().Name);
    102102        item.Checked = false;
    103103        item.Tag = pair.Value;
    104104      }
    105       decomposerList.ResumeLayout();
     105      compositeSerializersList.ResumeLayout();
    106106    }
    107107
     
    110110      foreach (IFormat format in ConfigurationService.Instance.Formats) {
    111111        Configuration config = ConfigurationService.Instance.GetConfiguration(format);
    112         UpdateFormatterGrid(
     112        UpdatePrimitiveSerializersGrid(
    113113          (DataGridView)GetControlsOnPage(format.Name, "GridView"),
    114114          config);
    115         UpdateDecomposerList(
    116           (ListView)GetControlsOnPage(format.Name, "DecomposerList"),
     115        UpdateCompositeSerializersList(
     116          (ListView)GetControlsOnPage(format.Name, "CompositeSerializersList"),
    117117          config);
    118118      }
     
    124124      configurationTabs.TabPages.Clear();
    125125      foreach (IFormat format in ConfigurationService.Instance.Formats) {
    126         List<IFormatter> formatters = ConfigurationService.Instance.Formatters[format.SerialDataType];
     126        List<IPrimitiveSerializer> primitiveSerializers = ConfigurationService.Instance.PrimitiveSerializers[format.SerialDataType];
    127127        TabPage page = new TabPage(format.Name) {
    128128          Name = format.Name,
     
    145145        horizontalSplit.SuspendLayout();
    146146        verticalSplit.Panel1.Controls.Add(horizontalSplit);
    147         ListView decomposerList = createDecomposerList();
    148         horizontalSplit.Panel1.Controls.Add(decomposerList);
     147        ListView compositeSerializersList = createCompsiteSerializersList();
     148        horizontalSplit.Panel1.Controls.Add(compositeSerializersList);
    149149        DataGridView gridView = createGridView();
    150150        verticalSplit.Panel2.Controls.Add(gridView);
    151         fillDataGrid(gridView, formatters);
     151        fillDataGrid(gridView, primitiveSerializers);
    152152        ListBox checkBox = new ListBox {
    153153          Name = "CheckBox",
     
    185185      });
    186186      gridView.Columns.Add(new DataGridViewComboBoxColumn {
    187         Name = "Formatter",
     187        Name = "Primitive Serializer",
    188188        AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
    189189      });
     
    192192    }
    193193
    194     private ListView createDecomposerList() {
    195       ListView decomposerList = new ListView {
     194    private ListView createCompsiteSerializersList() {
     195      ListView compositeSerializersList = new ListView {
    196196        Activation = ItemActivation.OneClick,
    197197        AllowDrop = true,
     
    201201        GridLines = true,
    202202        HeaderStyle = ColumnHeaderStyle.Nonclickable,
    203         Name = "DecomposerList",
     203        Name = "CompositeSerializersList",
    204204        ShowGroups = false,
    205205        View = View.Details
    206206      };
    207       decomposerList.SuspendLayout();
    208       decomposerList.Resize += decomposerList_Resize;
    209       decomposerList.ItemChecked += decomposerList_ItemChecked;
    210       decomposerList.DragDrop += decomposerList_DragDrop;
    211       decomposerList.DragEnter += decomposerList_DragEnter;
    212       decomposerList.ItemDrag += decomposerList_ItemDrag;
    213       decomposerList.Columns.Add(
     207      compositeSerializersList.SuspendLayout();
     208      compositeSerializersList.Resize += compositeSerializersList_Resize;
     209      compositeSerializersList.ItemChecked += compositeSerializersList_ItemChecked;
     210      compositeSerializersList.DragDrop += compositeSerializersList_DragDrop;
     211      compositeSerializersList.DragEnter += compositeSerializersList_DragEnter;
     212      compositeSerializersList.ItemDrag += compositeSerializersList_ItemDrag;
     213      compositeSerializersList.Columns.Add(
    214214        new ColumnHeader {
    215           Name = "DecomposerColumn", Text = "Decomposers",
     215          Name = "CompositeSerializersColumn", Text = "Composite Serializer",
    216216        });
    217       foreach (IDecomposer decomposer in ConfigurationService.Instance.Decomposers) {
    218         var item = decomposerList.Items.Add(decomposer.GetType().Name);
     217      foreach (ICompositeSerializer compositeSerializer in ConfigurationService.Instance.CompositeSerializers) {
     218        var item = compositeSerializersList.Items.Add(compositeSerializer.GetType().Name);
    219219        item.Checked = true;
    220         item.Tag = decomposer;
    221       }
    222       decomposerList.ResumeLayout();
    223       return decomposerList;
    224     }
    225 
    226     private void fillDataGrid(DataGridView gridView, IEnumerable<IFormatter> formatters) {
     220        item.Tag = compositeSerializer;
     221      }
     222      compositeSerializersList.ResumeLayout();
     223      return compositeSerializersList;
     224    }
     225
     226    private void fillDataGrid(DataGridView gridView, IEnumerable<IPrimitiveSerializer> primitiveSerializers) {
    227227      gridView.SuspendLayout();
    228       Dictionary<string, List<string>> formatterMap = createFormatterMap(formatters);
    229       foreach (var formatterMapping in formatterMap) {
     228      Dictionary<string, List<string>> primitiveSerializersMap = createPrimitiveSerializersMap(primitiveSerializers);
     229      foreach (var primitiveSerializersMapping in primitiveSerializersMap) {
    230230        var row = gridView.Rows[gridView.Rows.Add()];
    231         row.Cells["Type"].Value = formatterMapping.Key;
    232         row.Cells["Type"].ToolTipText = formatterMapping.Key;
     231        row.Cells["Type"].Value = primitiveSerializersMapping.Key;
     232        row.Cells["Type"].ToolTipText = primitiveSerializersMapping.Key;
    233233        row.Cells["Active"].Value = true;
    234         var comboBoxCell = (DataGridViewComboBoxCell)row.Cells["Formatter"];
    235         foreach (var formatter in formatterMapping.Value) {
    236           comboBoxCell.Items.Add(formatter);
     234        var comboBoxCell = (DataGridViewComboBoxCell)row.Cells["Primitive Serializer"];
     235        foreach (var primitiveSerializer in primitiveSerializersMapping.Value) {
     236          comboBoxCell.Items.Add(primitiveSerializer);
    237237        }
    238238        comboBoxCell.Value = comboBoxCell.Items[0];
     
    246246    }
    247247
    248     private Dictionary<string, List<string>> createFormatterMap(IEnumerable<IFormatter> formatters) {
    249       var formatterMap = new Dictionary<string, List<string>>();
    250       foreach (var formatter in formatters) {
    251         string formatterName = reverseFormatterTable[formatter];
    252         string typeName = reverseTypeNameTable[formatter.SourceType];
    253         if (!formatterMap.ContainsKey(typeName))
    254           formatterMap.Add(typeName, new List<string>());
    255         formatterMap[typeName].Add(formatterName);
    256       }
    257       return formatterMap;
     248    private Dictionary<string, List<string>> createPrimitiveSerializersMap(IEnumerable<IPrimitiveSerializer> primitiveSerializers) {
     249      var primitiveSerializersMap = new Dictionary<string, List<string>>();
     250      foreach (var primitiveSerializer in primitiveSerializers) {
     251        string primitiveSerializerName = reversePrimitiveSerializersTable[primitiveSerializer];
     252        string typeName = reverseTypeNameTable[primitiveSerializer.SourceType];
     253        if (!primitiveSerializersMap.ContainsKey(typeName))
     254          primitiveSerializersMap.Add(typeName, new List<string>());
     255        primitiveSerializersMap[typeName].Add(primitiveSerializerName);
     256      }
     257      return primitiveSerializersMap;
    258258    }
    259259
    260260    private void InitializeNameTables() {
    261       foreach (var serialDataType in ConfigurationService.Instance.Formatters.Keys) {
    262         foreach (var formatter in ConfigurationService.Instance.Formatters[serialDataType]) {
    263           string formatterName = formatter.GetType().Name;
    264           if (simpleFormatterTable.ContainsKey(formatterName)) {
    265             IFormatter otherFormatter = formatterTable[formatterName];
    266             formatterTable.Remove(formatterName);
    267             reverseFormatterTable.Remove(otherFormatter);
    268             formatterTable.Add(otherFormatter.GetType().VersionInvariantName(), otherFormatter);
    269             reverseFormatterTable.Add(otherFormatter, otherFormatter.GetType().VersionInvariantName());
    270             formatterName = formatter.GetType().VersionInvariantName();
     261      foreach (var serialDataType in ConfigurationService.Instance.PrimitiveSerializers.Keys) {
     262        foreach (var primtiveSerializer in ConfigurationService.Instance.PrimitiveSerializers[serialDataType]) {
     263          string primitiveSerializerName = primtiveSerializer.GetType().Name;
     264          if (simplePrimitiveSerializersTable.ContainsKey(primitiveSerializerName)) {
     265            IPrimitiveSerializer otherPrimitiveSerializer = primitiveSerializersTable[primitiveSerializerName];
     266            primitiveSerializersTable.Remove(primitiveSerializerName);
     267            reversePrimitiveSerializersTable.Remove(otherPrimitiveSerializer);
     268            primitiveSerializersTable.Add(otherPrimitiveSerializer.GetType().VersionInvariantName(), otherPrimitiveSerializer);
     269            reversePrimitiveSerializersTable.Add(otherPrimitiveSerializer, otherPrimitiveSerializer.GetType().VersionInvariantName());
     270            primitiveSerializerName = primtiveSerializer.GetType().VersionInvariantName();
    271271          }
    272           simpleFormatterTable[formatter.GetType().Name] = true;
    273           formatterTable.Add(formatterName, formatter);
    274           reverseFormatterTable.Add(formatter, formatterName);
    275 
    276           string typeName = formatter.SourceType.IsGenericType ?
    277             formatter.SourceType.SimpleFullName() :
    278             formatter.SourceType.Name;
     272          simplePrimitiveSerializersTable[primtiveSerializer.GetType().Name] = true;
     273          primitiveSerializersTable.Add(primitiveSerializerName, primtiveSerializer);
     274          reversePrimitiveSerializersTable.Add(primtiveSerializer, primitiveSerializerName);
     275
     276          string typeName = primtiveSerializer.SourceType.IsGenericType ?
     277            primtiveSerializer.SourceType.SimpleFullName() :
     278            primtiveSerializer.SourceType.Name;
    279279          if (typeNameTable.ContainsKey(typeName)) {
    280280            Type otherType = typeNameTable[typeName];
    281             if (otherType != formatter.SourceType) {
     281            if (otherType != primtiveSerializer.SourceType) {
    282282              typeNameTable.Remove(typeName);
    283283              reverseTypeNameTable.Remove(otherType);
    284284              typeNameTable.Add(otherType.VersionInvariantName(), otherType);
    285285              reverseTypeNameTable.Add(otherType, otherType.VersionInvariantName());
    286               typeName = formatter.SourceType.VersionInvariantName();
    287               typeNameTable.Add(typeName, formatter.SourceType);
    288               reverseTypeNameTable.Add(formatter.SourceType, typeName);
     286              typeName = primtiveSerializer.SourceType.VersionInvariantName();
     287              typeNameTable.Add(typeName, primtiveSerializer.SourceType);
     288              reverseTypeNameTable.Add(primtiveSerializer.SourceType, typeName);
    289289            }
    290290          } else {
    291             typeNameTable.Add(typeName, formatter.SourceType);
    292             reverseTypeNameTable.Add(formatter.SourceType, typeName);
     291            typeNameTable.Add(typeName, primtiveSerializer.SourceType);
     292            reverseTypeNameTable.Add(primtiveSerializer.SourceType, typeName);
    293293          }
    294294        }
     
    305305        checkBox.Items.Clear();
    306306        Configuration activeConfig = GetActiveConfiguration();
    307         foreach (var formatter in activeConfig.Formatters) {
    308           checkBox.Items.Add(formatter.GetType().Name + " (F)");
    309         }
    310         foreach (var decomposer in activeConfig.Decomposers)
    311           checkBox.Items.Add(decomposer.GetType().Name + " (D)");
     307        foreach (var primitveSerializer in activeConfig.PrimitiveSerializers) {
     308          checkBox.Items.Add(primitveSerializer.GetType().Name + " (F)");
     309        }
     310        foreach (var compositeSerializer in activeConfig.CompositeSerializers)
     311          checkBox.Items.Add(compositeSerializer.GetType().Name + " (D)");
    312312      }
    313313      checkBox.ResumeLayout();
     
    319319    }
    320320
    321     private void decomposerList_ItemDrag(object sender, ItemDragEventArgs e) {
    322       ListView decomposerList = (ListView)sender;
    323       decomposerList.DoDragDrop(decomposerList.SelectedItems, DragDropEffects.Move);
    324     }
    325 
    326     private void decomposerList_DragEnter(object sender, DragEventArgs e) {
     321    private void compositeSerializersList_ItemDrag(object sender, ItemDragEventArgs e) {
     322      ListView compositeSerializersList = (ListView)sender;
     323      compositeSerializersList.DoDragDrop(compositeSerializersList.SelectedItems, DragDropEffects.Move);
     324    }
     325
     326    private void compositeSerializersList_DragEnter(object sender, DragEventArgs e) {
    327327      if (e.Data.GetDataPresent(typeof(ListView.SelectedListViewItemCollection).FullName)) {
    328328        e.Effect = DragDropEffects.Move;
     
    330330    }
    331331
    332     private void decomposerList_DragDrop(object sender, DragEventArgs e) {
    333       ListView decomposerList = (ListView)sender;
    334       if (decomposerList.SelectedItems.Count == 0) {
     332    private void compositeSerializersList_DragDrop(object sender, DragEventArgs e) {
     333      ListView compositeSerializersList = (ListView)sender;
     334      if (compositeSerializersList.SelectedItems.Count == 0) {
    335335        return;
    336336      }
    337       Point cp = decomposerList.PointToClient(new Point(e.X, e.Y));
    338       ListViewItem targetItem = decomposerList.GetItemAt(cp.X, cp.Y);
     337      Point cp = compositeSerializersList.PointToClient(new Point(e.X, e.Y));
     338      ListViewItem targetItem = compositeSerializersList.GetItemAt(cp.X, cp.Y);
    339339      if (targetItem == null)
    340340        return;
    341341      int targetIndex = targetItem.Index;
    342       var selectedItems = new List<ListViewItem>(decomposerList.SelectedItems.Cast<ListViewItem>());
     342      var selectedItems = new List<ListViewItem>(compositeSerializersList.SelectedItems.Cast<ListViewItem>());
    343343      int i = 0;
    344344      foreach (ListViewItem dragItem in selectedItems) {
     
    346346          return;
    347347        if (dragItem.Index < targetIndex) {
    348           decomposerList.Items.Insert(targetIndex + 1, (ListViewItem)dragItem.Clone());
     348          compositeSerializersList.Items.Insert(targetIndex + 1, (ListViewItem)dragItem.Clone());
    349349        } else {
    350           decomposerList.Items.Insert(targetIndex + i, (ListViewItem)dragItem.Clone());
    351         }
    352         decomposerList.Items.Remove(dragItem);
     350          compositeSerializersList.Items.Insert(targetIndex + i, (ListViewItem)dragItem.Clone());
     351        }
     352        compositeSerializersList.Items.Remove(dragItem);
    353353        i++;
    354354      }
     
    356356    }
    357357
    358     private void decomposerList_Resize(object sender, EventArgs e) {
    359       ListView decomposerList = (ListView)sender;
    360       decomposerList.Columns["DecomposerColumn"].Width = decomposerList.Width - 4;
    361     }
    362 
    363 
    364     private void decomposerList_ItemChecked(object sender, ItemCheckedEventArgs e) {
     358    private void compositeSerializersList_Resize(object sender, EventArgs e) {
     359      ListView compositeSerializersList = (ListView)sender;
     360      compositeSerializersList.Columns["CompositeSerializersColumn"].Width = compositeSerializersList.Width - 4;
     361    }
     362
     363
     364    private void compositeSerializersList_ItemChecked(object sender, ItemCheckedEventArgs e) {
    365365      UpdatePreview();
    366366    }
     
    384384    }
    385385
    386     private Configuration GenerateConfiguration(IFormat format, DataGridView formatterGrid, ListView decomposerList) {
    387       if (formatterGrid == null || decomposerList == null)
     386    private Configuration GenerateConfiguration(IFormat format, DataGridView primitiveSerializersGrid, ListView compositeSerializersList) {
     387      if (primitiveSerializersGrid == null || compositeSerializersList == null)
    388388        return null;
    389       var formatters = new List<IFormatter>();
    390       foreach (DataGridViewRow row in formatterGrid.Rows) {
     389      var primitiveSerializers = new List<IPrimitiveSerializer>();
     390      foreach (DataGridViewRow row in primitiveSerializersGrid.Rows) {
    391391        if (row.Cells["Type"].Value != null &&
    392392             row.Cells["Active"].Value != null &&
    393              row.Cells["Formatter"].Value != null &&
     393             row.Cells["Primitive Serializer"].Value != null &&
    394394             (bool)row.Cells["Active"].Value == true) {
    395           formatters.Add(formatterTable[(string)row.Cells["Formatter"].Value]);
    396         }
    397       }
    398       var decomposers = new List<IDecomposer>();
    399       foreach (ListViewItem item in decomposerList.Items) {
     395          primitiveSerializers.Add(primitiveSerializersTable[(string)row.Cells["Primitive Serializer"].Value]);
     396        }
     397      }
     398      var compositeSerializers = new List<ICompositeSerializer>();
     399      foreach (ListViewItem item in compositeSerializersList.Items) {
    400400        if (item != null && item.Checked)
    401           decomposers.Add((IDecomposer)item.Tag);
    402       }
    403       return new Configuration(format, formatters, decomposers);
     401          compositeSerializers.Add((ICompositeSerializer)item.Tag);
     402      }
     403      return new Configuration(format, primitiveSerializers, compositeSerializers);
    404404    }
    405405
     
    408408      return GenerateConfiguration(format,
    409409        (DataGridView)GetActiveControl("GridView"),
    410         (ListView)GetActiveControl("DecomposerList"));
     410        (ListView)GetActiveControl("CompositeSerializersList"));
    411411    }
    412412
     
    414414      return GenerateConfiguration(format,
    415415       (DataGridView)GetControlsOnPage(format.Name, "GridView"),
    416        (ListView)GetControlsOnPage(format.Name, "DecomposerList"));
     416       (ListView)GetControlsOnPage(format.Name, "CompositeSerializersList"));
    417417    }
    418418
  • trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/TypeLoader.cs

    r1805 r1823  
    66using HeuristicLab.Tracing;
    77using System.Reflection;
     8using HeuristicLab.Persistence.Core;
    89
    9 namespace HeuristicLab.Persistence.Core {
     10namespace HeuristicLab.Persistence.Auxiliary {
    1011
    1112  public class TypeLoader {
     
    5253      return type;
    5354    }
    54 
    55   }
    56 
    57   public class Deserializer {
    58 
    59     class Midwife {
    60 
    61       public int? Id { get; private set; }
    62       public bool MetaMode { get; set; }
    63       public object Obj { get; private set; }
    64 
    65       private List<Tag> metaInfo;
    66       private List<Tag> customValues;
    67       private Type type;
    68       private IDecomposer decomposer;
    69 
    70       public Midwife(object value) {
    71         this.Obj = value;
    72       }
    73 
    74       public Midwife(Type type, IDecomposer decomposer, int? id) {
    75         this.type = type;
    76         this.decomposer = decomposer;
    77         this.Id = id;
    78         MetaMode = false;
    79         metaInfo = new List<Tag>();
    80         customValues = new List<Tag>();
    81       }
    82 
    83       public void CreateInstance() {
    84         if (Obj != null)
    85           throw new PersistenceException("object already instantiated");
    86         Obj = decomposer.CreateInstance(type, metaInfo);
    87       }
    88 
    89       public void AddValue(string name, object value) {
    90         if (MetaMode) {
    91           metaInfo.Add(new Tag(name, value));
    92         } else {
    93           customValues.Add(new Tag(name, value));
    94         }
    95       }
    96 
    97       public void Populate() {
    98         decomposer.Populate(Obj, customValues, type);
    99       }
    100     }
    101 
    102     private readonly Dictionary<int, object> id2obj;
    103     private readonly Dictionary<Type, object> serializerMapping;
    104     private readonly Stack<Midwife> parentStack;
    105     private readonly Dictionary<int, Type> typeIds;
    106 
    107     public Deserializer(
    108       IEnumerable<TypeMapping> typeCache) {
    109       id2obj = new Dictionary<int, object>();
    110       parentStack = new Stack<Midwife>();
    111       typeIds = new Dictionary<int, Type>();
    112       serializerMapping = CreateSerializers(typeCache);
    113     }
    114 
    115     private Dictionary<Type, object> CreateSerializers(IEnumerable<TypeMapping> typeCache) {
    116       try {
    117         var map = new Dictionary<Type, object>();
    118         foreach (var typeMapping in typeCache) {
    119           Type type = TypeLoader.Load(typeMapping.TypeName);
    120           typeIds.Add(typeMapping.Id, type);
    121           Type serializerType = TypeLoader.Load(typeMapping.Serializer);
    122           map.Add(type, Activator.CreateInstance(serializerType, true));
    123         }
    124         return map;
    125       } catch (PersistenceException) {
    126         throw;
    127       } catch (Exception e) {
    128         throw new PersistenceException(
    129           "The serialization type cache could not be loaded.\r\n" +
    130           "This usualy happens when you are missing an Assembly/Plugin.", e);
    131       }
    132     }
    133 
    134 
    135     public object Deserialize(IEnumerable<ISerializationToken> tokens) {
    136       foreach (ISerializationToken token in tokens) {
    137         Type t = token.GetType();
    138         if (t == typeof(BeginToken)) {
    139           CompositeStartHandler((BeginToken)token);
    140         } else if (t == typeof(EndToken)) {
    141           CompositeEndHandler((EndToken)token);
    142         } else if (t == typeof(PrimitiveToken)) {
    143           PrimitiveHandler((PrimitiveToken)token);
    144         } else if (t == typeof(ReferenceToken)) {
    145           ReferenceHandler((ReferenceToken)token);
    146         } else if (t == typeof(NullReferenceToken)) {
    147           NullHandler((NullReferenceToken)token);
    148         } else if (t == typeof(MetaInfoBeginToken)) {
    149           MetaInfoBegin((MetaInfoBeginToken)token);
    150         } else if (t == typeof(MetaInfoEndToken)) {
    151           MetaInfoEnd((MetaInfoEndToken)token);
    152         } else {
    153           throw new PersistenceException("invalid token type");
    154         }
    155       }
    156       return parentStack.Pop().Obj;
    157     }
    158 
    159     private void CompositeStartHandler(BeginToken token) {
    160       Type type = typeIds[(int)token.TypeId];
    161       IDecomposer decomposer = null;
    162       if (serializerMapping.ContainsKey(type))
    163         decomposer = serializerMapping[type] as IDecomposer;
    164       if (decomposer == null)
    165         throw new PersistenceException(String.Format(
    166           "No suitable method for deserialization of type \"{0}\" found.",
    167           type.VersionInvariantName()));
    168       parentStack.Push(new Midwife(type, decomposer, token.Id));
    169     }
    170 
    171     private void CompositeEndHandler(EndToken token) {
    172       Type type = typeIds[(int)token.TypeId];
    173       Midwife midwife = parentStack.Pop();
    174       if (midwife.Obj == null)
    175         CreateInstance(midwife);
    176       midwife.Populate();
    177       SetValue(token.Name, midwife.Obj);
    178     }
    179 
    180     private void PrimitiveHandler(PrimitiveToken token) {
    181       Type type = typeIds[(int)token.TypeId];
    182       object value = ((IFormatter)serializerMapping[type]).Parse(token.SerialData);
    183       if (token.Id != null)
    184         id2obj[(int)token.Id] = value;
    185       SetValue(token.Name, value);
    186     }
    187 
    188     private void ReferenceHandler(ReferenceToken token) {
    189       object referredObject = id2obj[token.Id];
    190       SetValue(token.Name, referredObject);
    191     }
    192 
    193     private void NullHandler(NullReferenceToken token) {
    194       SetValue(token.Name, null);
    195     }
    196 
    197     private void MetaInfoBegin(MetaInfoBeginToken token) {
    198       parentStack.Peek().MetaMode = true;
    199     }
    200 
    201     private void MetaInfoEnd(MetaInfoEndToken token) {
    202       Midwife m = parentStack.Peek();
    203       m.MetaMode = false;
    204       CreateInstance(m);
    205     }
    206 
    207     private void CreateInstance(Midwife m) {
    208       m.CreateInstance();
    209       if (m.Id != null)
    210         id2obj.Add((int)m.Id, m.Obj);
    211     }
    212 
    213     private void SetValue(string name, object value) {
    214       if (parentStack.Count == 0) {
    215         parentStack.Push(new Midwife(value));
    216       } else {
    217         Midwife m = parentStack.Peek();
    218         if (m.MetaMode == false && m.Obj == null)
    219           CreateInstance(m);
    220         m.AddValue(name, value);
    221       }
    222     }
    22355  }
    22456}
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/Configuration.cs

    r1654 r1823  
    22using System.Collections.Generic;
    33using HeuristicLab.Persistence.Interfaces;
    4 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     4using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    55
    66namespace HeuristicLab.Persistence.Core {
     
    99
    1010    [Storable]
    11     private readonly Dictionary<Type, IFormatter> formatters;
     11    private readonly Dictionary<Type, IPrimitiveSerializer> primitiveSerializers;
    1212
    1313    [Storable]
    14     private readonly List<IDecomposer> decomposers;
    15     private readonly Dictionary<Type, IDecomposer> decomposerCache;
     14    private readonly List<ICompositeSerializer> compositeSerializers;
     15    private readonly Dictionary<Type, ICompositeSerializer> compositeSerializerCache;
    1616
    1717    [Storable]
     
    1919
    2020    private Configuration() {
    21       decomposerCache = new Dictionary<Type, IDecomposer>();
     21      compositeSerializerCache = new Dictionary<Type, ICompositeSerializer>();
    2222    }
    2323
    24     public Configuration(IFormat format, IEnumerable<IFormatter> formatters, IEnumerable<IDecomposer> decomposers) {
     24    public Configuration(IFormat format,
     25        IEnumerable<IPrimitiveSerializer> primitiveSerializers,
     26        IEnumerable<ICompositeSerializer> compositeSerializers) {
    2527      this.Format = format;
    26       this.formatters = new Dictionary<Type, IFormatter>();
    27       foreach (IFormatter formatter in formatters) {
    28         if (formatter.SerialDataType != format.SerialDataType) {
    29           throw new ArgumentException("All formatters must have the same IFormat.");
     28      this.primitiveSerializers = new Dictionary<Type, IPrimitiveSerializer>();
     29      foreach (IPrimitiveSerializer primitiveSerializer in primitiveSerializers) {
     30        if (primitiveSerializer.SerialDataType != format.SerialDataType) {
     31          throw new ArgumentException("All primitive serializers must have the same IFormat.");
    3032        }
    31         this.formatters.Add(formatter.SourceType, formatter);
     33        this.primitiveSerializers.Add(primitiveSerializer.SourceType, primitiveSerializer);
    3234      }
    33       this.decomposers = new List<IDecomposer>(decomposers);
    34       decomposerCache = new Dictionary<Type, IDecomposer>();
     35      this.compositeSerializers = new List<ICompositeSerializer>(compositeSerializers);
     36      compositeSerializerCache = new Dictionary<Type, ICompositeSerializer>();
    3537    }
    3638
    37     public IEnumerable<IFormatter> Formatters {
    38       get { return formatters.Values; }
     39    public IEnumerable<IPrimitiveSerializer> PrimitiveSerializers {
     40      get { return primitiveSerializers.Values; }
    3941    }
    4042
    41     public IEnumerable<IDecomposer> Decomposers {
    42       get { return decomposers; }
     43    public IEnumerable<ICompositeSerializer> CompositeSerializers {
     44      get { return compositeSerializers; }
    4345    }
    4446
    45     public IFormatter GetFormatter(Type type) {
    46       IFormatter formatter;
    47       formatters.TryGetValue(type, out formatter);
    48       return formatter;
     47    public IPrimitiveSerializer GetPrimitiveSerializer(Type type) {
     48      IPrimitiveSerializer primitiveSerializer;
     49      primitiveSerializers.TryGetValue(type, out primitiveSerializer);
     50      return primitiveSerializer;
    4951    }
    5052
    51     public IDecomposer GetDecomposer(Type type) {
    52       if (decomposerCache.ContainsKey(type))
    53         return decomposerCache[type];
    54       foreach (IDecomposer d in decomposers) {
    55         if (d.CanDecompose(type)) {
    56           decomposerCache.Add(type, d);
     53    public ICompositeSerializer GetCompositeSerializer(Type type) {
     54      if (compositeSerializerCache.ContainsKey(type))
     55        return compositeSerializerCache[type];
     56      foreach (ICompositeSerializer d in compositeSerializers) {
     57        if (d.CanSerialize(type)) {
     58          compositeSerializerCache.Add(type, d);
    5759          return d;
    5860        }
    5961      }
    60       decomposerCache.Add(type, null);
     62      compositeSerializerCache.Add(type, null);
    6163      return null;
    6264    }
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/ConfigurationService.cs

    r1703 r1823  
    1717    private static ConfigurationService instance;
    1818    private readonly Dictionary<IFormat, Configuration> customConfigurations;
    19     public Dictionary<Type, List<IFormatter>> Formatters { get; private set; }
    20     public List<IDecomposer> Decomposers { get; private set; }
     19    public Dictionary<Type, List<IPrimitiveSerializer>> PrimitiveSerializers { get; private set; }
     20    public List<ICompositeSerializer> CompositeSerializers { get; private set; }
    2121    public List<IFormat> Formats { get; private set; }
    2222
     
    3030
    3131    private ConfigurationService() {
    32       Formatters = new Dictionary<Type, List<IFormatter>>();
    33       Decomposers = new List<IDecomposer>();
     32      PrimitiveSerializers = new Dictionary<Type, List<IPrimitiveSerializer>>();
     33      CompositeSerializers = new List<ICompositeSerializer>();
    3434      customConfigurations = new Dictionary<IFormat, Configuration>();
    3535      Formats = new List<IFormat>();
     
    9494    public void Reset() {
    9595      customConfigurations.Clear();
    96       Formatters.Clear();
    97       Decomposers.Clear();
     96      PrimitiveSerializers.Clear();
     97      CompositeSerializers.Clear();
    9898      Assembly defaultAssembly = Assembly.GetExecutingAssembly();
    9999      DiscoverFrom(defaultAssembly);
     
    101101        if (a != defaultAssembly)
    102102          DiscoverFrom(a);
    103       SortDecomposers();
     103      SortCompositeSerializers();
    104104    }
    105105
    106     class PriortiySorter : IComparer<IDecomposer> {
    107       public int Compare(IDecomposer x, IDecomposer y) {
     106    class PriortiySorter : IComparer<ICompositeSerializer> {
     107      public int Compare(ICompositeSerializer x, ICompositeSerializer y) {
    108108        return y.Priority - x.Priority;
    109109      }
    110110    }
    111111
    112     protected void SortDecomposers() {
    113       Decomposers.Sort(new PriortiySorter());
     112    protected void SortCompositeSerializers() {
     113      CompositeSerializers.Sort(new PriortiySorter());
    114114    }
    115115
    116116    protected void DiscoverFrom(Assembly a) {
    117117      foreach (Type t in a.GetTypes()) {
    118         if (t.GetInterface(typeof(IFormatter).FullName) != null) {
     118        if (t.GetInterface(typeof(IPrimitiveSerializer).FullName) != null) {
    119119          try {
    120             IFormatter formatter = (IFormatter)Activator.CreateInstance(t, true);
    121             if (!Formatters.ContainsKey(formatter.SerialDataType)) {
    122               Formatters.Add(formatter.SerialDataType, new List<IFormatter>());
     120            IPrimitiveSerializer primitiveSerializer =
     121              (IPrimitiveSerializer)Activator.CreateInstance(t, true);
     122            if (!PrimitiveSerializers.ContainsKey(primitiveSerializer.SerialDataType)) {
     123              PrimitiveSerializers.Add(primitiveSerializer.SerialDataType, new List<IPrimitiveSerializer>());
    123124            }
    124             Formatters[formatter.SerialDataType].Add(formatter);
    125             Logger.Debug(String.Format("discovered formatter {0} ({1} -> {2})",
     125            PrimitiveSerializers[primitiveSerializer.SerialDataType].Add(primitiveSerializer);
     126            Logger.Debug(String.Format("discovered primitive serializer {0} ({1} -> {2})",
    126127              t.VersionInvariantName(),
    127               formatter.SourceType.VersionInvariantName(),
    128               formatter.SerialDataType.VersionInvariantName()));
     128              primitiveSerializer.SourceType.AssemblyQualifiedName,
     129              primitiveSerializer.SerialDataType.AssemblyQualifiedName));
    129130          } catch (MissingMethodException e) {
    130             Logger.Warn("Could not instantiate " + t.VersionInvariantName(), e);
     131            Logger.Warn("Could not instantiate " + t.AssemblyQualifiedName, e);
    131132          } catch (ArgumentException e) {
    132             Logger.Warn("Could not instantiate " + t.VersionInvariantName(), e);
     133            Logger.Warn("Could not instantiate " + t.AssemblyQualifiedName, e);
    133134          }
    134135        }
    135         if (t.GetInterface(typeof(IDecomposer).FullName) != null) {
     136        if (t.GetInterface(typeof(ICompositeSerializer).FullName) != null) {
    136137          try {
    137             Decomposers.Add((IDecomposer)Activator.CreateInstance(t, true));
    138             Logger.Debug("discovered decomposer " + t.VersionInvariantName());
     138            CompositeSerializers.Add((ICompositeSerializer)Activator.CreateInstance(t, true));
     139            Logger.Debug("discovered composite serializer " + t.AssemblyQualifiedName);
    139140          } catch (MissingMethodException e) {
    140             Logger.Warn("Could not instantiate " + t.VersionInvariantName(), e);
     141            Logger.Warn("Could not instantiate " + t.AssemblyQualifiedName, e);
    141142          } catch (ArgumentException e) {
    142             Logger.Warn("Could not instantiate " + t.VersionInvariantName(), e);
     143            Logger.Warn("Could not instantiate " + t.AssemblyQualifiedName, e);
    143144          }
    144145        }
     
    150151              format.Name,
    151152              format.SerialDataType,
    152               t.VersionInvariantName()));
     153              t.AssemblyQualifiedName));
    153154          } catch (MissingMethodException e) {
    154             Logger.Warn("Could not instantiate " + t.VersionInvariantName(), e);
     155            Logger.Warn("Could not instantiate " + t.AssemblyQualifiedName, e);
    155156          } catch (ArgumentException e) {
    156             Logger.Warn("Could not instantiate " + t.VersionInvariantName(), e);
     157            Logger.Warn("Could not instantiate " + t.AssemblyQualifiedName, e);
    157158          }
    158159        }
     
    161162
    162163    public Configuration GetDefaultConfig(IFormat format) {
    163       Dictionary<Type, IFormatter> formatterConfig = new Dictionary<Type, IFormatter>();
    164       if (Formatters.ContainsKey(format.SerialDataType)) {
    165         foreach (IFormatter f in Formatters[format.SerialDataType]) {
    166           if (!formatterConfig.ContainsKey(f.SourceType))
    167             formatterConfig.Add(f.SourceType, f);
     164      Dictionary<Type, IPrimitiveSerializer> primitiveConfig = new Dictionary<Type, IPrimitiveSerializer>();
     165      if (PrimitiveSerializers.ContainsKey(format.SerialDataType)) {
     166        foreach (IPrimitiveSerializer f in PrimitiveSerializers[format.SerialDataType]) {
     167          if (!primitiveConfig.ContainsKey(f.SourceType))
     168            primitiveConfig.Add(f.SourceType, f);
    168169        }
    169170      } else {
    170171        Logger.Warn(String.Format(
    171           "No formatters found for format {0} with serial data type {1}",
    172           format.GetType().VersionInvariantName(),
    173           format.SerialDataType.VersionInvariantName()));
     172          "No primitive serializers found for format {0} with serial data type {1}",
     173          format.GetType().AssemblyQualifiedName,
     174          format.SerialDataType.AssemblyQualifiedName));
    174175      }
    175       return new Configuration(format, formatterConfig.Values, Decomposers.Where((d) => d.Priority > 0));
     176      return new Configuration(
     177        format,
     178        primitiveConfig.Values,
     179        CompositeSerializers.Where((d) => d.Priority > 0));
    176180    }
    177181
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/DeSerializer.cs

    r1795 r1823  
    88
    99namespace HeuristicLab.Persistence.Core {
    10 
    11   public class TypeLoader {
    12 
    13     public static Type Load(string typeNameString) {
    14       Type type;
    15       try {
    16         type = Type.GetType(typeNameString, true);
    17       } catch (Exception) {
    18         Logger.Warn(String.Format(
    19           "Cannot load type \"{0}\", falling back to partial name", typeNameString));
    20         try {
    21           TypeName typeName = TypeNameParser.Parse(typeNameString);
    22           Assembly a = Assembly.LoadWithPartialName(typeName.AssemblyName);
    23           type = a.GetType(typeName.ToString(false, false), true);
    24         } catch (Exception) {
    25           throw new PersistenceException(String.Format(
    26             "Could not load type \"{0}\"",
    27             typeNameString));
    28         }
    29         try {
    30           TypeName requestedTypeName = TypeNameParser.Parse(typeNameString);
    31           TypeName loadedTypeName = TypeNameParser.Parse(type.AssemblyQualifiedName);
    32           if (!requestedTypeName.IsCompatible(loadedTypeName))
    33             throw new PersistenceException(String.Format(
    34               "Serialized type is incompatible with available type: serialized: {0}, loaded: {1}",
    35               typeNameString,
    36               type.AssemblyQualifiedName));
    37           if (requestedTypeName.IsNewerThan(loadedTypeName))
    38             throw new PersistenceException(String.Format(
    39               "Serialized type is newer than available type: serialized: {0}, loaded: {1}",
    40               typeNameString,
    41               type.AssemblyQualifiedName));
    42         } catch (PersistenceException) {
    43           throw;
    44         } catch (Exception e) {
    45           Logger.Warn(String.Format(
    46             "Could not perform version check requested type was {0} while loaded type is {1}:",
    47             typeNameString,
    48             type.AssemblyQualifiedName),
    49             e);
    50         }
    51       }
    52       return type;
    53     }
    54 
    55   }
    5610
    5711  public class Deserializer {
     
    6620      private List<Tag> customValues;
    6721      private Type type;
    68       private IDecomposer decomposer;
     22      private ICompositeSerializer compositeSerializer;
    6923
    7024      public Midwife(object value) {
     
    7226      }
    7327
    74       public Midwife(Type type, IDecomposer decomposer, int? id) {
     28      public Midwife(Type type, ICompositeSerializer compositeSerializer, int? id) {
    7529        this.type = type;
    76         this.decomposer = decomposer;
     30        this.compositeSerializer = compositeSerializer;
    7731        this.Id = id;
    7832        MetaMode = false;
     
    8438        if (Obj != null)
    8539          throw new PersistenceException("object already instantiated");
    86         Obj = decomposer.CreateInstance(type, metaInfo);
     40        Obj = compositeSerializer.CreateInstance(type, metaInfo);
    8741      }
    8842
     
    9650
    9751      public void Populate() {
    98         decomposer.Populate(Obj, customValues, type);
     52        compositeSerializer.Populate(Obj, customValues, type);
    9953      }
    10054    }
     
    159113    private void CompositeStartHandler(BeginToken token) {
    160114      Type type = typeIds[(int)token.TypeId];
    161       IDecomposer decomposer = null;
     115      ICompositeSerializer compositeSerializer = null;
    162116      if (serializerMapping.ContainsKey(type))
    163         decomposer = serializerMapping[type] as IDecomposer;
    164       if (decomposer == null)
     117        compositeSerializer = serializerMapping[type] as ICompositeSerializer;
     118      if (compositeSerializer == null)
    165119        throw new PersistenceException(String.Format(
    166120          "No suitable method for deserialization of type \"{0}\" found.",
    167121          type.VersionInvariantName()));
    168       parentStack.Push(new Midwife(type, decomposer, token.Id));
     122      parentStack.Push(new Midwife(type, compositeSerializer, token.Id));
    169123    }
    170124
     
    180134    private void PrimitiveHandler(PrimitiveToken token) {
    181135      Type type = typeIds[(int)token.TypeId];
    182       object value = ((IFormatter)serializerMapping[type]).Parse(token.SerialData);
     136      object value = ((IPrimitiveSerializer)serializerMapping[type]).Parse(token.SerialData);
    183137      if (token.Id != null)
    184138        id2obj[(int)token.Id] = value;
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/PersistenceException.cs

    r1659 r1823  
    33using HeuristicLab.Persistence.Interfaces;
    44using HeuristicLab.Persistence.Core.Tokens;
    5 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     5using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    66
    77namespace HeuristicLab.Persistence.Core {
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/PrimitiveSerializerBase.cs

    r1805 r1823  
    44namespace HeuristicLab.Persistence.Interfaces {
    55
    6   public abstract class FormatterBase<Source, SerialData> : IFormatter<Source, SerialData> where SerialData : ISerialData {
     6  public abstract class PrimitiveSerializerBase<Source, SerialData> :
     7      IPrimitiveSerializer<Source, SerialData>
     8      where SerialData : ISerialData {
    79
    810    public abstract SerialData Format(Source o);
     
    1416    public Type SourceType { get { return typeof(Source); } }
    1517
    16     ISerialData IFormatter.Format(object o) {
     18    ISerialData IPrimitiveSerializer.Format(object o) {
    1719      return Format((Source)o);
    1820    }
    1921
    20     object IFormatter.Parse(ISerialData o) {
     22    object IPrimitiveSerializer.Parse(ISerialData o) {
    2123      return Parse((SerialData)o);
    2224    }
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/Serializer.cs

    r1797 r1823  
    66using HeuristicLab.Persistence.Interfaces;
    77using HeuristicLab.Persistence.Core.Tokens;
    8 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     8using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    99using System.Text;
    1010using System.Reflection;
     
    1717    class ReferenceEqualityComparer : IEqualityComparer<object> {
    1818
    19       public bool Equals(object a, object b) {
     19      public new bool Equals(object a, object b) {
    2020        return Object.ReferenceEquals(a, b);
    2121      }
     
    5656      foreach (var pair in typeCache) {
    5757        string serializer = null;
    58         IFormatter f = configuration.GetFormatter(pair.Key);
     58        IPrimitiveSerializer f = configuration.GetPrimitiveSerializer(pair.Key);
    5959        if (f != null) {
    6060          serializer = f.GetType().AssemblyQualifiedName;
    6161          assemblies[f.GetType().Assembly] = true;
    6262        } else {
    63           IDecomposer d = configuration.GetDecomposer(pair.Key);
     63          ICompositeSerializer d = configuration.GetCompositeSerializer(pair.Key);
    6464          serializer = d.GetType().AssemblyQualifiedName;
    6565          assemblies[d.GetType().Assembly] = true;
     
    109109        obj2id.Add(value, (int)id);
    110110      }
    111       IFormatter formatter = configuration.GetFormatter(type);
    112       if (formatter != null)
    113         return PrimitiveEnumerator(accessor.Name, typeId, formatter.Format(value), id);
    114       IDecomposer decomposer = configuration.GetDecomposer(type);
    115       if (decomposer != null)
    116         return CompositeEnumerator(accessor.Name, decomposer.Decompose(value), id, typeId, decomposer.CreateMetaInfo(value));
     111      IPrimitiveSerializer primitiveSerializer = configuration.GetPrimitiveSerializer(type);
     112      if (primitiveSerializer != null)
     113        return PrimitiveEnumerator(accessor.Name, typeId, primitiveSerializer.Format(value), id);
     114      ICompositeSerializer compositeSerializer = configuration.GetCompositeSerializer(type);
     115      if (compositeSerializer != null)
     116        return CompositeEnumerator(accessor.Name, compositeSerializer.Decompose(value), id, typeId, compositeSerializer.CreateMetaInfo(value));
    117117      throw new PersistenceException(
    118118          String.Format(
    119119          "No suitable method for serializing values of type \"{0}\" found\r\n" +
    120           "Formatters:\r\n{1}\r\n" +
    121           "Decomposers:\r\n{2}",
     120          "primitive serializers:\r\n{1}\r\n" +
     121          "composite serializers:\r\n{2}",
    122122          value.GetType().VersionInvariantName(),
    123           string.Join("\r\n", configuration.Formatters.Select(f => f.GetType().VersionInvariantName()).ToArray()),
    124           string.Join("\r\n", configuration.Decomposers.Select(d => d.GetType().VersionInvariantName()).ToArray())
     123          string.Join("\r\n", configuration.PrimitiveSerializers.Select(f => f.GetType().VersionInvariantName()).ToArray()),
     124          string.Join("\r\n", configuration.CompositeSerializers.Select(d => d.GetType().VersionInvariantName()).ToArray())
    125125          ));
    126126
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/ArraySerializer.cs

    r1805 r1823  
    33using HeuristicLab.Persistence.Interfaces;
    44using System.Collections.Generic;
    5 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     5using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    66
    7 namespace HeuristicLab.Persistence.Default.Decomposers {
     7namespace HeuristicLab.Persistence.Default.CompositeSerializers {
    88
    99  [EmptyStorableClass]
    10   public class ArrayDecomposer : IDecomposer {
     10  public class ArraySerializer : ICompositeSerializer {
    1111
    1212    public int Priority {
     
    1414    }
    1515
    16     public bool CanDecompose(Type type) {
     16    public bool CanSerialize(Type type) {
    1717      return type.IsArray || type == typeof(Array);
    1818    }
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/CompactNumberArray2StringSerializer.cs

    r1805 r1823  
    66using System.Globalization;
    77using System.Text;
    8 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     8using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    99
    10 namespace HeuristicLab.Persistence.Default.Decomposers {
     10namespace HeuristicLab.Persistence.Default.CompositeSerializers {
    1111
    1212  [EmptyStorableClass]
    13   public class CompactNumberArray2StringDecomposer : IDecomposer {
     13  public class CompactNumberArray2StringSerializer : ICompositeSerializer {
    1414
    1515    public int Priority {
     
    1717    }
    1818
    19     private static readonly Number2StringDecomposer numberConverter =
    20       new Number2StringDecomposer();
     19    private static readonly Number2StringSerializer numberConverter =
     20      new Number2StringSerializer();
    2121
    22     public bool CanDecompose(Type type) {
     22    public bool CanSerialize(Type type) {
    2323      return
    2424        (type.IsArray || type == typeof(Array)) &&
    25         numberConverter.CanDecompose(type.GetElementType());
     25        numberConverter.CanSerialize(type.GetElementType());
    2626    }
    2727
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/DictionarySerializer.cs

    r1805 r1823  
    44using HeuristicLab.Persistence.Interfaces;
    55using System.Collections.Generic;
    6 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     6using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    77using HeuristicLab.Persistence.Auxiliary;
    88
    9 namespace HeuristicLab.Persistence.Default.Decomposers {
     9namespace HeuristicLab.Persistence.Default.CompositeSerializers {
    1010
    1111  [EmptyStorableClass]
    12   public class DictionaryDecomposer : IDecomposer {
     12  public class DictionarySerializer : ICompositeSerializer {
    1313
    1414    public int Priority {
     
    1717
    1818
    19     public bool CanDecompose(Type type) {
     19    public bool CanSerialize(Type type) {
    2020      return ReflectionTools.HasDefaultConstructor(type) &&
    2121        type.GetInterface(typeof(IDictionary).FullName) != null;
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/EnumSerializer.cs

    r1805 r1823  
    33using HeuristicLab.Persistence.Interfaces;
    44using System.Collections.Generic;
    5 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     5using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    66
    7 namespace HeuristicLab.Persistence.Default.Decomposers {
     7namespace HeuristicLab.Persistence.Default.CompositeSerializers {
    88
    99  [EmptyStorableClass]
    10   public class EnumDecomposer : IDecomposer {
     10  public class EnumSerializer : ICompositeSerializer {
    1111
    1212    public int Priority {
     
    1414    }
    1515
    16     public bool CanDecompose(Type type) {
     16    public bool CanSerialize(Type type) {
    1717      return type.IsEnum || type == typeof(Enum);
    1818    }
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/EnumerableSerializer.cs

    r1805 r1823  
    55using HeuristicLab.Persistence.Interfaces;
    66using System.Collections.Generic;
    7 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     7using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    88using HeuristicLab.Persistence.Auxiliary;
    99
    10 namespace HeuristicLab.Persistence.Default.Decomposers {
     10namespace HeuristicLab.Persistence.Default.CompositeSerializers {
    1111
    1212  [EmptyStorableClass]
    13   public class EnumerableDecomposer : IDecomposer {
     13  public class EnumerableSerializer : ICompositeSerializer {
    1414
    1515    public int Priority {
     
    1818
    1919
    20     public bool CanDecompose(Type type) {
     20    public bool CanSerialize(Type type) {
    2121      return
    2222        ReflectionTools.HasDefaultConstructor(type) &&
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/KeyValuePairSerializer.cs

    r1805 r1823  
    55using HeuristicLab.Persistence.Interfaces;
    66using System.Reflection;
    7 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     7using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    88
    9 namespace HeuristicLab.Persistence.Default.Decomposers {
     9namespace HeuristicLab.Persistence.Default.CompositeSerializers {
    1010
    1111  [EmptyStorableClass]
    12   public class KeyValuePairDecomposer : IDecomposer {
     12  public class KeyValuePairSerializer : ICompositeSerializer {
    1313
    1414    public int Priority {
     
    1717
    1818
    19     public bool CanDecompose(Type type) {
     19    public bool CanSerialize(Type type) {
    2020      return type.IsGenericType &&
    2121             type.GetGenericTypeDefinition() ==
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Number2StringSerializer.cs

    r1805 r1823  
    88using System.Text;
    99
    10 namespace HeuristicLab.Persistence.Default.Decomposers {
     10namespace HeuristicLab.Persistence.Default.CompositeSerializers {
    1111
    12   public class Number2StringDecomposer : IDecomposer {
     12  public class Number2StringSerializer : ICompositeSerializer {
    1313
    1414    private static readonly List<Type> numberTypes =
     
    3030    private static readonly Dictionary<Type, MethodInfo> numberParsers;
    3131
    32     static Number2StringDecomposer() {
     32    static Number2StringSerializer() {
    3333      numberParsers = new Dictionary<Type, MethodInfo>();
    3434      foreach (var type in numberTypes) {
     
    3939    }
    4040
    41     public bool CanDecompose(Type type) {
     41    public bool CanSerialize(Type type) {
    4242      return numberParsers.ContainsKey(type);
    4343    }
     
    6666    }
    6767
    68 
    69     #region IDecomposer Members
    7068
    7169    public int Priority {
     
    9997      // numbers are composed just of meta info, no need to populate
    10098    }
    101 
    102     #endregion
    10399  }
    104 
    105100}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/NumberEnumerable2StringSerializer.cs

    r1805 r1823  
    66using System.Globalization;
    77using System.Text;
    8 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     8using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    99using HeuristicLab.Persistence.Auxiliary;
    1010
    11 namespace HeuristicLab.Persistence.Default.Decomposers {
     11namespace HeuristicLab.Persistence.Default.CompositeSerializers {
    1212
    1313  [EmptyStorableClass]
    14   public class NumberEnumerable2StringDecomposer : IDecomposer {
     14  public class NumberEnumerable2StringSerializer : ICompositeSerializer {
    1515
    1616    public int Priority {
     
    1818    }
    1919
    20     private static readonly Number2StringDecomposer numberConverter =
    21       new Number2StringDecomposer();
     20    private static readonly Number2StringSerializer numberConverter =
     21      new Number2StringSerializer();
    2222
    2323    private static readonly Dictionary<Type, Type> interfaceCache = new Dictionary<Type, Type>();
     
    2929        if (iface.IsGenericType &&
    3030          iface.GetGenericTypeDefinition() == typeof(IEnumerable<>) &&
    31           numberConverter.CanDecompose(iface.GetGenericArguments()[0])) {
     31          numberConverter.CanSerialize(iface.GetGenericArguments()[0])) {
    3232          interfaceCache.Add(type, iface);
    3333          return iface;
     
    5353    }
    5454
    55     public bool CanDecompose(Type type) {
     55    public bool CanSerialize(Type type) {
    5656      return
    5757        ReflectionTools.HasDefaultConstructor(type) &&
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/StackSerializer.cs

    r1805 r1823  
    55using HeuristicLab.Persistence.Interfaces;
    66using System.Collections.Generic;
    7 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     7using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    88using System.IO;
    99
    10 namespace HeuristicLab.Persistence.Default.Decomposers {
     10namespace HeuristicLab.Persistence.Default.CompositeSerializers {
    1111
    1212  [EmptyStorableClass]
    13   public class StackDecomposer : IDecomposer {
     13  public class StackSerializer : ICompositeSerializer {
    1414
    1515    public int Priority {
     
    1818
    1919
    20     public bool CanDecompose(Type type) {
     20    public bool CanSerialize(Type type) {
    2121      return type == typeof(Stack) ||
    2222        type.IsGenericType &&
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/DataMemberAccessor.cs

    r1625 r1823  
    33using HeuristicLab.Persistence.Core;
    44
    5 namespace HeuristicLab.Persistence.Default.Decomposers.Storable {
     5namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable {
    66
    77  public class DataMemberAccessor {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/EmptyStorableClassAttribute.cs

    r1652 r1823  
    33using System.Reflection;
    44
    5 namespace HeuristicLab.Persistence.Default.Decomposers.Storable {
     5namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable {
    66
    77
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableAttribute.cs

    r1623 r1823  
    33using System.Reflection;
    44
    5 namespace HeuristicLab.Persistence.Default.Decomposers.Storable {
     5namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable {
    66
    77  [AttributeUsage(
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableSerializer.cs

    r1805 r1823  
    77using HeuristicLab.Persistence.Auxiliary;
    88
    9 namespace HeuristicLab.Persistence.Default.Decomposers.Storable {
     9namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable {
    1010
    1111  [EmptyStorableClass]
    12   public class StorableDecomposer : IDecomposer {
     12  public class StorableSerializer : ICompositeSerializer {
    1313
    1414    public int Priority {
     
    1616    }
    1717
    18     public bool CanDecompose(Type type) {
     18    public bool CanSerialize(Type type) {
    1919      return ReflectionTools.HasDefaultConstructor(type) &&
    2020        (StorableAttribute.GetStorableMembers(type, false).Count() > 0 ||
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/TypeSerializer.cs

    r1805 r1823  
    44using HeuristicLab.Persistence.Interfaces;
    55using System.Collections.Generic;
    6 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     6using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    77
    8 namespace HeuristicLab.Persistence.Default.Decomposers {
     8namespace HeuristicLab.Persistence.Default.CompositeSerializers {
    99
    1010  [EmptyStorableClass]
    11   public class TypeDecomposer : IDecomposer {
     11  public class TypeSerializer : ICompositeSerializer {
    1212
    1313    public int Priority {
     
    1515    }
    1616
    17     public bool CanDecompose(Type type) {
     17    public bool CanSerialize(Type type) {
    1818      return type == typeof(Type) ||
    1919             type.VersionInvariantName() == "System.RuntimeType, mscorlib";
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/DebugString.cs

    r1659 r1823  
    66using HeuristicLab.Persistence.Core;
    77using HeuristicLab.Persistence.Core.Tokens;
    8 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     8using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    99
    1010namespace HeuristicLab.Persistence.Default.DebugString {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/DebugStringFormat.cs

    r1659 r1823  
    66using HeuristicLab.Persistence.Core;
    77using HeuristicLab.Persistence.Core.Tokens;
    8 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     8using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    99
    1010namespace HeuristicLab.Persistence.Default.DebugString {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Bool2DebugStringSerializer.cs

    r1805 r1823  
    66using HeuristicLab.Persistence.Core;
    77using HeuristicLab.Persistence.Core.Tokens;
    8 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     8using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    99
    10 namespace HeuristicLab.Persistence.Default.DebugString.Formatters {
     10namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1111
    1212  [EmptyStorableClass]
    13   public class Bool2DebugStringFormatter : DebugStringFormatterBase<bool> { }
     13  public class Bool2DebugStringSerializer : DebugStringSerializerBase<bool> { }
    1414
    1515}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Byte2DebugStringSerializer.cs

    r1805 r1823  
    66using HeuristicLab.Persistence.Core;
    77using HeuristicLab.Persistence.Core.Tokens;
    8 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     8using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    99
    10 namespace HeuristicLab.Persistence.Default.DebugString.Formatters {
     10namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1111
    1212  [EmptyStorableClass]
    13   public class Byte2DebugStringFormatter : DebugStringFormatterBase<byte> { }
     13  public class Byte2DebugStringSerializer : DebugStringSerializerBase<byte> { }
    1414
    1515}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Char2DebugStringSerializer.cs

    r1805 r1823  
    66using HeuristicLab.Persistence.Core;
    77using HeuristicLab.Persistence.Core.Tokens;
    8 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     8using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    99
    10 namespace HeuristicLab.Persistence.Default.DebugString.Formatters {
     10namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1111
    1212  [EmptyStorableClass]
    13   public class Char2DebugStringFormatter : DebugStringFormatterBase<char> { }
     13  public class Char2DebugStringSerializer : DebugStringSerializerBase<char> { }
    1414
    1515}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/DateTime2DebugStringSerializer.cs

    r1805 r1823  
    66using HeuristicLab.Persistence.Core;
    77using HeuristicLab.Persistence.Core.Tokens;
    8 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     8using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    99
    10 namespace HeuristicLab.Persistence.Default.DebugString.Formatters {
     10namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1111
    1212  [EmptyStorableClass]
    13   public class DateTime2DebugStringFormatter : DebugStringFormatterBase<DateTime> { }
     13  public class DateTime2DebugStringSerializer : DebugStringSerializerBase<DateTime> { }
    1414
    1515}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Doubld2DebugStringSerializer.cs

    r1805 r1823  
    66using HeuristicLab.Persistence.Core;
    77using HeuristicLab.Persistence.Core.Tokens;
    8 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     8using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    99
    10 namespace HeuristicLab.Persistence.Default.DebugString.Formatters {
     10namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1111
    1212  [EmptyStorableClass]
    13   public class Double2DebugStringFormatter : DebugStringFormatterBase<double> { }
     13  public class Double2DebugStringSerializer : DebugStringSerializerBase<double> { }
    1414
    1515}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Float2DebugStringSerializer.cs

    r1805 r1823  
    66using HeuristicLab.Persistence.Core;
    77using HeuristicLab.Persistence.Core.Tokens;
    8 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     8using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    99
    10 namespace HeuristicLab.Persistence.Default.DebugString.Formatters {
     10namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1111
    1212  [EmptyStorableClass]
    13   public class Float2DebugStringFormatter : DebugStringFormatterBase<float> { }
     13  public class Float2DebugStringSerializer : DebugStringSerializerBase<float> { }
    1414
    1515}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Int2DebugStringSerializer.cs

    r1805 r1823  
    66using HeuristicLab.Persistence.Core;
    77using HeuristicLab.Persistence.Core.Tokens;
    8 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     8using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    99
    10 namespace HeuristicLab.Persistence.Default.DebugString.Formatters {
     10namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1111
    1212  [EmptyStorableClass]
    13   public class Int2DebugStringFormatter : DebugStringFormatterBase<int> { }
     13  public class Int2DebugStringSerializer : DebugStringSerializerBase<int> { }
    1414
    1515}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Long2DebugStringSerializer.cs

    r1805 r1823  
    66using HeuristicLab.Persistence.Core;
    77using HeuristicLab.Persistence.Core.Tokens;
    8 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     8using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    99
    10 namespace HeuristicLab.Persistence.Default.DebugString.Formatters {
     10namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1111
    1212  [EmptyStorableClass]
    13   public class Long2DebugStringFormatter : DebugStringFormatterBase<long> { }
     13  public class Long2DebugStringSerializer : DebugStringSerializerBase<long> { }
    1414
    1515}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/SByte2DebugStringSerializer.cs

    r1805 r1823  
    66using HeuristicLab.Persistence.Core;
    77using HeuristicLab.Persistence.Core.Tokens;
    8 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     8using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    99
    10 namespace HeuristicLab.Persistence.Default.DebugString.Formatters {
     10namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1111
    1212  [EmptyStorableClass]
    13   public class SByte2DebugStringFormatter : DebugStringFormatterBase<sbyte> { }
     13  public class SByte2DebugStringSerializer : DebugStringSerializerBase<sbyte> { }
    1414
    1515}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Short2DebugStringSerializer.cs

    r1805 r1823  
    66using HeuristicLab.Persistence.Core;
    77using HeuristicLab.Persistence.Core.Tokens;
    8 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     8using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    99
    10 namespace HeuristicLab.Persistence.Default.DebugString.Formatters {
     10namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1111
    1212  [EmptyStorableClass]
    13   public class Short2DebugStringFormatter : DebugStringFormatterBase<short> { }
     13  public class Short2DebugStringSerializer : DebugStringSerializerBase<short> { }
    1414
    1515}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/String2DebugStringSerializer.cs

    r1805 r1823  
    66using HeuristicLab.Persistence.Core;
    77using HeuristicLab.Persistence.Core.Tokens;
    8 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     8using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    99
    10 namespace HeuristicLab.Persistence.Default.DebugString.Formatters {
     10namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1111
    1212  [EmptyStorableClass]
    13   public class String2DebugStringFormatter : DebugStringFormatterBase<string> { }
     13  public class String2DebugStringSerializer : DebugStringSerializerBase<string> { }
    1414
    1515}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Type2DebugStringSerializer.cs

    r1805 r1823  
    66using HeuristicLab.Persistence.Core;
    77using HeuristicLab.Persistence.Core.Tokens;
    8 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     8using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    99
    10 namespace HeuristicLab.Persistence.Default.DebugString.Formatters {
     10namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1111
    1212  [EmptyStorableClass]
    13   public class Type2DebugStringFormatter : DebugStringFormatterBase<Type> { }
     13  public class Type2DebugStringSerializer : DebugStringSerializerBase<Type> { }
    1414
    1515}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/UInt2DebugStringSerializer.cs

    r1805 r1823  
    66using HeuristicLab.Persistence.Core;
    77using HeuristicLab.Persistence.Core.Tokens;
    8 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     8using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    99
    10 namespace HeuristicLab.Persistence.Default.DebugString.Formatters {
     10namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1111
    1212  [EmptyStorableClass]
    13   public class UInt2DebugStringFormatter : DebugStringFormatterBase<uint> { }
     13  public class UInt2DebugStringSerializer : DebugStringSerializerBase<uint> { }
    1414
    1515}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/ULong2DebugStringSerializer.cs

    r1805 r1823  
    66using HeuristicLab.Persistence.Core;
    77using HeuristicLab.Persistence.Core.Tokens;
    8 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     8using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    99
    10 namespace HeuristicLab.Persistence.Default.DebugString.Formatters {
     10namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1111
    1212  [EmptyStorableClass]
    13   public class ULong2DebugStringFormatter : DebugStringFormatterBase<ulong> { }
     13  public class ULong2DebugStringSerializer : DebugStringSerializerBase<ulong> { }
    1414
    1515}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/UShort2DebugStringSerializer.cs

    r1805 r1823  
    66using HeuristicLab.Persistence.Core;
    77using HeuristicLab.Persistence.Core.Tokens;
    8 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     8using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    99
    10 namespace HeuristicLab.Persistence.Default.DebugString.Formatters {
     10namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1111
    1212  [EmptyStorableClass]
    13   public class UShort2DebugStringFormatter : DebugStringFormatterBase<ushort> { }
     13  public class UShort2DebugStringSerializer : DebugStringSerializerBase<ushort> { }
    1414
    1515}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/ValueType2DebugStringSerializerBase.cs

    r1805 r1823  
    77using HeuristicLab.Persistence.Core.Tokens;
    88
    9 namespace HeuristicLab.Persistence.Default.DebugString.Formatters {
     9namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
    1010
    11   public abstract class DebugStringFormatterBase<T> : FormatterBase<T, DebugString> {
     11  public abstract class DebugStringSerializerBase<T> : PrimitiveSerializerBase<T, DebugString> {
    1212    public override DebugString Format(T o) { return new DebugString(o.ToString()); }
    1313    public override T Parse(DebugString s) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/CompactXmlSerializerBase.cs

    r1805 r1823  
    11using HeuristicLab.Persistence.Interfaces;
    22using HeuristicLab.Persistence.Core;
    3 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     3using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    44
    55namespace HeuristicLab.Persistence.Default.Xml.Compact {
    66
    7   public abstract class CompactXmlFormatterBase<T> : XmlFormatterBase<T> { }
     7  public abstract class CompactXmlSerializerBase<T> : XmlSerializerBase<T> { }
    88
    99}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/DoubleArray2XmlSerializer.cs

    r1805 r1823  
    22using HeuristicLab.Persistence.Core;
    33using System.Globalization;
    4 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     4using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    55
    66namespace HeuristicLab.Persistence.Default.Xml.Compact {
    77
    8   public abstract class DoubleArray2XmlFormatterBase<T> : NumberArray2XmlFormatterBase<T> where T : class{
     8  public abstract class DoubleArray2XmlSerializerBase<T> : NumberArray2XmlSerializerBase<T> where T : class{
    99
    1010    protected override string FormatValue(object o) {
     
    1818
    1919  [EmptyStorableClass]
    20   public class Double1DArray2XmlFormatter : DoubleArray2XmlFormatterBase<double[]> { }
     20  public class Double1DArray2XmlSerializer : DoubleArray2XmlSerializerBase<double[]> { }
    2121
    2222
    2323  [EmptyStorableClass]
    24   public class Double2DArray2XmlFormatter : DoubleArray2XmlFormatterBase<double[,]> { }
     24  public class Double2DArray2XmlSerializer : DoubleArray2XmlSerializerBase<double[,]> { }
    2525
    2626  [EmptyStorableClass]
    27   public class Double3DArray2XmlFormatter : DoubleArray2XmlFormatterBase<double[, ,]> { }
     27  public class Double3DArray2XmlSerializer : DoubleArray2XmlSerializerBase<double[, ,]> { }
    2828
    2929}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/DoubleList2XmlSerializer.cs

    r1805 r1823  
    44using HeuristicLab.Persistence.Core;
    55using System.Globalization;
    6 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     6using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    77
    88namespace HeuristicLab.Persistence.Default.Xml.Compact {
    99
    1010  [EmptyStorableClass]
    11   public class DoubleList2XmlFormatter : NumberEnumeration2XmlFormatterBase<List<double>> {
     11  public class DoubleList2XmlSerializer : NumberEnumeration2XmlSerializerBase<List<double>> {
    1212
    1313    protected override void Add(IEnumerable enumeration, object o) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/IntArray2XmlSerializer.cs

    r1805 r1823  
    11using System;
    22using HeuristicLab.Persistence.Core;
    3 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     3using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    44
    55namespace HeuristicLab.Persistence.Default.Xml.Compact {
    66
    7   public abstract class IntArray2XmlFormatterBase<T> : NumberArray2XmlFormatterBase<T> where T : class{
     7  public abstract class IntArray2XmlSerializerBase<T> : NumberArray2XmlSerializerBase<T> where T : class{
    88
    99    protected override string FormatValue(object o) {
     
    1717
    1818  [EmptyStorableClass]
    19   public class Int1DArray2XmlFormatter : IntArray2XmlFormatterBase<int[]> { }
     19  public class Int1DArray2XmlSerializer : IntArray2XmlSerializerBase<int[]> { }
    2020
    2121  [EmptyStorableClass]
    22   public class Int2DArray2XmlFormatter : IntArray2XmlFormatterBase<int[,]> { }
     22  public class Int2DArray2XmlSerializer : IntArray2XmlSerializerBase<int[,]> { }
    2323
    2424  [EmptyStorableClass]
    25   public class Int3DArray2XmlFormatter : IntArray2XmlFormatterBase<int[, ,]> { }
     25  public class Int3DArray2XmlSerializer : IntArray2XmlSerializerBase<int[, ,]> { }
    2626
    2727}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/IntList2XmlSerializer.cs

    r1805 r1823  
    33using System;
    44using HeuristicLab.Persistence.Core;
    5 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     5using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    66
    77namespace HeuristicLab.Persistence.Default.Xml.Compact {
    88
    99  [EmptyStorableClass]
    10   public class IntList2XmlFormatter : NumberEnumeration2XmlFormatterBase<List<int>> {
     10  public class IntList2XmlSerializer : NumberEnumeration2XmlSerializerBase<List<int>> {
    1111
    1212    protected override void Add(IEnumerable enumeration, object o) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/NumberArray2XmlSerializerBase.cs

    r1805 r1823  
    77namespace HeuristicLab.Persistence.Default.Xml.Compact {
    88
    9   public abstract class NumberArray2XmlFormatterBase<T> : CompactXmlFormatterBase<T> where T : class {
     9  public abstract class NumberArray2XmlSerializerBase<T> : CompactXmlSerializerBase<T> where T : class {
    1010
    1111    protected virtual string Separator { get { return ";"; } }
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/NumberEnumeration2XmlSerializerBase.cs

    r1805 r1823  
    77namespace HeuristicLab.Persistence.Default.Xml.Compact {
    88
    9   public abstract class NumberEnumeration2XmlFormatterBase<T> : CompactXmlFormatterBase<T> where T : IEnumerable {
     9  public abstract class NumberEnumeration2XmlSerializerBase<T> : CompactXmlSerializerBase<T> where T : IEnumerable {
    1010
    1111    protected virtual string Separator { get { return ";"; } }
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Bool2XmlSerializer.cs

    r1805 r1823  
    44using System.Reflection;
    55using System.Globalization;
    6 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     6using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    77
    88namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    99
    1010  [EmptyStorableClass]
    11   public class Bool2XmlFormatter : SimpleNumber2XmlFormatterBase<bool> { }
     11  public class Bool2XmlSerializer : SimpleNumber2XmlSerializerBase<bool> { }
    1212
    1313}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Byte2XmlSerializer.cs

    r1805 r1823  
    44using System.Reflection;
    55using System.Globalization;
    6 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     6using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    77
    88namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    99
    1010  [EmptyStorableClass]
    11   public class Byte2XmlFormatter : SimpleNumber2XmlFormatterBase<byte> { }
     11  public class Byte2XmlSerializer : SimpleNumber2XmlSerializerBase<byte> { }
    1212
    1313}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Char2XmlFormatter.cs

    r1652 r1823  
    44using System.Reflection;
    55using System.Globalization;
    6 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     6using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    77
    88namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    99
    1010  [EmptyStorableClass]
    11   public class Char2XmlFormatter : FormatterBase<char, XmlString> { 
     11  public class Char2XmlSerializer : PrimitiveSerializerBase<char, XmlString> { 
    1212   
    1313    public override XmlString Format(char c) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/DateTime2XmlSerializer.cs

    r1805 r1823  
    22using HeuristicLab.Persistence.Core;
    33using HeuristicLab.Persistence.Interfaces;
    4 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     4using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    55
    66namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    77
    88  [EmptyStorableClass]
    9   public class DateTime2XmlFormatter : PrimitiveXmlFormatterBase<DateTime> {
     9  public class DateTime2XmlSerializer : PrimitiveXmlSerializerBase<DateTime> {
    1010
    1111    public override XmlString Format(DateTime dt) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Decimal2XmlSerializer.cs

    r1805 r1823  
    44using System.Reflection;
    55using System.Globalization;
    6 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     6using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    77
    88namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    99
    1010  [EmptyStorableClass]
    11   public class Decimal2XmlFormatter : DecimalNumber2XmlFormatterBase<decimal> { }
     11  public class Decimal2XmlSerializer : DecimalNumber2XmlSerializerBase<decimal> { }
    1212
    1313}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/DecimalNumber2XmlSerializerBase.cs

    r1805 r1823  
    77namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    88
    9   public abstract class DecimalNumber2XmlFormatterBase<T> : PrimitiveXmlFormatterBase<T> {
     9  public abstract class DecimalNumber2XmlSerializerBase<T> : PrimitiveXmlSerializerBase<T> {
    1010
    1111    private static MethodInfo ToStringMethod = typeof(T)
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Double2XmlSerializer.cs

    r1805 r1823  
    44using System.Reflection;
    55using System.Globalization;
    6 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     6using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    77
    88namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    99
    1010  [EmptyStorableClass]
    11   public class Double2XmlFormatter : DecimalNumber2XmlFormatterBase<double> { }
     11  public class Double2XmlSerializer : DecimalNumber2XmlSerializerBase<double> { }
    1212
    1313}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Float2XmlSerializer.cs

    r1805 r1823  
    44using System.Reflection;
    55using System.Globalization;
    6 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     6using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    77
    88namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    99
    1010  [EmptyStorableClass]
    11   public class Float2XmlFormatter : DecimalNumber2XmlFormatterBase<float> { }
     11  public class Float2XmlSerializer : DecimalNumber2XmlSerializerBase<float> { }
    1212
    1313}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Guid2XmlSerializer.cs

    r1805 r1823  
    44using System.Text;
    55using System.Text.RegularExpressions;
    6 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     6using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    77using System.Globalization;
    88
     
    1111 
    1212  [EmptyStorableClass]
    13   public class Guid2XmlFormatter : PrimitiveXmlFormatterBase<Guid> {
     13  public class Guid2XmlSerializer : PrimitiveXmlSerializerBase<Guid> {
    1414
    1515    public override XmlString Format(Guid o) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Int2XmlSerializer.cs

    r1805 r1823  
    44using System.Reflection;
    55using System.Globalization;
    6 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     6using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    77
    88namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    99
    1010  [EmptyStorableClass]
    11   public class Int2XmlFormatter : SimpleNumber2XmlFormatterBase<int> { }
     11  public class Int2XmlSerializer : SimpleNumber2XmlSerializerBase<int> { }
    1212
    1313}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Long2XmlSerializer.cs

    r1805 r1823  
    44using System.Reflection;
    55using System.Globalization;
    6 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     6using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    77
    88namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    99
    1010  [EmptyStorableClass]
    11   public class Long2XmlFormatter : SimpleNumber2XmlFormatterBase<long> { }
     11  public class Long2XmlSerializer : SimpleNumber2XmlSerializerBase<long> { }
    1212
    1313}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/PrimitiveXmlSerializerBase.cs

    r1805 r1823  
    11using HeuristicLab.Persistence.Interfaces;
    22using HeuristicLab.Persistence.Core;
    3 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     3using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    44
    55namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    66
    7   public abstract class PrimitiveXmlFormatterBase<T> : XmlFormatterBase<T> { }
     7  public abstract class PrimitiveXmlSerializerBase<T> : XmlSerializerBase<T> { }
    88
    99}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/SByte2XmlSerializer.cs

    r1805 r1823  
    44using System.Reflection;
    55using System.Globalization;
    6 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     6using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    77
    88namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    99
    1010  [EmptyStorableClass]
    11   public class SByte2XmlFormatter : SimpleNumber2XmlFormatterBase<sbyte> { }
     11  public class SByte2XmlSerializer : SimpleNumber2XmlSerializerBase<sbyte> { }
    1212
    1313}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Short2XmlSerializer.cs

    r1805 r1823  
    44using System.Reflection;
    55using System.Globalization;
    6 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     6using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    77
    88namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    99
    1010  [EmptyStorableClass]
    11   public class Short2XmlFormatter : SimpleNumber2XmlFormatterBase<short> { }
     11  public class Short2XmlSerializer : SimpleNumber2XmlSerializerBase<short> { }
    1212
    1313}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/SimpleNumber2XmlSerializerBase.cs

    r1805 r1823  
    77namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    88
    9   public abstract class SimpleNumber2XmlFormatterBase<T> : PrimitiveXmlFormatterBase<T> {
     9  public abstract class SimpleNumber2XmlSerializerBase<T> : PrimitiveXmlSerializerBase<T> {
    1010
    1111    private static MethodInfo ParseMethod = typeof(T)
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/String2XmlSerializer.cs

    r1805 r1823  
    44using System.Text;
    55using System.Text.RegularExpressions;
    6 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     6using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    77using System.Globalization;
    88
     
    1111
    1212  [EmptyStorableClass]
    13   public class String2XmlFormatter : PrimitiveXmlFormatterBase<string> {
     13  public class String2XmlSerializer : PrimitiveXmlSerializerBase<string> {
    1414
    1515    public override XmlString Format(string s) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/TimeSpan2XmlSerializer.cs

    r1805 r1823  
    44using System.Text;
    55using System.Text.RegularExpressions;
    6 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     6using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    77using System.Globalization;
    88
     
    1111
    1212  [EmptyStorableClass]
    13   public class TimeSpan2XmlFormatter : PrimitiveXmlFormatterBase<TimeSpan> {
     13  public class TimeSpan2XmlSerializer : PrimitiveXmlSerializerBase<TimeSpan> {
    1414
    1515    public override XmlString Format(TimeSpan o) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/UInt2XmlSerializer.cs

    r1805 r1823  
    44using System.Reflection;
    55using System.Globalization;
    6 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     6using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    77
    88namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    99
    1010  [EmptyStorableClass]
    11   public class UInt2XmlFormatter : SimpleNumber2XmlFormatterBase<uint> { }
     11  public class UInt2XmlSerializer : SimpleNumber2XmlSerializerBase<uint> { }
    1212
    1313}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/ULong2XmlSerializer.cs

    r1805 r1823  
    44using System.Reflection;
    55using System.Globalization;
    6 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     6using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    77
    88namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    99
    1010  [EmptyStorableClass]
    11   public class ULong2XmlFormatter : SimpleNumber2XmlFormatterBase<ulong> { }
     11  public class ULong2XmlSerializer : SimpleNumber2XmlSerializerBase<ulong> { }
    1212
    1313}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/UShort2XmlSerializer.cs

    r1805 r1823  
    44using System.Reflection;
    55using System.Globalization;
    6 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     6using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    77
    88namespace HeuristicLab.Persistence.Default.Xml.Primitive {
    99
    1010  [EmptyStorableClass]
    11   public class UShort2XmlFormatter : SimpleNumber2XmlFormatterBase<ushort> { }
     11  public class UShort2XmlSerializer : SimpleNumber2XmlSerializerBase<ushort> { }
    1212
    1313}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlFormat.cs

    r1623 r1823  
    11using HeuristicLab.Persistence.Interfaces;
    22using HeuristicLab.Persistence.Core;
    3 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     3using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    44
    55namespace HeuristicLab.Persistence.Default.Xml {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlGenerator.cs

    r1797 r1823  
    170170        File.Copy(tempfile, filename, true);
    171171        File.Delete(tempfile);
    172       } catch (Exception x) {
     172      } catch (Exception) {
    173173        Logger.Warn("Exception caught, no data has been written.");
    174174        throw;
     
    222222          }
    223223        }
    224       } catch (PersistenceException e) {
     224      } catch (PersistenceException) {
    225225        throw;
    226226      } catch (Exception e) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlParser.cs

    r1779 r1823  
    115115        }
    116116        return typeCache;
    117       } catch (PersistenceException e) {
     117      } catch (PersistenceException) {
    118118        throw;
    119119      } catch (Exception e) {
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlSerializerBase.cs

    r1805 r1823  
    11using HeuristicLab.Persistence.Interfaces;
    22using HeuristicLab.Persistence.Core;
    3 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     3using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    44
    55namespace HeuristicLab.Persistence.Default.Xml {
    66 
    7   public abstract class XmlFormatterBase<T> : FormatterBase<T, XmlString> { }
     7  public abstract class XmlSerializerBase<T> : PrimitiveSerializerBase<T, XmlString> { }
    88
    99}
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlString.cs

    r1623 r1823  
    22using HeuristicLab.Persistence.Core;
    33using System.Text;
    4 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     4using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    55
    66namespace HeuristicLab.Persistence.Default.Xml {
  • trunk/sources/HeuristicLab.Persistence/3.3/HeuristicLab.Persistence-3.3.csproj

    r1795 r1823  
    9393  </ItemGroup>
    9494  <ItemGroup>
     95    <Compile Include="Auxiliary\TypeLoader.cs" />
    9596    <Compile Include="Auxiliary\TypeNameParser.cs" />
    9697    <Compile Include="Auxiliary\ReflectionTools.cs" />
    9798    <Compile Include="Core\Configuration.cs" />
    9899    <Compile Include="Core\PersistenceException.cs" />
    99     <Compile Include="Default\DebugString\Formatters\Char2DebugStringFormatter.cs" />
    100     <Compile Include="Default\Decomposers\StackDecomposer.cs" />
    101     <Compile Include="Default\Decomposers\Number2StringConverter.cs" />
    102     <Compile Include="Default\Decomposers\Storable\EmptyStorableClassAttribute.cs" />
     100    <Compile Include="Core\PrimitiveSerializerBase.cs" />
    103101    <Compile Include="Core\FormatBase.cs" />
    104     <Compile Include="Core\FormatterBase.cs" />
    105102    <Compile Include="Auxiliary\TypeExtensions.cs" />
    106103    <Compile Include="Core\TypeMapping.cs" />
    107104    <Compile Include="Auxiliary\TypeName.cs" />
    108105    <Compile Include="Core\GeneratorBase.cs" />
     106    <Compile Include="Default\CompositeSerializers\ArraySerializer.cs" />
     107    <Compile Include="Default\CompositeSerializers\CompactNumberArray2StringSerializer.cs" />
     108    <Compile Include="Default\CompositeSerializers\DictionarySerializer.cs" />
     109    <Compile Include="Default\CompositeSerializers\EnumerableSerializer.cs" />
     110    <Compile Include="Default\CompositeSerializers\EnumSerializer.cs" />
     111    <Compile Include="Default\CompositeSerializers\KeyValuePairSerializer.cs" />
     112    <Compile Include="Default\CompositeSerializers\Number2StringSerializer.cs" />
     113    <Compile Include="Default\CompositeSerializers\NumberEnumerable2StringSerializer.cs" />
     114    <Compile Include="Default\CompositeSerializers\StackSerializer.cs" />
     115    <Compile Include="Default\CompositeSerializers\Storable\DataMemberAccessor.cs" />
     116    <Compile Include="Default\CompositeSerializers\Storable\EmptyStorableClassAttribute.cs" />
     117    <Compile Include="Default\CompositeSerializers\Storable\StorableAttribute.cs" />
     118    <Compile Include="Default\CompositeSerializers\Storable\StorableSerializer.cs" />
     119    <Compile Include="Default\CompositeSerializers\TypeSerializer.cs" />
    109120    <Compile Include="Default\DebugString\DebugString.cs" />
    110121    <Compile Include="Default\DebugString\DebugStringFormat.cs" />
    111     <Compile Include="Default\DebugString\Formatters\SByte2DebugStringFormatter.cs" />
    112     <Compile Include="Default\DebugString\Formatters\UInt2DebugStringFormatter.cs" />
    113     <Compile Include="Default\DebugString\Formatters\Long2DebugStringFormatter.cs" />
    114     <Compile Include="Default\DebugString\Formatters\ULong2DebugStringFormatter.cs" />
    115     <Compile Include="Default\DebugString\Formatters\Short2DebugStringFormatter.cs" />
    116     <Compile Include="Default\DebugString\Formatters\UShort2DebugStringFormatter.cs" />
    117     <Compile Include="Default\DebugString\Formatters\Byte2DebugStringFormatter.cs" />
    118     <Compile Include="Default\DebugString\Formatters\ValueType2DebugStringFormatterBase.cs" />
    119     <Compile Include="Default\DebugString\Formatters\String2DebugStringFormatter.cs" />
    120     <Compile Include="Default\DebugString\Formatters\Bool2DebugStringFormatter.cs" />
    121     <Compile Include="Default\DebugString\Formatters\Int2DebugStringFormatter.cs" />
    122     <Compile Include="Default\DebugString\Formatters\Doubld2DebugStringFormatter.cs" />
    123     <Compile Include="Default\DebugString\Formatters\DateTime2DebugStringFormatter.cs" />
    124     <Compile Include="Default\DebugString\Formatters\Type2DebugStringFormatter.cs" />
    125     <Compile Include="Default\DebugString\Formatters\Float2DebugStringFormatter.cs" />
    126122    <Compile Include="Default\DebugString\DebugStringGenerator.cs" />
    127     <Compile Include="Default\Decomposers\ArrayDecomposer.cs" />
    128     <Compile Include="Default\Decomposers\CompactNumberArray2StringDecomposer.cs" />
    129     <Compile Include="Default\Decomposers\EnumerableDecomposer.cs" />
    130     <Compile Include="Default\Decomposers\EnumDecomposer.cs" />
    131     <Compile Include="Default\Decomposers\KeyValuePairDecomposer.cs" />
    132     <Compile Include="Default\Decomposers\DictionaryDecomposer.cs" />
    133     <Compile Include="Default\Decomposers\Storable\StorableDecomposer.cs" />
    134     <Compile Include="Default\Decomposers\TypeDecomposer.cs" />
    135     <Compile Include="Default\Decomposers\NumberEnumerable2StringDecomposer.cs" />
    136     <Compile Include="Default\Xml\Compact\IntArray2XmlFormatters.cs" />
    137     <Compile Include="Default\Xml\Compact\DoubleArray2XmlFormatters.cs" />
    138     <Compile Include="Default\Xml\Compact\DoubleList2XmlFormatter.cs" />
    139     <Compile Include="Default\Xml\Compact\NumberEnumeration2XmlFormatterBase.cs" />
    140     <Compile Include="Default\Xml\Compact\NumberArray2XmlFormatterBase.cs" />
    141     <Compile Include="Default\Decomposers\Storable\DataMemberAccessor.cs" />
    142     <Compile Include="Default\Xml\Compact\IntList2XmlFormatter.cs" />
    143     <Compile Include="Default\Xml\Primitive\Guid2XmlFormatter.cs" />
    144     <Compile Include="Default\Xml\Primitive\TimeSpan2XmlFormatter.cs" />
    145     <Compile Include="Default\Xml\XmlFormatterBase.cs" />
    146     <Compile Include="Default\Xml\Primitive\PrimitiveXmlFormatterBase.cs" />
    147     <Compile Include="Default\Xml\Compact\CompactXmlFormatterBase.cs" />
    148     <Compile Include="Default\Xml\Primitive\Char2XmlFormatter.cs" />
     123    <Compile Include="Default\DebugString\PrimitiveSerializers\Bool2DebugStringSerializer.cs" />
     124    <Compile Include="Default\DebugString\PrimitiveSerializers\Byte2DebugStringSerializer.cs" />
     125    <Compile Include="Default\DebugString\PrimitiveSerializers\Char2DebugStringSerializer.cs" />
     126    <Compile Include="Default\DebugString\PrimitiveSerializers\DateTime2DebugStringSerializer.cs" />
     127    <Compile Include="Default\DebugString\PrimitiveSerializers\Doubld2DebugStringSerializer.cs" />
     128    <Compile Include="Default\DebugString\PrimitiveSerializers\Float2DebugStringSerializer.cs" />
     129    <Compile Include="Default\DebugString\PrimitiveSerializers\Int2DebugStringSerializer.cs" />
     130    <Compile Include="Default\DebugString\PrimitiveSerializers\Long2DebugStringSerializer.cs" />
     131    <Compile Include="Default\DebugString\PrimitiveSerializers\SByte2DebugStringSerializer.cs" />
     132    <Compile Include="Default\DebugString\PrimitiveSerializers\Short2DebugStringSerializer.cs" />
     133    <Compile Include="Default\DebugString\PrimitiveSerializers\String2DebugStringSerializer.cs" />
     134    <Compile Include="Default\DebugString\PrimitiveSerializers\Type2DebugStringSerializer.cs" />
     135    <Compile Include="Default\DebugString\PrimitiveSerializers\UInt2DebugStringSerializer.cs" />
     136    <Compile Include="Default\DebugString\PrimitiveSerializers\ULong2DebugStringSerializer.cs" />
     137    <Compile Include="Default\DebugString\PrimitiveSerializers\UShort2DebugStringSerializer.cs" />
     138    <Compile Include="Default\DebugString\PrimitiveSerializers\ValueType2DebugStringSerializerBase.cs" />
     139    <Compile Include="Default\Xml\Compact\CompactXmlSerializerBase.cs" />
     140    <Compile Include="Default\Xml\Compact\DoubleArray2XmlSerializer.cs" />
     141    <Compile Include="Default\Xml\Compact\DoubleList2XmlSerializer.cs" />
     142    <Compile Include="Default\Xml\Compact\IntArray2XmlSerializer.cs" />
     143    <Compile Include="Default\Xml\Compact\IntList2XmlSerializer.cs" />
     144    <Compile Include="Default\Xml\Compact\NumberArray2XmlSerializerBase.cs" />
     145    <Compile Include="Default\Xml\Compact\NumberEnumeration2XmlSerializerBase.cs" />
     146    <Compile Include="Default\Xml\Primitive\Bool2XmlSerializer.cs" />
     147    <Compile Include="Default\Xml\Primitive\Byte2XmlSerializer.cs" />
     148    <Compile Include="Default\Xml\Primitive\Char2XmlFormatter.cs">
     149      <SubType>Code</SubType>
     150    </Compile>
     151    <Compile Include="Default\Xml\Primitive\DateTime2XmlSerializer.cs" />
     152    <Compile Include="Default\Xml\Primitive\Decimal2XmlSerializer.cs" />
     153    <Compile Include="Default\Xml\Primitive\DecimalNumber2XmlSerializerBase.cs" />
     154    <Compile Include="Default\Xml\Primitive\Double2XmlSerializer.cs" />
     155    <Compile Include="Default\Xml\Primitive\Float2XmlSerializer.cs" />
     156    <Compile Include="Default\Xml\Primitive\Guid2XmlSerializer.cs" />
     157    <Compile Include="Default\Xml\Primitive\Int2XmlSerializer.cs" />
     158    <Compile Include="Default\Xml\Primitive\Long2XmlSerializer.cs" />
     159    <Compile Include="Default\Xml\Primitive\PrimitiveXmlSerializerBase.cs" />
     160    <Compile Include="Default\Xml\Primitive\SByte2XmlSerializer.cs" />
     161    <Compile Include="Default\Xml\Primitive\Short2XmlSerializer.cs" />
     162    <Compile Include="Default\Xml\Primitive\SimpleNumber2XmlSerializerBase.cs" />
     163    <Compile Include="Default\Xml\Primitive\String2XmlSerializer.cs" />
     164    <Compile Include="Default\Xml\Primitive\TimeSpan2XmlSerializer.cs" />
     165    <Compile Include="Default\Xml\Primitive\UInt2XmlSerializer.cs" />
     166    <Compile Include="Default\Xml\Primitive\ULong2XmlSerializer.cs" />
     167    <Compile Include="Default\Xml\Primitive\UShort2XmlSerializer.cs" />
     168    <Compile Include="Default\Xml\XmlSerializerBase.cs" />
    149169    <Compile Include="Default\Xml\XmlStringConstants.cs" />
    150170    <Compile Include="Default\Xml\XmlString.cs" />
    151     <Compile Include="Default\Xml\Primitive\Double2XmlFormatter.cs" />
    152     <Compile Include="Default\Xml\Primitive\Decimal2XmlFormatter.cs" />
    153     <Compile Include="Default\Xml\Primitive\Float2XmlFormatter.cs" />
    154     <Compile Include="Default\Xml\Primitive\UInt2XmlFormatter.cs" />
    155     <Compile Include="Default\Xml\Primitive\Long2XmlFormatter.cs" />
    156     <Compile Include="Default\Xml\Primitive\ULong2XmlFormatter.cs" />
    157     <Compile Include="Default\Xml\Primitive\Int2XmlFormatter.cs" />
    158     <Compile Include="Default\Xml\Primitive\SByte2XmlFormatter.cs" />
    159     <Compile Include="Default\Xml\Primitive\Byte2XmlFormatter.cs" />
    160     <Compile Include="Default\Xml\Primitive\Short2XmlFormatter.cs" />
    161     <Compile Include="Default\Xml\Primitive\UShort2XmlFormatter.cs" />
    162     <Compile Include="Default\Xml\Primitive\Bool2XmlFormatter.cs" />
    163     <Compile Include="Default\Xml\Primitive\DecimalNumber2XmlFormatterBase.cs" />
    164     <Compile Include="Default\Xml\Primitive\String2XmlFormatter.cs" />
    165     <Compile Include="Default\Xml\Primitive\SimpleNumber2XmlFormatterBase.cs" />
    166     <Compile Include="Default\Xml\Primitive\DateTime2XmlFormatter.cs" />
    167171    <Compile Include="Default\Xml\XmlFormat.cs" />
    168172    <Compile Include="HeuristicLabPersistencePlugin.cs" />
    169173    <Compile Include="Core\Deserializer.cs" />
    170174    <Compile Include="Core\Tag.cs" />
     175    <Compile Include="Interfaces\ICompositeSerializer.cs" />
     176    <Compile Include="Interfaces\IPrimitiveSerializer.cs" />
    171177    <Compile Include="Interfaces\ISerialData.cs" />
    172178    <Compile Include="Interfaces\IFormat.cs" />
    173     <Compile Include="Interfaces\IDecomposer.cs" />
    174     <Compile Include="Interfaces\IFormatter.cs" />
    175179    <Compile Include="Core\ConfigurationService.cs" />
    176180    <Compile Include="Core\Tokens\MetaInfoBeginToken.cs" />
     
    191195      <DependentUpon>Settings.settings</DependentUpon>
    192196    </Compile>
    193     <Compile Include="Default\Decomposers\Storable\StorableAttribute.cs" />
    194197    <Compile Include="Default\Xml\XmlGenerator.cs" />
    195198    <Compile Include="Default\Xml\XmlParser.cs" />
  • trunk/sources/HeuristicLab.Persistence/3.3/Interfaces/ICompositeSerializer.cs

    r1805 r1823  
    55namespace HeuristicLab.Persistence.Interfaces {
    66
    7   public interface IDecomposer {
     7  public interface ICompositeSerializer {
    88
    99    /// <summary>
    10     /// Defines the Priorty of this Decomposer. Higher number means
    11     /// higher prioriy. Negative numbers are fallback decomposers.
    12     /// All default generic decomposers have priority 100. Specializations
     10    /// Defines the Priorty of this composite serializer. Higher number means
     11    /// higher prioriy. Negative numbers are fallback serializers.
     12    /// All default generic composite serializers have priority 100. Specializations
    1313    /// have priority 200 so they will  be tried first. Priorities are
    1414    /// only considered for default configurations.
     
    1717
    1818    /// <summary>
    19     /// Determines for every type whether the decomposer is applicable.
     19    /// Determines for every type whether the composite serializer is applicable.
    2020    /// </summary>   
    21     bool CanDecompose(Type type);
     21    bool CanSerialize(Type type);
    2222
    2323    /// <summary>
  • trunk/sources/HeuristicLab.Persistence/3.3/Interfaces/IPrimitiveSerializer.cs

    r1805 r1823  
    44
    55  /// <summary>
    6   /// Marker interface of serial data formatters. Transform data of type SourceType
    7   /// into the serialization format SerialDataType. Derive from FormatterBase instead
     6  /// Marker interface primitive serializers. Transform data of type SourceType
     7  /// into the serialization format SerialDataType. Derive from PrimitiveSerializerBase instead
    88  /// of implementing this interface.
    99  /// </summary>
    10   public interface IFormatter {
     10  public interface IPrimitiveSerializer {
    1111    Type SerialDataType { get; }
    1212    Type SourceType { get; }
     
    1616
    1717  /// <summary>
    18   /// Marker interface of serial data formatters. Transform data of type Source
    19   /// into the serialization format SerialData. Derive from FormatterBase instead
     18  /// Marker interface primitive serializers. Transform data of type SourceType
     19  /// into the serialization format SerialDataType. Derive from PrimitiveSerializerBase instead
    2020  /// of implementing this interface.
    21   /// </summary> 
    22   public interface IFormatter<Source, SerialData> : IFormatter where SerialData : ISerialData {
     21  /// </summary>
     22  public interface IPrimitiveSerializer<Source, SerialData> : IPrimitiveSerializer where SerialData : ISerialData {
    2323    SerialData Format(Source o);
    2424    Source Parse(SerialData t);
  • trunk/sources/HeuristicLab.Persistence/3.3/Interfaces/ISerialData.cs

    r1566 r1823  
    66  /// <summary>
    77  /// Marker interface for serialized values generated and parsed by
    8   /// the formatter and output and read by generator and parser.
     8  /// primitive serializers and output and read by generator and parser.
    99  /// </summary>
    1010  public interface ISerialData { }
  • trunk/sources/HeuristicLab.Persistence/UnitTests/StorableAttributeTests.cs

    r1625 r1823  
    33using HeuristicLab.Persistence.Core;
    44using Microsoft.VisualStudio.TestTools.UnitTesting;
    5 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     5using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    66
    77namespace HeuristicLab.Persistence.Test {
  • trunk/sources/HeuristicLab.Persistence/UnitTests/UseCases.cs

    r1822 r1823  
    1010using System.IO;
    1111using System.Reflection;
    12 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     12using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    1313using HeuristicLab.Persistence.Interfaces;
    1414using HeuristicLab.Persistence.Default.Xml.Primitive;
    15 using HeuristicLab.Persistence.Default.Decomposers;
     15using HeuristicLab.Persistence.Default.CompositeSerializers;
    1616using HeuristicLab.Persistence.Auxiliary;
    1717using System.Text.RegularExpressions;
     
    432432      XmlGenerator.Serialize(sdt, tempFile,
    433433        new Configuration(new XmlFormat(),
    434           new List<IFormatter> { new String2XmlFormatter() },
    435           new List<IDecomposer> {
    436             new StorableDecomposer(),
    437             new Number2StringDecomposer() }));
     434          new List<IPrimitiveSerializer> { new String2XmlSerializer() },
     435          new List<ICompositeSerializer> {
     436            new StorableSerializer(),
     437            new Number2StringSerializer() }));
    438438      object o = XmlParser.Deserialize(tempFile);
    439439      Assert.AreEqual(
  • trunk/sources/HeuristicLab.Random/3.3/MersenneTwister.cs

    r1688 r1823  
    3737using System.Xml;
    3838using HeuristicLab.Core;
    39 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     39using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    4040
    4141namespace HeuristicLab.Random {
  • trunk/sources/HeuristicLab.Random/3.3/NormalDistributedRandom.cs

    r1688 r1823  
    2626using System.Xml;
    2727using System.Globalization;
    28 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     28using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2929
    3030namespace HeuristicLab.Random {
  • trunk/sources/HeuristicLab.Routing.TSP/3.3/TSPTour.cs

    r1699 r1823  
    2727using HeuristicLab.Data;
    2828using HeuristicLab.Permutation;
    29 using HeuristicLab.Persistence.Default.Decomposers.Storable;
     29using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3030
    3131namespace HeuristicLab.Routing.TSP {
Note: See TracChangeset for help on using the changeset viewer.