Example #1
0
    void DataDeserializer::Deserialize<Variant>(Variant& var)
    {

      uint8_t encodingMask = 0;
      Deserialize(encodingMask);

      // TODO check validity of type value after decoding.
      var.Type = static_cast<VariantType>(encodingMask & VALUE_TYPE_MASK);
      if (encodingMask & HAS_ARRAY_MASK)
      {
        var.setArray(true);
        ApplyToVariantValue(var.Type, var.Value, DeserializeContainerValue, *this);
      }
      else
      {
        ApplyToVariantValue(var.Type, var.Value, DeserializeValue, *this);
      }

      if (encodingMask & HAS_DIMENSIONS_MASK)
      {
        DeserializeContainer(*this, var.Dimensions);
      }
    }
Example #2
0
 void DataDeserializer::Deserialize<std::vector<bool>>(std::vector<bool>& value)
 {
   DeserializeContainer(*this, value);
 }
Example #3
0
 void DataDeserializer::Deserialize<std::vector<Variant>>(std::vector<Variant>& targets)
 {
   DeserializeContainer(*this, targets);
 }