Documentation

    Table of Content
    • CodePorting.Native Product Family
      • CodePorting.Native Cs2Cpp
        • Getting Started
          • Product Overview
          • Installation
          • Licensing
          • How to use CodePorting.Native Cs2Cpp
            • How to Use Command line to port and build Projects
            • How to Use GUI to port and build Projects
        • Developer Guide
          • Porting Simple C# Projects
            • Porting Simple Console Application
            • Porting Simple Library
            • Porting Simple NUnit Test
          • Porting Dependent C# Projects
            • Porting Dependent Console Application
            • Porting Dependent Library
            • Porting Dependent NUnit Test
          • Porting Complex C# Projects
            • How to Convert Complex C# Console Application to C++
            • How to Convert Complex C# Library to C++
            • How to Convert Complex C# NUnit Test to C++
          • Qt support
          • What Converts to What
            • AbstractClasses
            • BreakStatements
            • ClassAutoProperties
            • ClassConstructors
            • ClassEvents
            • ClassFinalizers
            • ClassGenericMethods
            • ClassIndexers
            • ClassMethods
            • ClassProperties
            • ClassStaticConstructor
            • ClassStaticMethods
            • ClassStaticProperties
            • ClassVirtualMethods
            • ContinueStatements
            • Delegates
            • DoWhileStatements
            • Enums
            • EnumTypeCast
            • Exceptions
            • ExpectedException
            • ForeachStatements
            • ForeachStatementsStd
            • ForStatements
            • GenericClasses
            • GenericDelegates
            • GenericInterfaces
            • GenericStructs
            • IfStatements
            • LambdaExpressions
            • NestedClasses
            • ReturnStatements
            • SimpleClass
            • SimpleInterface
            • SimpleStruct
            • SimpleTest
            • StandardTypeCast
            • StaticClass
            • SwitchStatements
            • TestWithSetupMethods
            • ThrowStatements
            • TryCatchFinallyStatements
            • TryCatchStatements
            • TryFinallyStatements
            • VarExpressions
            • WhileStatements
          • CodePorting Native Cs2Cpp Attributes
          • CodePorting Native Cs2Cpp Configuration File
            • CodePorting.Native Cs2Cpp Configuration File Structure
            • Attributes in Configuration file
            • Configuration file Nodes
            • Configuration file Options
          • Memory Management Model
            • Memory Management Model Description
            • Using aliasing constructor to create a smart pointer
          • Cmake Support
          • C++ code injection
          • C++ user-defined exception classes
          • Limitations and Bugs
            • Porter Limitations and Bugs
            • Library Limitations and Bugs
            • Cpp Code Injection
        • Release Notes
          • 2022
            • CodePorting.Native Cs2Cpp 22.5
            • CodePorting.Native Cs2Cpp 22.4
            • CodePorting.Native Cs2Cpp 22.3
            • CodePorting.Native Cs2Cpp 22.2
            • CodePorting.Native Cs2Cpp 22.1
          • 2021
            • CodePorting.Native Cs2Cpp 21.12
            • CodePorting.Native Cs2Cpp 21.11
            • CodePorting.Native Cs2Cpp 21.10.1
            • CodePorting.Native Cs2Cpp 21.10
            • CodePorting.Native Cs2Cpp 21.9
            • CodePorting.Native Cs2Cpp 21.8
            • CodePorting.Native Cs2Cpp 21.7
            • CodePorting.Native Cs2Cpp 21.6
            • CodePorting.Native Cs2Cpp 21.5
            • CodePorting.Native Cs2Cpp 21.4
            • CodePorting.Native Cs2Cpp 21.3
            • CodePorting.Native Cs2Cpp 21.2
            • CodePorting.Native Cs2Cpp 21.1
          • 2020
            • CodePorting.Native Cs2Cpp 20.12
            • CodePorting.Native Cs2Cpp 20.11
            • CodePorting.Native Cs2Cpp 20.10
            • CodePorting.Native Cs2Cpp 20.9
            • CodePorting.Native Cs2Cpp 20.8
            • CodePorting.Native Cs2Cpp 20.7
            • CodePorting.Native Cs2Cpp 20.6
            • CodePorting.Native Cs2Cpp 20.5
            • CodePorting.Native Cs2Cpp 20.4
            • CodePorting.Native Cs2Cpp 20.3
            • CodePorting.Native Cs2Cpp 20.2
            • CodePorting.Native Cs2Cpp 20.1
          • 2019
            • CodePorting.Native Cs2Cpp 19.1
            • CodePorting.Native Cs2Cpp 19.2
            • CodePorting.Native Cs2Cpp 19.3
            • CodePorting.Native Cs2Cpp 19.4
            • CodePorting.Native Cs2Cpp 19.4.1
            • CodePorting.Native Cs2Cpp 19.5
            • CodePorting.Native Cs2Cpp 19.6
            • CodePorting.Native Cs2Cpp 19.7
            • CodePorting.Native Cs2Cpp 19.8
            • CodePorting.Native Cs2Cpp 19.9
            • CodePorting.Native Cs2Cpp 19.10
            • CodePorting.Native Cs2Cpp 19.11
            • CodePorting.Native Cs2Cpp 19.12
          • 2018
            • CodePorting.Native Cs2Cpp 18.9
            • CodePorting.Native Cs2Cpp 18.9.1
            • CodePorting.Native Cs2Cpp 18.10
            • CodePorting.Native Cs2Cpp 18.11
            • CodePorting.Native Cs2Cpp 18.12
    1. Home
    2. CodePorting.Native Product Family
    3. CodePorting.Native Cs2Cpp
    4. Release Notes
    5. 2021
    6. CodePorting.Native Cs2Cpp 21.11

    CodePorting.Native Cs2Cpp 21.11

    What's on this Page

      • Major Features
      • Minor fixes
      • Full List of Issues Covering all Changes in this Release
      • Public API and Backward Incompatible Changes

    Major Features

    1. API reference was improved for multiple classes. Usage examples were added. Some misprints were fixed.
    2. Now the CODEPORTING_CURRENT_RETTYPE macro is used as the return type of the get_Current method. Now it’s just a stub that do not modify its argument type, but in one of upcoming releases, it will return a reference instead of a shared pointer copy in the collections that store reference types or strings.
    3. The generic ‘foreach’ enumeration translation rules is changed to:
      auto x_enumerator = y->GetEnumerator();
      while (x_enumerator->MoveNext())
      {
         auto&& x = x_enumerator->getCurrent();
         // ...
      }
    4. Forward declarations are sorted in alphabetical order as much as it’s possible without violating topological sorting.
    5. Namespaces that contain forward declarations are opened and closed as rare as possible.
    6. Now Skia is built without the OpenGL support.
    7. Now the porter supports using of the CppArgumentKind attribute with an argument type name parameter.
    8. Now the CppArrayOnStack attribute can be applied only to single-dimensional arrays.
    9. Implemented text alignment when using Graphics::DrawString with a given rectangle.
    10. The zeroing of matrix values is removed when the Multiply method is called.

    Minor fixes

    1. NullReferenceException is thrown when sorting elements of the List- and Array-class instances that contain null elements. Fixed.
    2. The IPAddress- and IPEndPoint-class static data initialization order is fixed.
    3. Now ArrayView can be passed as an argument to the Array.Copy method.
    4. CheckedCast doesn’t throw OverflowException when the casted number is out of the value range. It also causes the compilation error (by warning C4018). Fixed.
    5. The Bitmap::set_Palette method is optimized. It worked slowly with large images.
    6. The new template was added for the case when the setter accepts const PropT& and the getter returns PropT. It happens when force_const_ref_parameters = true.
    7. The delegate translation was improved.
    8. The number of GraphicsPath points was fixed when the AddString method is used to add the tabulation symbol.
    9. The begin and end methods were added to the ArrayView class.
    10. Now the StackArray-class instance is used instead of std::array as a parameter in the ArrayView constructor.
    11. Now the porter supports extension methods for the primitive types.
    12. The System.Drawing.Drawing2D.AdjustableArrowCap class was implemented.
    13. The TextureBrush constructor now behaves as in .Net.
    14. The implicit object.Equals(object, object) method call is ported to Equals(left, right) instead of System::Object::Equals(left, right).
    15. The porter doesn’t translate the cref tag when another project contains the specified type. Fixed.
    16. The new force_const_ref_return_type_simple_properties option is added. Simple property getters (that contain only one return statement) of shared pointer types return const references to backed fields when this option is enabled.
    17. Now the porter supports global enums with the Flags attribute.

    Full List of Issues Covering all Changes in this Release

    KeySummaryCategory
    WORDSCPP-1135Regular memory leaks checkTask
    CSPORTCPP-3867Add usage examples for system classesEnhancement
    SLIDESCPP-3202Fix cycles detection mechanism failureTask
    SLIDESCPP-3197Fix IPAddress and IPEndPoint classes static data initialization orderTask
    PDFCPP-1712Add Array.Copy support for ArrayView class [asposecpplib]Task
    SLIDESCPP-3201Fix CheckedCast compilation and behaviorTask
    PDFCPP-1647HTML.Builder optimizationTask
    SLIDESCPP-3191Porter: Improve delegates translationTask
    SLIDESCPP-3154Fix RegressionTests_v21_10.SLIDESNET_42542 testTask
    PDFCPP-1705Changes in asposecpplib for ArrayView classTask
    WORDSCPP-1138Add support for porting extension methods for value types (int, long, etc.)Task
    SLIDESCPP-2949Implement System.Drawing.Drawing2D.AdjustableArrowCap classTask
    PUBCPP-33modify wrap mode in TextureBrush constructorTask
    WORDSCPP-1139Incorrect porting of implicit object.Equals(a,b) invocation expressionTask
    CSPORTCPP-4651Investigate Linux so files size growthInvestigation
    SLIDESCPP-3171Porter: Improve cref tags translationTask
    CSPORTCPP-4661Support global enums with Flags attributeTask
    CSPORTCPP-4557Sort forward declarations where possibleEnhancement
    WORDSCPP-1125Build skia without OpenGL supportTask
    SLIDESCPP-3170Porter: Enhance CppArgumentKind attribute in config with an argument type name parameterTask

    Public API and Backward Incompatible Changes

    1. The new implementation of the classes that belong to the ‘System.Xml’ namespace will be based on the ported code of CoreFx 2.0 instead of using libxml2. The classes that belong to the ‘System.Xml.Serialization’, ‘System.Xml.Xsl.IlGen’, ‘System.Xml.Xsl.QIL’, ‘System.Xml.Xsl.Runtime’, and ‘System.Xml.Xsl.Xslt’ namespaces will be removed. The ‘XslCompiledTransform’ class will use ‘XslTransform’. The async calls won’t be supported.
    2. The get_Current method of the IEnumerable class and its inheritors will return a value by reference instead of returning by value when a collection stores reference types or strings. It is advisable everywhere when impossible to use C++ iterators (such as iterating over IList or any other interface). Using references instead of copying gives a good performance profit (up to 4x times faster).
    3. The performance of methods of the classes that belong to ‘System::IO’ will be improved. Methods of ‘Stream’, ‘TextWriter’, and their inheritors classes will accept arguments by const reference instead of copying pointers. Possibly, the C#-code of a class-inheritor method is needs to be changed when the passed argument is changed inside it.
    4. The new IEnumerable-level iterators and iterators for collections with duck typing will be added. The virtual native STL iterators are used where it is possible. New iterators are copiable, have full list of operators, work faster, and allow changing a container’s element. But not all implementations provide all operators. E.g. the features of a one-direction iterator are available when Enumerator is used. An iterator dereferencement return type will be changed to reference.